From d0de4c280a30d5e53f5db07d7b095347a35691c1 Mon Sep 17 00:00:00 2001 From: David Shea Date: Thu, 25 Jun 2015 11:49:54 -0400 Subject: [PATCH] Fix install-requires and install-buildrequires dnf, unlike yum, fails if asked to install a package that does not exist. Filter the package lists before passing them to dnf. --- Makefile.am | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3ff721f2dcd..b2cef40f4d2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -109,17 +109,23 @@ bumpver: po-pull # Install all packages specified as BuildRequires in the Anaconda specfile # -> installs packages needed to build Anaconda +# don't try to install s390utils-devel on non-s390 arches install-buildrequires: srcdir="$(srcdir)" && \ : $${srcdir:=.} && \ - dnf install $$(grep ^BuildRequires: $${srcdir}/anaconda.spec.in | cut -d ' ' -f 2) + pkglist="$$(grep ^BuildRequires: $${srcdir}/anaconda.spec.in | cut -d ' ' -f 2)" && \ + if ! [[ $$(uname -m) =~ s390x? ]]; then \ + pkglist=$$(echo "$$pkglist" | grep -v s390utils) ; \ + fi ; \ + dnf install $$pkglist # Install all packages specified as Requires in the Anaconda specfile # -> installs packages needed to run Anaconda and the Anaconda unit tests +# Filter out the %{name} entries required by -devel install-requires: srcdir="$(srcdir)" && \ : $${srcdir:=.} && \ - dnf install $$(grep ^Requires: $${srcdir}/anaconda.spec.in | cut -d ' ' -f 2 | grep -v ^anaconda) + dnf install $$(grep ^Requires: $${srcdir}/anaconda.spec.in | grep -v %{name} | cut -d ' ' -f 2 | grep -v ^anaconda) # Generate an updates.img based on the changed files since the release # was tagged. Updates are copied to ./updates-img and then the image is