New submission from Michael Vogt:
Please consider adding a option to extract a tarfile with the uid/gid instead
of the lookup for uname/gname in the tarheader (i.e. what tar --numeric-owner
provides).
One use-case is if you unpack a chroot tarfile that contains a
/etc/{passwd,group} file with different uid/gid for user/groups like zope that
may be present in both host and chroot but have different numbers. With the
current approach files owned by this user will get the host uid/gid instead of
the uid/gid of the chroot.
Attached is a patch to outline what I have in mind - if there is a chance that
this patch goes in I'm happy to write the required test (mocking os.chown())
for this to go in.
Thanks for your consideration,
Michael
----------
components: Library (Lib)
files: tarfile-numeric-owner.diff
keywords: patch
messages: 233663
nosy: mvo
priority: normal
severity: normal
status: open
title: Please support "numeric_owner" in tarfile
type: enhancement
Added file: http://bugs.python.org/file37645/tarfile-numeric-owner.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23193>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com