Your message dated Mon, 21 Nov 2022 21:12:57 +1100
with message-id <5e2ce6e9-14ef-0cea-de32-a7b1b8456...@debian.org>
and subject line Re: Bug#1024469: 
lib/debian/tests/test_debfile.py::TestDebFile::test_control fails when tar(1) 
is not GNU tar
has caused the Debian Bug report #1024469,
regarding lib/debian/tests/test_debfile.py::TestDebFile::test_control fails 
when tar(1) is not GNU tar
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1024469: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024469
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python-debian
Version: 0.1.49

When tar(1) executable is a non-GNU implementation of tar (bsdtar from
libarchive here), test_control fails trying to pass unsupported `--
warning=no-timestamp` option:

```
=============================== FAILURES ===============================
_______________________ TestDebFile.test_control _______________________

self = <debian.tests.test_debfile.TestDebFile object at 0x7fcb65566aa0>
sample_deb = '/tmp/portage/dev-python/python-debian-
0.1.49/temp/test_debfile.cwjvb8xc/test.ar'

    @pytest.mark.skipif(not _dpkg_deb_path, reason="dpkg-deb not
installed")
    def test_control(self, sample_deb):
        # type: (str) -> None
        """ test for control contents equality """
        with os.popen("dpkg-deb -f %s" % sample_deb) as dpkg_deb:
            filecontrol = "".join(dpkg_deb.readlines())
    
        with debfile.DebFile(sample_deb) as deb:
            ctrl = deb.control.get_content("control")
            assert ctrl is not None
>           assert ctrl.decode("utf-8") == filecontrol

[... cut long diff between expcected and "" ...]
deb        = <debian.debfile.DebFile object at 0x7fcb654951b0>
dpkg_deb   = <os._wrap_close object at 0x7fcb65495660>
filecontrol = ''
sample_deb = '/tmp/portage/dev-python/python-debian-
0.1.49/temp/test_debfile.cwjvb8xc/test.ar'
self       = <debian.tests.test_debfile.TestDebFile object at
0x7fcb65566aa0>

lib/debian/tests/test_debfile.py:623: AssertionError
------------------------- Captured stderr call -------------------------
tar: Option --warning=no-timestamp is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
dpkg-deb: error: tar subprocess returned error exit status 1
```

This is Gentoo Linux/amd64 with libarchive-3.6.1.  GNU tar is available
as `gtar` if you really need it.  I suspect the same problem applies to
*BSD systems.

-- 
Best regards,
Michał Górny

--- End Message ---
--- Begin Message ---
Hi Michał

Thanks for the update.

On 21/11/2022 02:31, Michał Górny wrote:
Ah, I've just looked into dpkg and it seems to switch to `gtar`
invocation if such an executable is present.  So it failed only because
I haven't rebuilt dpkg after we've switched to installing GNU tar
as `gtar`.  In this case, there is nothing to be fixed in dpkg and we
just need to handle this on Gentoo end.

I didn't expect that to be a build-time option — curious.

I wonder if dpkg should fail to build if it finds a tar it can't use and no gtar to use instead. I suspect failing to build would be better than building something that doesn't work.

I'll close this bug for now, although I have a feeling that we might need to be able to handle non-functional dpkg-deb in various places much as we have been considering how to handle non-functional python-apt.

cheers
Stuart


--
Stuart Prescott    http://www.nanonanonano.net/   stu...@nanonanonano.net
Debian Developer   http://www.debian.org/         stu...@debian.org
GPG fingerprint    90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7

--- End Message ---
-- 
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-python-debian-maint

Reply via email to