[issue6054] tarfile normalizes arcname

2009-05-18 Thread mkv

New submission from mkv :

When creating tar archives using the tarfile module, requested arc names
are not respected. 

It is currently impossible to create a tar which when listing contents
would give:
$tar tvf test.tar
./
./control
./prerm
./postinst

The actual result will be
$tar tvf test.tar
./
control
prerm
postinst

This is caused by TarInfo's tobuf method calling normpath() on all file
names, even when the user has explicitly specified a certain name.

--
components: Library (Lib)
messages: 88033
nosy: mkv
severity: normal
status: open
title: tarfile normalizes arcname
type: behavior
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue6054>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6054] tarfile normalizes arcname

2009-05-21 Thread mkv

mkv  added the comment:

I'm creating a debian package (.deb) for a system which uses busybox's
dpkg. A deb is an ar-archive (not tar, unix ar) archive, which in turn
contains two tar archives. dpkg will first extract a tar archive called
control.tar.gz (or bz2) from the package, and from that tar it will
extract a file stored with the path "./control". 

The problem is that with the current implementation of tarfile it's
impossible to create a tar archive which would contain a file stored
with the path "./control". This means it's impossible to use tarfile to
create deb packages which would work with busybox' dpkg. 

I'm not 100% sure if that precise path is requirement of the deb file
format, or if it is because of how busybox' dpkg is implemented. However
I have not seen a packaging guide or a deb package which wouldn't have
the control file stored as ./control in the tar archive.

--

___
Python tracker 
<http://bugs.python.org/issue6054>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6054] tarfile normalizes arcname

2009-05-23 Thread mkv

mkv  added the comment:

Great, thanks for the speedy work :) 

Now if only issue4750 would get fixed for 2.7 as well ;)

--

___
Python tracker 
<http://bugs.python.org/issue6054>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com