Comments (18)
already mentioned here:
chocolatey-archive/chocolatey#650
also see here:
#11
from chocolatey-package-updater.
from chocolatey-package-updater.
Actually this is not a Chocolatey issue. A program should never overwrite the user settings on an update, regardless whether it is handled with a package manager.
from chocolatey-package-updater.
For example, consider CCleaner portable:
The first time an user starts CCleaner.exe, it creates a new ccleaner.ini
file for the settings. On an update this file never gets overwritten, because the the ZIP with the CCleaner binaries doesnβt include that file, so the ZIP contents can be safely extracted into the same folder to update CCleaner portable.
chocopkgup should do something similar.
The issue of overwritten settings is a design flaw of chocopkgup and has nothing to do with Chocolatey.
from chocolatey-package-updater.
does this actually happen anywhere but in the chocopkgup.exe.config?
from chocolatey-package-updater.
does this actually happen anywhere but in the chocopkgup.exe.config?
Any software that uses the same settings file for the default and for the users settings is affected.
from chocolatey-package-updater.
We can agree to disagree here. This is going to be handled by Chocolatey.
Let's step away from Chocolatey for a second
Right now for folks to do something like this, they would do it all manually or have some sort of deployment exercise that sets all of the settings for them. There is a config file (as a .net convention) that you make the changes in. People make changes to that manually. So when they upgrade they may have to make changes to it again manually.
Now back to Chocolatey vCurrent
The settings are not actually overwritten. The config file is just in a different location with the old version. The old version they were using still has the settings. It's a small but very important distinction.
Why it's a Chocolatey Issue
As a convention of .NET applications to have a config file that HAS to sit right next to the application, the updating of that should be done by Chocolatey if it is going to handle the auto upgrading of packages because the updating of those files are done now manually or by a deployment.
But let's talk mechanics of WHY it absolutely is a Chocolatey issue to handle
- .NET applications store the config file next to the application because that is a requirement of .NET. The file has to be next to the executable. In the package directory. So now that we have that out of the way, let's move on.
- Because I store the config file there, if someone updates stuff there, the config gets updated (that's handled manually in many respects).
- On upgrade, Chocolatey/choco is going to replace that file without stopping to wait for the app to move it somewhere else/back it up. That's choco updating the package. choco.exe will at least keep the file around with the new versionless folder format (as of 0.9.9-rc8) since there won't be an old directory to go back and compare to.
Why it should not an application issue
EVERY single .NET application would need to do the following:
- Store your configuration file somewhere else and build a way to update it. Neither of these are trivial.
- OR use other things for configuration/settings, like the registry (uh, NO :) ).
Building handling your configuration updates is a non-trivial exercise and we should not expect every application that folks want to put on Chocolatey to solve that issue OVER AND OVER. It would be better to have Chocolatey do it once. After all, choco is a framework for making things simpler, not more difficult.
from chocolatey-package-updater.
Ugh, then itβs a design flaw of .NET applications. π±
Weird that I never had this kind of issue with any of my portableapps. They all work fine with Chocolatey vCurrent, without overwriting the settings. Quite disappointing that Chocolatey has to βfixβ this design flaw.
from chocolatey-package-updater.
Choco.exe embeds the config file. And it also does lots of magic (and uses a config that is not standard) to work around this. :)
from chocolatey-package-updater.
@ferventcoder what happens in the scenario where a new property, that didn't exist in the backed up .config file is added, when an application is upgraded?
from chocolatey-package-updater.
Is .NET really not able to handle such a trivial thing easily? π
What if one uses and updates a .NET app without using Chocolatey and itβs workaround for this issue?
IMHO a portable app should be standalone capable and never rely on any workaround mechanism of a package manager.
from chocolatey-package-updater.
Within a .Net Application, there is the concept of User Defined Settings, which are stored in the users folder, one for each user, and these don't get overridden on upgrade of the application, however, as Rob pointed out, not everyone uses things like this, and instead use the easiest option, which is to use the default config file.
from chocolatey-package-updater.
Thanks for pointing this out.
Then I was right. This is indeed not a Chocolatey issue, itβs just an app design issue that could be circumvented with external software such as Chocolatey.
I would rather define a proper app design than implementing this creepy workaround. Just my 2 Β’. π
from chocolatey-package-updater.
I would rather define a proper app design than implementing this creepy workaround. Just my 2 Β’. π
And while I can see your point, you have to understand that you are not going to change the world as we know it, overnight. While some applications will do things "properly" there is no guarantee that this will happen. Chocolatey is in a unique position to provide as smooth an update/upgrade process as possible, so that the end user doesn't have to worry about things like this, instead, "it just works".
from chocolatey-package-updater.
A very simple solution would be to make use of the configSource attribute in the main config to still use the default. Net configuration system while still being able to move the settings that the user needs to change out to another file
from chocolatey-package-updater.
π
from chocolatey-package-updater.
Here's what's coming for 0.9.9.7 - chocolatey/choco#331
from chocolatey-package-updater.
Closed with bc9ee14
from chocolatey-package-updater.
Related Issues (20)
- Use https://chocolatey.org/ instead of http://chocolatey.org/ for pushes HOT 1
- chocopkgup.exe.config gets overwritten on every update HOT 3
- Allow version to have pre-release characteristics e.g. -beta1 HOT 3
- Sync this repository with the actual release on Chocolatey.org HOT 7
- Ketarin log files are dateless on some configurations HOT 2
- [Enhancement] Option to sort logs if more than one thread HOT 4
- [Enhancement] Label log entries HOT 4
- chocopkgup should support prereleases HOT 2
- Fix documentation in package description HOT 2
- License for 0.6.5 has expired HOT 4
- Support relative file paths HOT 7
- Package updater replaces {{DownloadUrl}} with empty string HOT 5
- Command line override which allows chocopkgup to deploy packages from more than one repo. HOT 2
- Install error after deleting HOT 5
- Pass in checksumType and ChecksumTypex64
- use the package directory instead of Get-BinRoot
- [Enhancement] Provide variable for release notes
- Package pushed to Chocolatey by ketarin while /disablepush has been specified HOT 6
- License for 0.6.2 has expired HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chocolatey-package-updater.