[issue6196] tarfile.extractall(readaccess=True)

2009-06-06 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: I close this issue then. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6196 ___

[issue6196] tarfile.extractall(readaccess=True)

2009-06-05 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: I am still not convinced why tarfile needs this kind of a work-around built in. We talk about a very small number of cases here and the generator_tools-0.3.5.tar.gz is really broken beyond repair. It is the only thing that should be fixed here

[issue6196] tarfile.extractall(readaccess=True)

2009-06-05 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: [Lars] (...) We talk about a very small number of cases here and the generator_tools-0.3.5.tar.gz is really broken beyond repair. It is the only thing that should be fixed here IMO ;-) Sure, that is what the pyopenssl folks did -

[issue6196] tarfile.extractall(readaccess=True)

2009-06-05 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: Sure, tarfile contains numerous work-arounds for quirky and buggy archives. Otherwise, it would not be usable in real-life. But we should not mix up different issues here. tarfile reads and extracts your generator_tools.tar just fine. Formally,

[issue6196] tarfile.extractall(readaccess=True)

2009-06-05 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: [Lars] Sure, there is some functionality in extractall() that addresses issues with inappropriate permissions, but without this functionality the archive would not even *extract* cleanly. That is very different from your problem.

[issue6196] tarfile.extractall(readaccess=True)

2009-06-04 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: Here's a test data from PyPI: http://pypi.python.org/packages/source/g/generator_tools/generator_tools-0.3.5.tar.gz -- ___ Python tracker rep...@bugs.python.org

[issue6196] tarfile.extractall(readaccess=True)

2009-06-04 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: Considering this bug where tarfile fails to set g+s, https://bugs.launchpad.net/pyopenssl/+bug/236190 a more general approach could be: tarfile.extractall(safe_perms=True) where if safe_perms is set, tarfile can 1) ignore

[issue6196] tarfile.extractall(readaccess=True)

2009-06-04 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: If a tarball has a-x perms set on its root directory, one cannot access its contents. $ tar zxf generator_tools-0.3.5.tar.gz. $ ls generator_tools-0.3.5/ ls: cannot access generator_tools-0.3.5/README.txt: Permission denied ...

[issue6196] tarfile.extractall(readaccess=True)

2009-06-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't see why the tarfile case should be different from the tar case. You can always chmod it later in python, too (with os.walk and os.chmod). Perhaps the real need is for a recursive chmod in shutil? -- nosy: +r.david.murray

[issue6196] tarfile.extractall(readaccess=True)

2009-06-04 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: [David] I don't see why the tarfile case should be different from the tar case. (...) As I explained, Viz: [quote]'(...)the very reason to write a program to extract tarball (instead of doing it manually) is to automate it .. which