Garrett Holmstrom 2017-06-21 15:00:48 -07:00
parent 724a45640a
commit 7fd3480596
2 changed files with 19 additions and 14 deletions

View File

@ -1,8 +1,8 @@
diff --git a/cloudinit/distros/rhel.py b/cloudinit/distros/rhel.py Index: cloud-init-0.7.9/cloudinit/distros/rhel.py
index aa55838..0d47693 100644 ===================================================================
--- a/cloudinit/distros/rhel.py --- cloud-init-0.7.9.orig/cloudinit/distros/rhel.py
+++ b/cloudinit/distros/rhel.py +++ cloud-init-0.7.9/cloudinit/distros/rhel.py
@@ -190,13 +190,17 @@ class Distro(distros.Distro): @@ -190,13 +190,18 @@ class Distro(distros.Distro):
if pkgs is None: if pkgs is None:
pkgs = [] pkgs = []
@ -13,15 +13,16 @@ index aa55838..0d47693 100644
- # installed; yum won't error out complaining that baz is already - # installed; yum won't error out complaining that baz is already
- # installed. - # installed.
- cmd.append("-t") - cmd.append("-t")
+ if os.path.isfile('/usr/bin/dnf'): + if util.which('dnf'):
+ LOG.debug('Using dnf for package management') + LOG.debug('Using DNF for package management')
+ cmd = ['dnf'] + cmd = ['dnf']
+ else: + else:
+ LOG.debug('Using yum for package management') + LOG.debug('Using YUM for package management')
+ # If enabled, then yum will be tolerant of errors on the command line + # the '-t' argument makes yum tolerant of errors on the command
+ # with regard to packages. + # line with regard to packages.
+ # For example: if you request to install foo, bar and baz and baz is + #
+ # installed; yum won't error out complaining that baz is already + # For example: if you request to install foo, bar and baz and baz
+ # is installed; yum won't error out complaining that baz is already
+ # installed. + # installed.
+ cmd = ['yum', '-t'] + cmd = ['yum', '-t']
# Determines whether or not yum prompts for confirmation # Determines whether or not yum prompts for confirmation

View File

@ -1,6 +1,6 @@
Name: cloud-init Name: cloud-init
Version: 0.7.9 Version: 0.7.9
Release: 5%{?dist} Release: 6%{?dist}
Summary: Cloud instance init scripts Summary: Cloud instance init scripts
License: GPLv3 License: GPLv3
URL: http://launchpad.net/cloud-init URL: http://launchpad.net/cloud-init
@ -24,7 +24,8 @@ Patch3: cloud-init-0.7.9-ecdsa.patch
# Use dnf instead of yum when available # Use dnf instead of yum when available
# https://bugzilla.redhat.com/show_bug.cgi?id=1194451 # https://bugzilla.redhat.com/show_bug.cgi?id=1194451
Patch7: cloud-init-0.7.8-dnf.patch # https://git.launchpad.net/cloud-init/commit/?id=a3daf184fd47dede8d91588281437453bd38fc1c
Patch7: cloud-init-0.7.9-dnf.patch
# Skip apt-source tests that are sensitive to the system's hostname # Skip apt-source tests that are sensitive to the system's hostname
# https://bugs.launchpad.net/cloud-init/+bug/1629149 # https://bugs.launchpad.net/cloud-init/+bug/1629149
@ -228,6 +229,9 @@ nosetests-%{python3_version} tests/unittests/
%changelog %changelog
* Wed Jun 21 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.9-6
- Fixed NameError in package module [RH:1447708]
* Fri Apr 14 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.9-5 * Fri Apr 14 2017 Garrett Holmstrom <gholms@fedoraproject.org> - 0.7.9-5
- Made DigitalOcean DNS server handling consistent with OpenStack [RH:1442463, LP:1675571] - Made DigitalOcean DNS server handling consistent with OpenStack [RH:1442463, LP:1675571]
- Improved handling of multiple NICs on DigitalOcean [RH:1442463] - Improved handling of multiple NICs on DigitalOcean [RH:1442463]