Opened 10 years ago

Closed 2 years ago

#10835 closed enhancement (fixed)

Package system does not warn on downgrading packages

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

Description

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 (7)

comment:1 by bonefish, 10 years ago

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

comment:2 by waddlesplash, 10 years ago

Something like this:

pkgman add-repo http://www.haiku-files.org/haiku/master/repo/x86_gcc2/current
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, 10 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, 10 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, 10 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, 9 years ago

Blocking: 11754 added

comment:7 by waddlesplash, 2 years ago

Milestone: R1R1/beta4
Resolution: fixed
Status: newclosed

Done in hrev55858.

Note: See TracTickets for help on using tickets.