cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #00985
Re: [Merge] lp:~harlowja/cloud-init/cloud-init-fix-dnf into lp:cloud-init
Diff comments:
> === modified file 'cloudinit/distros/rhel.py'
> --- cloudinit/distros/rhel.py 2016-06-15 23:11:24 +0000
> +++ cloudinit/distros/rhel.py 2016-07-01 00:07:56 +0000
> @@ -201,14 +203,22 @@
> if pkgs is None:
> pkgs = []
>
> - cmd = ['yum']
> - # If enabled, then yum will be tolerant of errors on the command 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
> - # installed.
> - cmd.append("-t")
> - # Determines whether or not yum prompts for confirmation
> + if (os.path.isfile('/usr/bin/dnf') or
Switching to that, forgot about that...
> + self._cfg.get('force_dnf', False)):
> + LOG.debug('Using DNF for package management')
> + cmd = ['dnf']
> + else:
Ya, let's not bother with this and just use dnf.
> + LOG.debug('Using YUM for package management')
> + cmd = ['yum']
> + # If enabled, then yum will be tolerant of errors on the command
> + # 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 installed.
> + cmd.append("-t")
> +
> + # Determines whether or not yum/dnf prompts for confirmation
> # of critical actions. We don't want to prompt...
> cmd.append("-y")
>
--
https://code.launchpad.net/~harlowja/cloud-init/cloud-init-fix-dnf/+merge/298851
Your team cloud init development team is requested to review the proposed merge of lp:~harlowja/cloud-init/cloud-init-fix-dnf into lp:cloud-init.
References