-
Notifications
You must be signed in to change notification settings - Fork 342
[BUG] Upgrading does not remove the previous version #259
Comments
what you mean is choco clean. |
We do not remove the previous version at all when a new version comes in by design. You can install two versions of ruby. |
You need to be explicit on installing ruby versions. But what I think we are missing here is a bigger design. Choco clean removes all older versions of packages except for those you have pinned. So if you have 3 versions of ruby and you pin the latest and the first one behind it, when you clean, the one that is not pinned goes away (from the chocolatey lib, but not uninstalled yet). The uninstall itself should be smarter about asking someone what they want to remove when there are multiple versions. Like the way ruby gems does it when you have multiple installs of a gem.
So you wouldn't have a need for bump. What you could do is add clean to the end of the install command |
And yes, right now when there are multiple active versions, PPAs break down a bit on keeping these separate if you try to treat them as the package. What we are looking to do here is create some meta packages that are dependent on a range of versions of a package so you can install them. What it doesn't handle very well right now is the upgrade scenario and why I haven't moved forward with it. It works right now just like it is, it's just not as easy for someone to see how they would get 1.8.7 and 1.9.2 of ruby and keep them updated independently. They have to use These are special edge cases that don't always fit nicely into the versioning concept since they are maintained over time instead of deprecated for the newer versions. Nothing wrong with it, it just complicates things a bit, that's all. |
This is also where the evolution of the chocolateyInstall.ps1 will come in handy (where we break some areas into known functions chocolatey can call). |
I do like the cinst ruby -clean - That makes sense to me. The old versions can be determined using the -version all functionality I just wrote as a PR a few minutes ago against the current. Now enter cup notepadplusplus. When you cinst it, you get the latest. perfect! In this use case- you want the cup process to automatically delete the lib folder for the version 1 rev behind. An upgrade is just that, a replacement of the version you specify (or replace latest if unspecified). Its not a side by side install, and i think chocolatey doesn't do much different for a cup. I think in the case of ruby, most users are not going to cup ruby, and instead cinst the version they want. |
Maybe cup should delete all versions. I think that's what yum update might do. Otherwise cinst... |
I think that's where the clean command comes in. Choco has no way of On Wednesday, March 27, 2013, Rich Siegel wrote:
Rob http://devlicio.us/blogs/rob_reynolds |
i understand what you are saying about pinning, which I am down with. Do you think this should be a 'feature' of the config file? say a pinned packages element. Do we leave this up to the user to populateor leave it to package authors to tamper with chocolatey.config? (ugh-security)... I have a production request to nail down the default behavior for cup. Its getting to the point, where package authors are building crazy logic into chocolateyinstall.ps1... chocolateylib is gettting messy. If there are areas where we are giving the users a choice, like in your uninstall example, we also need command line switches to force behaviors for non-interaction. |
Pinning is always from a user, never from a package author. Rob http://devlicio.us/blogs/rob_reynolds On Sun, Mar 31, 2013 at 8:31 PM, Rich Siegel [email protected]:
|
I think it’s not a good design to keep the older versions of packages, because it has several drawbacks:
Let’s get to the advantages of dropping the current design of keeping multiple package versions. Some of them can be derived from the previous text:
Now I hope I could convince you that this design is better. :) |
any interest in a helper like this: (taken from one of our sysadmins who used it in a recent package) I horrendously adapted it for understandiing
|
so are we needing a -pin switch, and what does it do? Touch a pinned.txt 0 byte file in it's lib? Trying to understand how we should be creating future packages... |
The pin keeps a package from being upgraded. Like you want to pin a particular version. |
do you pin during install, or do you pin as a separate op, or both should be supported. Method 1. Method2. |
Method 2 only |
this whole topic confuses me, and a lot of ideas.
|
After running
What I expected: flashplayer derivatives should've been removed, Atom should've copied old user data and then also be removed. If I wanted to have different/multiple versions installed, I would've used So, should package authors take care of that? Most packages don't even have an uninstall script... |
No, this is something chocolatey is going to do by v1. On Thu, Jun 26, 2014 at 9:01 PM, FichteFoll [email protected]
Rob http://devlicio.us/blogs/rob_reynolds |
I have another less complicated idea. Why not simply leave off the package version from the package folder name? That would make things a lot easier to handle. Then no user data copying would be needed. I already explained some other benefits that this approach in my previous comment: #259 (comment) Chocolatey has a really weird design in this area that I’ve never seen at any other package manager. Do you really think that it is so common that one wants to keep all package versions ever installed? In most cases that isn’t even possible. For example, most of the software that comes with an installer will overwrite the previous version by default. Therefore having a I want to ask you how often one would really need to have multiple versions of the same package installed at the same time. The only case where that would be 100 % possible would be portable packages. But even then it would not be easy to implement a good way to handle this. I’ve worked with Linux for several years now, where package managers are an essential part of the system and I never had the need to install multiple versions of the same package at the same time. I also never heard of one that would need that and nobody who complained about the fact that upgrading a package overwrites the previous version. @ferventcoder, please consider a better design for the rewrite of Chocolatey as I already described in #259 (comment) |
@TomOne what's your suggestion for jre where you need both 32bit and 64bit at the same time? Separate packages right? |
Yes, that’s the most straightforward solution, isn’t it? |
By comparison if you look at apt-get (which chocolatey seems to be compared to often) there are separate architecture packages any time you have a program that can run in parallel with it's alternate architecture counterpart. If a program is multi-arch you'd only need one package, but otherwise you get two, and if you need both you install both. |
How about a meta package that installs all arch versions available for your arch? Like, x86 for a 32bit OS and both x86 and x64 for a 64bit OS? This of course requires two separate packages for the archs too, so you can install them manually if desired. On another note, there are cases where you'd very rarely want both versions installed at the same time and defaulting to installing both could be unnecessary there. |
I kinda think that should be up to the package maintainer. If you're going to post a package you should take the architecture In the case of Java I agree a meta package would be handy.
|
The way I see it, the vast majority of packages are not really meant to have multiple versions installed simultaneously. Most things you'd want to install in parallel (like Python 2 / Python 3 and Java 7 / Java 8) are already in separate packages, anyway. For those that aren't, maybe The current behavior breaks file assocations (unless you remember to associate files with the shim instead of the application itself, but then all files get the generic Chocolatey icon no matter what program they're assocated with), Explorer integration, and pretty much every other level of integration (other than the shims) with every update. Atom, for example, has a context menu option to Edit with Atom, but I never know what version of Atom will open when I use it. Usually it uses the oldest version available. |
This is a non-starter as the c# version does not display the behavior of multiple versions installed. Or in other words, this is already fixed for choco.exe. ;) |
If you watch the video here, I circle the ability to add the old behavior - https://www.youtube.com/watch?v=sm_U53sxt2c |
👍 |
Neither
How it looks with a new client currently? Is it still planned to release before the end of 2014? |
If I cup package, it will leave behind the previous package lib.
The issue I believe is that we don't want to remove all previous versions on an upgrade, but rather the single previous by default. Let me walk through some scenarios-
example:
cinst ruby -version 1.8.7
cinst ruby -version 1.9.3
cup ruby
I should have ruby 1.8.7 and
ruby 2.0 after running cup.
Do you guys agree with that logic?
If I wanted all three versions, I would need to do a cinst ruby -version 2.0 otherwise it would say it was already installed.
Right now, update doesn't take a source and target version.
I should be able to do something like
cup ruby 2.0 -bump 1.8.7
if I wanted to purge 1.8.7 and install 2.0:
or
cup ruby 2.0 -bump all
if i only wanted 2.0 and purge 1.8.7 and 1.9.3
The text was updated successfully, but these errors were encountered: