From: Daniel Mach <dmach(a)redhat.com>
Otherwise it's hard to say what gets downloaded.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
scripts/buildinstall | 2 +-
scripts/buildinstall.functions | 16 ++++++++++++++++
scripts/mk-images | 2 +-
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/scripts/buildinstall b/scripts/buildinstall
index ae28ccb..d495d99 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -205,7 +205,7 @@ else
# BUILDARCH != BASEARCH (e.g. i586 != i386, sparcv9 != sparc)
BASEARCH=`python -c "import rpmUtils.arch; \
print rpmUtils.arch.getBaseArch(myarch=rpmUtils.arch.getCanonArch(skipRpmPlatform =
True));"`
- yumdownloader -c $yumconf anaconda || exit 1
+ yumdownloader -c $yumconf --archlist=$BUILDARCH anaconda || exit 1
rpm2cpio anaconda*rpm | cpio --quiet -iumd './usr*'
rm -f anaconda*rpm
popd
diff --git a/scripts/buildinstall.functions b/scripts/buildinstall.functions
index 5f5e258..abc159c 100755
--- a/scripts/buildinstall.functions
+++ b/scripts/buildinstall.functions
@@ -148,3 +148,19 @@ instDir() {
cp -a --parents $DIR $DESTROOT/
}
+getBuildArch() {
+ BUILDARCH=`repoquery -c $yumconf --qf '%{ARCH}\n' anaconda`
+ echo $BUILDARCH
+}
+
+getBaseArch() {
+ ARCH=$1
+ BASEARCH=`python -c "import rpmUtils.arch; print
rpmUtils.arch.getBaseArch(myarch='$ARCH');"`
+ echo $BASEARCH
+}
+
+getArchList() {
+ ARCH=$1
+ ARCHLIST=`python -c "import rpmUtils.arch; print
','.join(rpmUtils.arch.getArchList(thisarch='$ARCH'));"`
+ echo $ARCHLIST
+}
diff --git a/scripts/mk-images b/scripts/mk-images
index 43b6c6b..dd27cbd 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -1223,7 +1223,7 @@ for KERNELARCH in $arches; do
rm -f $kpackage
# expand out any available firmware too
for p in $(repoquery -c $yumconf '*firmware*') ; do
- yumdownloader -c $yumconf $p
+ yumdownloader -c $yumconf --archlist=`getArchList $BUILDARCH` $p
rpm2cpio *firmware*.rpm | (cd $KERNELROOT; cpio --quiet -iumd)
rm -f *firmware*.rpm
done
--
1.9.0