tags 438603 + confirmed
thanks

On Sat, Aug 18, 2007 at 10:46:38AM +0200, Reinhard Tartler wrote:
> We already discussed this on the mailinglist, I think, but I'm filing

Uhm ... I don't remember the discussion ...

> find a buildlog attached.

Background: I use TarFile to access data.tar.gz and control.tar.gz which
are inside a .deb, considered as an ar archive.

It seems that in python2.5 they fixed a bug in the TarFile class; the
fix triggers a bug in DebFile.  What is actually changed from 2.4 to 2.5
is the name of file members of a tar(.gz) archive.

In Python 2.4:

  >>> d.control.tgz().getnames()
  ['./', 'control']

In Python 2.5:

  >>> d.control.tgz().getnames()
  ['./', './control']

More generally (i.e. for tar archives with more than 2 members, as it is
the case for data.tar.gz for example) it seems that the heading './'
string in 2.4 was only present on the first archive member (or maybe
only on directories? don't know ...), while now it is present in all
members.

The Python 2.5 implementation seems to be the right one, or at least it
agrees with "tar tzf":

  $ tar tzf control.tar.gz 
  ./
  ./control

The assumption that the './' was *not* there is used in various places
(mainly in DebFile methods which are just proxies to the appropriate
TarFile instance). The fix needs also to take into account that the
behaviour would be different if the module is used by Python pre-2.5 or
not :-(

I'll try to figure out a not-completely-awful solution for this ...

Cheers.

-- 
Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
[EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time

Attachment: signature.asc
Description: Digital signature

Reply via email to