Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the difference between InstallPackage and UpdatePackage, exactly? #52

Open
fingolfin opened this issue Apr 10, 2020 · 1 comment
Labels
question Further information is requested

Comments

@fingolfin
Copy link
Member

One (accidental?) difference is that in the manual, the first argument is once called string and once name ;-).

I think the manual should spell this out. I didn't look at the code on purpose, and also didn't try to figure it out from the manual (I feel the text there doesn't allow me to decide this conclusively anyway); but my guess based on a cursive reading and the names would be that for packages installed from archive, UpdatePackage is basically doing the same as InstallPackage, except it removes any older version(s) after installing the latest. Is that right?

@mtorpey mtorpey added the question Further information is requested label May 26, 2021
@mtorpey
Copy link
Collaborator

mtorpey commented Aug 30, 2024

I think there's no good reason to have both. Install offers to update if the package already exists, and Update offers to install if it doesn't. The two functions call each other in these edge cases, but this isn't an ideal design. The only difference is interactivity and defaults.

Probably some broader refactoring would include making these two functions synonyms.

@mtorpey mtorpey closed this as completed Aug 30, 2024
@mtorpey mtorpey reopened this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants