tests/boot_linux_console: Let extract_from_deb handle various compressions
commit6c1c4c33b58b003a562de58cb1731b29614a9446
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Tue, 12 Mar 2019 23:45:40 +0000 (13 00:45 +0100)
committerEduardo Habkost <ehabkost@redhat.com>
Tue, 11 Jun 2019 17:13:00 +0000 (11 14:13 -0300)
tree931a5b375bad8bccd0040edd1e84c6e6485ad318
parent219dca61ebf41625831d4f96a720852baf44b762
tests/boot_linux_console: Let extract_from_deb handle various compressions

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