[issue11879] TarFile.chown: should use TarInfo.uid if user lookup fails

2011-04-23 Thread Michael Gold
Michael Gold added the comment: The tests passed on Linux (with Python 3.2 under fakeroot): Ran 240 tests in 9.613s OK But I don't see any tests that check the uid/gid of extracted files. -- nosy: +mgold ___ Python tracker <http://bugs.py

[issue11899] TarFile.gettarinfo modifies self.inodes

2011-04-23 Thread Michael Gold
Michael Gold added the comment: No, I don't have a working implementation. (I basically reimplemented TarFile.inodes to work around this; I was using TarFile.dereference, so I already had to do the hard-linking manually.) -- nosy: +

[issue11899] TarFile.gettarinfo modifies self.inodes

2011-04-21 Thread Michael Gold
Michael Gold added the comment: Actually, TarFile should also have a separate method to take a TarInfo instance and modify its type to LNKTYPE if applicable. gettarinfo can call that. This way the user can use a TarInfo object created before any files are added, and can easily get this

[issue11899] TarFile.gettarinfo modifies self.inodes

2011-04-21 Thread Michael Gold
New submission from Michael Gold : When I call tar.gettarinfo (where tar is a TarFile instance), the inode information is inserted into tar.inodes. If I later call tar.gettarinfo on a linked file, the returned TarInfo will have type LNKTYPE. I think it's incorrect to store this inform

[issue11879] TarFile.chown: should use TarInfo.uid if user lookup fails

2011-04-19 Thread Michael Gold
New submission from Michael Gold : In TarFile.chown, if the lookup u = pwd.getpwnam(tarinfo.uname)[2] fails, this line is used: u = pwd.getpwuid(tarinfo.uid)[2] This will fail if the uid isn't in /etc/passwd. I think "u = tarinfo.uid" would make more sense. This fallbac