diff mbox

[xfstests-bld] gen-image: exclude packages for other architectures

Message ID 20180404001512.81876-1-ebiggers@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Biggers April 4, 2018, 12:15 a.m. UTC
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.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 kvm-xfstests/test-appliance/gen-image | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Eric Biggers April 16, 2018, 10:08 p.m. UTC | #1
On Tue, Apr 03, 2018 at 05:15:12PM -0700, Eric Biggers wrote:
> 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.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  kvm-xfstests/test-appliance/gen-image | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kvm-xfstests/test-appliance/gen-image b/kvm-xfstests/test-appliance/gen-image
> index 8d4bebb..2755cb5 100755
> --- a/kvm-xfstests/test-appliance/gen-image
> +++ b/kvm-xfstests/test-appliance/gen-image
> @@ -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)"
> -- 
> 2.17.0.484.g0c8726318c-goog
> 

Ping.
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o April 17, 2018, 4:10 p.m. UTC | #2
Applied, thanks.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/kvm-xfstests/test-appliance/gen-image b/kvm-xfstests/test-appliance/gen-image
index 8d4bebb..2755cb5 100755
--- a/kvm-xfstests/test-appliance/gen-image
+++ b/kvm-xfstests/test-appliance/gen-image
@@ -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)"