Opened 8 years ago

Last modified 7 years ago

#10835 new enhancement

Package system does not warn on downgrading packages

Reported by: waddlesplash Owned by: nobody
Priority: normal Milestone: R1
Component: Applications/Command Line Tools Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #11754
Platform: All


While testing some stuff related to #10278, I found that if you have a newer version of a package installed than is available from the repo (e.g. I have hrev47221 installed but only hrev47215 is available) it will simply continue without confirming.

I think the correct thing to do here would be to require a specific command line argument (e.g. --force) to downgrade any package version, and perhaps something more than that for the base system packages.

Change History (6)

comment:1 by bonefish, 8 years ago

Can you be a bit more specific what you did exactly?

comment:2 by waddlesplash, 8 years ago

Something like this:

pkgman add-repo
pkgman refresh
pkgman full-sync

...the final command shows the actions that will occur as "<removing *hrev47221* packages> and <installing *hrev47151* packages*>" or something like that.

comment:3 by bonefish, 8 years ago

And you don't get asked whether you want to perform the changes (without the -y switch)?

Regarding a --force option, there isn't really any need for that, since the whole point of full-sync is to allow package downgrades and removals, which update doesn't do. IOW full-sync is what update --force would do.

Regarding listing the changes in more categories than just "removing" and "installing", that certainly can be done. IIRC openSUSE`s zypper has categories "upgrade", "downgrade", "vendor change", "architecture change", "remove", "install".

comment:4 by waddlesplash, 8 years ago

I do get asked, but still -- not many people expect the package manager will downgrade packages without telling you.

Ah, I see -- running "update" says "Nothing to do." That's much more acceptable. Perhaps a warning note on the output of "pkgman --help" on "full-sync" would be appropriate?

And yes, those categories sound much better than just "remove" and "install".

comment:5 by bonefish, 8 years ago

Component: Kits/Package KitApplications/Command Line Tools
Owner: changed from bonefish to nobody
Type: bugenhancement

pkgman full-sync --help already says that packages may be downgraded or removed. The command overview pkgman --help gives does not, but I wouldn't add more text there and I think the wording makes it clear that this operation is not an update (in zypper the command is named dist-upgrade, which I intentionally deviated from, since I don't find it very helpful in conveying that information).

Anyway, changing the ticket type to enhancement for the more detailed categories.

comment:6 by anevilyak, 7 years ago

Blocking: 11754 added
Note: See TracTickets for help on using tickets.