Bug#506861: python-debian: support data.tar.xz member

2014-01-14 Thread Jakub Wilk

* Stuart Prescott stu...@debian.org, 2012-06-29, 00:57:

+p = subprocess.Popen(['unxz', '--stdout'],
+  stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+  universal_newlines=False)
+fh2 = io.BytesIO(p.communicate(self.__member.read())[0])


What if unxz fails to decompress the file?

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#506861: python-debian: support data.tar.xz member

2013-11-28 Thread Miroslav Suchy

What is current status of this bug?

It cause problem to Spacewalk users as they can not upload recent Debian packages to Spacewalk, because python-debian 
does not recognize those files as Debian packages.


Mirek


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#506861: python-debian: support data.tar.xz member

2012-12-27 Thread Julien Cristau
On Sat, Dec 15, 2012 at 08:26:59 +0100, Guillem Jover wrote:

 Hi!
 
 On Fri, 2012-06-29 at 00:57:03 +0100, Stuart Prescott wrote:
  For python  3.3, the unxz utility from the xz-utils package is used to 
  decompress the member which is then fed into the python tarfile module as 
  would 
  be done for gz or bz2 members. This is crude but works fine. Perhaps python-
  debian and python3-debian (until python 3.3 at least) should Recommend xz-
  utils as a result. Perhaps better error handling around the subprocess 
  would 
  be advisable for the absence of unxz(1) on the system.
 
 I think this should really be fixed for wheezy, as there's an
 increasing number of .xz compressed binary packages in the archive
 already, not doing so will mean python-debian is not usable there.
 
Not true, python-debian has functionality that doesn't need to look at
debs at all.

Cheers,
Julien


signature.asc
Description: Digital signature


Bug#506861: python-debian: support data.tar.xz member

2012-12-27 Thread Guillem Jover
On Thu, 2012-12-27 at 16:59:15 +0100, Julien Cristau wrote:
 On Sat, Dec 15, 2012 at 08:26:59 +0100, Guillem Jover wrote:
  On Fri, 2012-06-29 at 00:57:03 +0100, Stuart Prescott wrote:
   For python  3.3, the unxz utility from the xz-utils package is used to 
   decompress the member which is then fed into the python tarfile module as 
   would 
   be done for gz or bz2 members. This is crude but works fine. Perhaps 
   python-
   debian and python3-debian (until python 3.3 at least) should Recommend xz-
   utils as a result. Perhaps better error handling around the subprocess 
   would 
   be advisable for the absence of unxz(1) on the system.
  
  I think this should really be fixed for wheezy, as there's an
  increasing number of .xz compressed binary packages in the archive
  already, not doing so will mean python-debian is not usable there.

 Not true, python-debian has functionality that doesn't need to look at
 debs at all.

Well, obviously, not usable when using those parts of python-debian.

Regards,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#506861: python-debian: support data.tar.xz member

2012-12-14 Thread Guillem Jover
Hi!

On Fri, 2012-06-29 at 00:57:03 +0100, Stuart Prescott wrote:
 For python  3.3, the unxz utility from the xz-utils package is used to 
 decompress the member which is then fed into the python tarfile module as 
 would 
 be done for gz or bz2 members. This is crude but works fine. Perhaps python-
 debian and python3-debian (until python 3.3 at least) should Recommend xz-
 utils as a result. Perhaps better error handling around the subprocess would 
 be advisable for the absence of unxz(1) on the system.

I think this should really be fixed for wheezy, as there's an
increasing number of .xz compressed binary packages in the archive
already, not doing so will mean python-debian is not usable there.

 diff --git a/lib/debian/debfile.py b/lib/debian/debfile.py
 index a728a77..84b88aa 100644
 --- a/lib/debian/debfile.py
 +++ b/lib/debian/debfile.py
 @@ -27,7 +28,7 @@ from debian.deb822 import Deb822
  
  DATA_PART = 'data.tar'  # w/o extension
  CTRL_PART = 'control.tar'
 -PART_EXTS = ['gz', 'bz2']   # possible extensions
 +PART_EXTS = ['gz', 'bz2', 'xz']   # possible extensions

I guess it would make sense to handle .lzma compressed members too, as
dpkg-deb has supported generating those up to now, they might be found
in the wild, although creating new such .debs has been deprecated, but
that still does not make existing packages disappear, so at least
dpkg-deb will continue supporting extraction for the forseeable future.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org