Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

parts uninstall always tries to uninstall the latest available version regardless of it is installed #18

Closed
nesl247 opened this issue Feb 7, 2014 · 8 comments
Labels

Comments

@nesl247
Copy link

nesl247 commented Feb 7, 2014

parts uninstall always tries to uninstall the latest available version, instead of the versions that are installed.

For instance, I did a parts install php5 in order to upgrade it to the -2 release. This means I now have php5-5.5.8-1 and php5-5.5.8-2 installed. If I execute a parts uninstall php5, it will always attempt to uninstall the -2 release. I can execute the uninstall a million times, and it always looks as if it is uninstalling the package.

@dignifiedquire
Copy link

I suggest making it possible to specify the version like this parts uninstall php5@5.5.8-1 and if none given defaulting to the latest installed version.

@ksimuk
Copy link
Member

ksimuk commented Feb 7, 2014

the issue is clear, parts don't contain information about previous installed versions, will think how implement that better.

@joelmoss
Copy link

joelmoss commented Feb 7, 2014

We should make parts aware of all installed versions, and on uninstall show all installed versions and allow the user to choose which version to uninstall, or all versions. That's how Ruby Gems does it.

@nesl247
Copy link
Author

nesl247 commented Feb 7, 2014

Curious, is there any time where you'd actually want to or even be able to successfully run multiple versions of a part? I would think that if there was a reason to run multiple versions, it might be something like python2 and python3, not python-2.6 and python-2.7.

@joelmoss
Copy link

joelmoss commented Feb 7, 2014

That's what version managers are for, like NVM or rbenv, but parts is not designed for that.

@nesl247
Copy link
Author

nesl247 commented Feb 7, 2014

If I get what you are saying, then shouldn't the install and upgrade commands automatically remove the previous version, i.e. only allow one version to be installed? Or did I misunderstand you?

@joelmoss
Copy link

joelmoss commented Feb 7, 2014

Hmm, maybe. Would that be what you would expect?

@nesl247
Copy link
Author

nesl247 commented Feb 7, 2014

--- Removed Original Comment ---
I had misread what you wrote. I read it as "what would you expect" instead of "would that be what you would expect".

To answer your question, yes, I would expect the install and upgrade commands to automatically remove previous versions of a part/package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants