Use distro agnostic way of install/update packages

Bug #785570 reported by Garrett Holmstrom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Won't Fix
Wishlist
Unassigned

Bug Description

CloudConfig.install_packages and CloudConfig.update_package_sources could both be made more distro-agnostic by calling PackageKit's pkcon program instead of apt-get. It should be a drop-in replacement like so:

apt-get upgrade -> pkcon upgrade
apt-get install -> pkcon install
apt-get update -> pkcon refresh

AFAICT, pkcon's "-y" option is equivalent to passing "--force-confdef", "--force-confold" and "--assume-yes" to the appropriate programs. Passing "-p" to pkcon makes its output suitable for logging. Unfortunately there doesn't seem to be an option to silence its output completely, but its stdout could always be dropped.

Scott Moser (smoser)
Changed in cloud-init:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Garrett Holmstrom (gholms) wrote :

An alternative to this is to instead come up with a common interface that package manager-specific backends can implement. There was a short IRC discussion about that, but so far nothing has happened toward that end.

Scott Moser (smoser)
summary: - Use pkcon instead of apt-get in lib methods
+ Use distro agnostic way of install/update packages
Revision history for this message
Joshua Harlow (harlowja) wrote :

This might be a good top-level function for the distro class in 0.7.0 (using pkcon)

Revision history for this message
James Falcon (falcojr) wrote :

Distros now implement their own method of installing packages. There are no plans to change this.

Changed in cloud-init:
status: Triaged → Won't Fix
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.