]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu-extract-sdk: support tar.xz format
authorDennis Menschel <menschel-d@posteo.de>
Wed, 13 Jun 2018 18:28:15 +0000 (20:28 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Jun 2018 09:59:33 +0000 (10:59 +0100)
As the format "tar.xz" is included in the IMAGE_TYPES bitbake variable
as defined in meta/classes/image_types.bbclass, it should also be
possible to extract a rootfs that has been built using that format.

Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu-extract-sdk

index f4286efb1f728facfed9977ce259a029c67bd7f9..13e02fa2ca3011cae53ed443e798d6cf6df7b143 100755 (executable)
@@ -53,6 +53,9 @@ if [[ ${SDK_ROOTFS_DIR:0:1} != "/" ]]; then
 fi
 
 TAR_OPTS=""
+if [[ "$ROOTFS_TARBALL" =~ tar\.xz$ ]]; then
+       TAR_OPTS="--numeric-owner -xJf"
+fi
 if [[ "$ROOTFS_TARBALL" =~ tar\.bz2$ ]]; then
        TAR_OPTS="--numeric-owner -xjf"
 fi
@@ -64,7 +67,7 @@ if [[ "$ROOTFS_TARBALL" =~ \.tar$ ]]; then
 fi
 if [ -z "$TAR_OPTS" ]; then
        echo "Error: Unable to determine sdk tarball format"
-       echo "Accepted types: .tar / .tar.gz / .tar.bz2"
+       echo "Accepted types: .tar / .tar.gz / .tar.bz2 / .tar.xz"
        exit 1
 fi