qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org, Cleber Rosa <crosa@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>,
	"Aleksandar Rikalo" <arikalo@wavecomp.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [Qemu-devel] [PULL 1/6] tests/boot_linux_console: Let extract_from_deb handle various compressions
Date: Tue, 11 Jun 2019 14:14:51 -0300	[thread overview]
Message-ID: <20190611171456.23444-2-ehabkost@redhat.com> (raw)
In-Reply-To: <20190611171456.23444-1-ehabkost@redhat.com>

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Debian binary package format supports various compressions.

Per man deb(5):

  NAME
    deb - Debian binary package format

  FORMAT
    ...
    The third, last required member is named data.tar.  It contains the
    filesystem as a tar archive, either not compressed (supported since
    dpkg 1.10.24), or compressed with gzip (with .gz extension),
    xz (with .xz extension, supported since dpkg 1.15.6),
    bzip2 (with .bz2 extension, supported since dpkg 1.10.24) or
    lzma (with .lzma extension, supported since dpkg 1.13.25).

List the archive files to have the 3rd name with the correct extension.

The function avocado.utils.archive.extract() will handle the different
compression format for us.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190312234541.2887-2-philmd@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 tests/acceptance/boot_linux_console.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index d5c500ea30..6aa084e049 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -55,8 +55,9 @@ class BootLinuxConsole(Test):
         """
         cwd = os.getcwd()
         os.chdir(self.workdir)
-        process.run("ar x %s data.tar.gz" % deb)
-        archive.extract("data.tar.gz", self.workdir)
+        file_path = process.run("ar t %s" % deb).stdout_text.split()[2]
+        process.run("ar x %s %s" % (deb, file_path))
+        archive.extract(file_path, self.workdir)
         os.chdir(cwd)
         return self.workdir + path
 
-- 
2.18.0.rc1.1.g3f1ff2140



  reply	other threads:[~2019-06-11 17:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 17:14 [Qemu-devel] [PULL 0/6] Python queue, 2019-06-11 Eduardo Habkost
2019-06-11 17:14 ` Eduardo Habkost [this message]
2019-06-11 17:14 ` [Qemu-devel] [PULL 2/6] BootLinuxConsoleTest: Do not log empty lines Eduardo Habkost
2019-06-11 17:14 ` [Qemu-devel] [PULL 3/6] BootLinuxConsoleTest: Test the SmartFusion2 board Eduardo Habkost
2019-06-11 17:14 ` [Qemu-devel] [PULL 4/6] BootLinuxConsoleTest: Test nanoMIPS kernels on the I7200 CPU Eduardo Habkost
2019-06-11 17:14 ` [Qemu-devel] [PULL 5/6] BootLinuxConsoleTest: Run kerneltests BusyBox on Malta Eduardo Habkost
2019-06-11 17:14 ` [Qemu-devel] [PULL 6/6] travis: Make check-acceptance job more verbose Eduardo Habkost
2019-06-12 20:49   ` Philippe Mathieu-Daudé
2019-06-12 20:52     ` Eduardo Habkost
2019-06-12 22:33       ` Philippe Mathieu-Daudé
2019-06-12 22:47     ` Cleber Rosa
2019-06-12 23:12       ` Philippe Mathieu-Daudé
2019-06-12 12:49 ` [Qemu-devel] [PULL 0/6] Python queue, 2019-06-11 Peter Maydell
2019-06-18 13:27 ` Peter Maydell
2019-06-18 14:01   ` Cleber Rosa
2019-06-18 15:38     ` Cleber Rosa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190611171456.23444-2-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=crosa@redhat.com \
    --cc=fam@euphon.net \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).