willeccles / cpm

🌵 A wrapper for package managers to make them consistent for those of us who are lazy.
MIT License
69 stars 13 forks source link

Fedora 36: update and upgrade do the same thing #60

Closed lfom closed 2 years ago

lfom commented 2 years ago

Hi, there.

Thanks for creating and maintaining cpm, it is a nice and useful tool!

On Fedora 36, the result of cpm update and cpm upgrade are the same. I use zsh with oh-my-zshell, and it shows a red prompt when the previous command resulted in an error (and green if everything is fine), and it seems that dnf check-update exits with some error code when there are updates available, so the second part of cpm upgrade after the && will not run:

https://github.com/willeccles/cpm/blob/40a9fbe1ce4efaca11c524d6fcc45d1116827949/cpm#L252

Regards

willeccles commented 2 years ago

Thanks for reporting this. A quick look at the DNF manual shows that dnf upgrade does both update and upgrade, and there is no DNF equivalent for update. The use of check-update seems to have been erroneous in the first place. I will implement a fix for this in a little bit.

lfom commented 2 years ago

@willeccles Actually I think check-update can be used, please see:

https://docs.fedoraproject.org/en-US/quick-docs/dnf/

willeccles commented 2 years ago

Check-update does not update a list of packages according to the documentation--it purely checks whether or not updates are available. As other package managers use update to update a repository listing, it would be misleading if update had a totally different meaning for one package manager.

lfom commented 2 years ago

@willeccles OK, but the result is something similar to apt update or pacman -Sy, isn´t it? It shows the packages that can be updated. Maybe the syncing is different, but IMHO a command that only shows the updates available using dnf is still desirable...

willeccles commented 2 years ago

I'm not sure. The result is only an informative output, while apt and others actually acquire a list. However, I am not a fedora user, so I will trust your judgement on this one. Go ahead and open a PR.

On Thu, Jun 30, 2022 at 20:39 lfom @.***> wrote:

@willeccles https://github.com/willeccles OK, but the result is something similar to apt update or pacman -Sy, isn´t it? It shows the packages that can be updated. Maybe the syncing is different, but IMHO a command that only shows the updates available using dnf is still desirable...

— Reply to this email directly, view it on GitHub https://github.com/willeccles/cpm/issues/60#issuecomment-1171803817, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZUKMO5L2GCKI7UAEWNCFLVRY457ANCNFSM52AQMVVA . You are receiving this because you were mentioned.Message ID: @.***>