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

archlinux: fix package upgrade command handling #768

Merged
merged 2 commits into from Jan 12, 2021

Conversation

baod-rate
Copy link
Contributor

Proposed Commit Message

archlinux: fix package upgrade command handling

pacman uses `-u` instead of `upgrade` to trigger a system upgrade, fix
the command handling so this is properly accounted for. as is, the
resulting command attempts to install a (non-existent) `upgrade` package

Additional Context

Pretty straightforward. Arch's pacman uses -u instead of upgrade (see man 8 pacman). Without this change I get an error when package_upgrade: true:

Cloud-init v. 20.4 running 'single' at Tue, 12 Jan 2021 00:37:17 +0000. Up 3995.82 seconds.
:: Synchronizing package databases...
error: target not found: upgrade
 core is up to date
 extra is up to date
 community is up to date
2021-01-12 00:37:17,927 - util.py[WARNING]: Package upgrade failed
2021-01-12 00:37:17,928 - cc_package_update_upgrade_install.py[WARNING]: 1 failed with exceptions, re-raising the last one
2021-01-12 00:37:17,928 - util.py[WARNING]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) failed
2021-01-12 00:37:17,929 - main.py[WARNING]: Ran package-update-upgrade-install but it failed!

Test Steps

I think some tests for this would be good to avoid regressions but I'm pretty unfamiliar with cloud-init and moreso with the project's testing setup. Any help would be appreciated

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

baod-rate and others added 2 commits January 11, 2021 18:44
pacman uses `-u` instead of `upgrade` to trigger a system upgrade, fix
the command handling so this is properly accounted for. as is, the
resulting command attempts to install a (non-existent) `upgrade` package
@mitechie mitechie merged commit 2b2c7f3 into canonical:master Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants