Skip to contentSkip to conversation

gen-image: exclude packages for other architectures

PATCH Applied Eric Biggers 3 participants 3 messages Apr 4, 2018 – Apr 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gen-image: exclude packages for other architectures

Now that gen-image is run with '-e', it fails if the debs/ directory contains packages for multiple architectures. Fix it by installing just the packages for the needed architecture or for "all" architectures.

---
 kvm-xfstests/test-appliance/gen-image | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kvm-xfstests/test-appliance/gen-image +2 -1
index 8d4bebb..2755cb5 100755
@@ -283,7 +283,8 @@ if test -f "backport-packages-$SUITE" ; then
     fi
     rm -rf "$ROOTDIR/debootstrap"
 fi
-DEBS=$(find debs -name \*.deb)
+DEBIAN_ARCH="$(dpkg --print-architecture)"
+DEBS="$(find debs -name "*_${DEBIAN_ARCH}.deb" -o -name "*_all.deb")"
 if test -n "$DEBS"
 then
     run_in_chroot "dpkg --ignore-depends=e2fsprogs --auto-deconfigure -i $(echo $DEBS)"
Signature · 1 line
2.17.0.484.g0c8726318c-goog
#1 lore raw
Quoted 26 lines · Eric Biggers

Now that gen-image is run with '-e', it fails if the debs/ directory contains packages for multiple architectures. Fix it by installing just the packages for the needed architecture or for "all" architectures.

---
 kvm-xfstests/test-appliance/gen-image | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kvm-xfstests/test-appliance/gen-image +2 -1
index 8d4bebb..2755cb5 100755
@@ -283,7 +283,8 @@ if test -f "backport-packages-$SUITE" ; then
     fi
     rm -rf "$ROOTDIR/debootstrap"
 fi
-DEBS=$(find debs -name \*.deb)
+DEBIAN_ARCH="$(dpkg --print-architecture)"
+DEBS="$(find debs -name "*_${DEBIAN_ARCH}.deb" -o -name "*_all.deb")"
 if test -n "$DEBS"
 then
     run_in_chroot "dpkg --ignore-depends=e2fsprogs --auto-deconfigure -i $(echo $DEBS)"
Signature · 1 line
2.17.0.484.g0c8726318c-goog

Ping.