Open catherdersoftware opened 7 months ago
Of the package managers that I've used, update
and upgrade
have a different meaning.
For brew:
brew update and brew upgrade are different. Update is for Homebrew itself. Upgrade is for individual software packages.
Apt-get is similar I believe.
With that said, adding support for update
is a good idea. @DevonianTeuchter @MikeFultonDev @HarithaIBM what do you think?
Right, understanding this bit further:
apt-get update
is used to gather the necessary information by updating the package index files on the system. The apt-get upgrade
program downloads and installs the most recent packages, replacing any earlier versions that were already on your system.
When you run the npm update
command, npm will check the dependencies listed in your package.json file and attempt to update them to the latest versions that satisfy the version constraints specified in the file. It will update the packages within their defined version range,
On the other hand, the npm upgrade
command behaves differently. It is designed to update packages to their latest available versions, disregarding any version constraints defined in the package.json file. When you run npm upgrade, npm will attempt to install the latest version of each package, even if it means updating to a newer major version. Unlike npm update, npm upgrade can install the latest major version of a package if it is available.
yum update
only updates the existing packages by replacing the old versions and no obsolete packages will be removed from the Linux system during an update operation.
yum upgrade
upgrades packages by removing the old ones, and removes obsolete packages from your Linux system including dependency and config files.
So update
is less aggressive in its actions compared to upgrade
! So, yes it is good to support update
too!
This was something originally supported and removed in favour of just having a single "update" verb at the request of others 🙂. It really depends on experience of other package managers as to which verb to use. A synonym is doable though might lead to complications (with --help etc where logic would be needed to determine which verb to display; there was an issue with install/update that highlighted this #metaport/51 )
I would like to add my support for a version of zopen that supports --update
that merely fetches the latest release information into a local index, and --upgrade
that actually performs the upgrade - similar to apt-get
. Using this, we could also improve the performance of zopen list
significantly by only comparing locally installed packages with the local index.
As we tend to speak of updates in our ecosystem, it would be helpful to support
update
as a synonym forupgrade
. Microsoftwinget
already has this feature.