Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement]: Allow downgrades on package installs #5861

Open
adam-vest opened this issue Nov 8, 2024 · 1 comment
Open

[enhancement]: Allow downgrades on package installs #5861

adam-vest opened this issue Nov 8, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@adam-vest
Copy link

Enhancement

Hi there! So I'm working with a situation where I'm enabling a PPA, setting pin priority (manually), and attempting to install packages from it. These are seen by apt to be downgrade actions, and as a result, apt functions will fail (package_upgrade, packages, etc):

E: Packages were downgraded and -y was used without --allow-downgrades.
2024-11-08 20:38:41,119 - util.py[WARNING]: Package upgrade failed

With apt, as the message states, the --allow-downgrades flag needs to be present when -y is also used. I believe dnf/yum will just happily proceed with the downgrade if that's what it thinks is best, though I could be wrong there.

It would be nice to have an option to allow this scenario to happen. Maybe something on the same level as package_upgrade, like allow_package_downgrade? With this bool set to true, it would append that --allow-downgrades flag to all apt commands (and an equivalent if necessary for dnf/yum)? Right now I'm working around it by running those commands in runcmd statements, but it would be nice to use the more native built-ins for this.

Thank you for your time and consideration!

@adam-vest adam-vest added enhancement New feature or request new An issue that still needs triage labels Nov 8, 2024
@a-dubs
Copy link
Collaborator

a-dubs commented Dec 4, 2024

@adam-vest Thanks for this other feature request! I appreciate the user story you have provided as well as the info around the cloud-config you have been using to work around the lack of this feature. 😄

@a-dubs a-dubs removed the new An issue that still needs triage label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants