Open fingolfin opened 4 years ago
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.
One (accidental?) difference is that in the manual, the first argument is once called
string
and oncename
;-).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 asInstallPackage
, except it removes any older version(s) after installing the latest. Is that right?