dom0-updates: prefer yum-deprecated over dnf
Some of the reasons:
- dnf doesn't support --downloaddir option
- dnf doesn't support `copy_local` repo option (used in automated tests
only)
- dnf is horribly slow, especially without cache fetched
(https://bugzilla.redhat.com/show_bug.cgi?id=1227014)
This is all needed (instead of simply using `yum` command), because
Fedora >= 22 have an command redirection `yum`->`dnf`.
QubesOS/qubes-issues#1282
(cherry picked from commit d44c8acdeb
)
This commit is contained in:
parent
569bdeffdd
commit
cdcab08477
|
@ -104,9 +104,12 @@ if [ "$DOIT" != "1" -a "$PKGS_FROM_CMDLINE" != "1" ]; then
|
|||
fi
|
||||
|
||||
YUM_COMMAND="fakeroot yum $YUM_ACTION -y --downloadonly --downloaddir=$DOM0_UPDATES_DIR/packages"
|
||||
# prefer yum-deprecated over dnf, because of still missing features in dnf (at least --downloaddir)
|
||||
if type dnf >/dev/null 2>&1 && type yum-deprecated >/dev/null 2>&1; then
|
||||
YUM_COMMAND="fakeroot yum-deprecated $YUM_ACTION -y --downloadonly --downloaddir=$DOM0_UPDATES_DIR/packages"
|
||||
# check for --downloadonly option - if not supported (Debian), fallback to
|
||||
# yumdownloader
|
||||
if ! yum --help | grep -q downloadonly; then
|
||||
elif ! yum --help | grep -q downloadonly; then
|
||||
if [ "$YUM_ACTION" != "install" -a "$YUM_ACTION" != "upgrade" ]; then
|
||||
echo "ERROR: yum version installed in VM `hostname` does not suppport --downloadonly option" >&2
|
||||
echo "ERROR: only 'install' and 'upgrade' actions supported ($YUM_ACTION not)" >&2
|
||||
|
|
Loading…
Reference in New Issue
Block a user