[issue40914] tarfile creates output that appears to omit files

2020-06-08 Thread Michael Richardson


Change by Michael Richardson :


--
versions: +Python 3.7

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



[issue40914] tarfile creates output that appears to omit files

2020-06-08 Thread Michael Richardson


New submission from Michael Richardson :

The simplest tarcopy program seems to result in output that GNU tar, bsdtar, 
and even Emacs tar-mode is unable to correctly process.
It appears that the resulting tar file is missing files, but examination of the 
raw output shows they might be there, but just corrupt.
GNU tar actually complains while reading the file.
   https://github.com/mcr/python3-tar-copy-failure

has a test case.  Here is the stupid code to reproduce it:

import tarfile
out = tarfile.open(name="./t2.tar", mode="w", format=tarfile.PAX_FORMAT)
with tarfile.open("./t1.tar") as tar:
for file in tar.getmembers():
print (file.name)
out.addfile(file)
out.close()

This has been confirmed on python 3.6.9 (Ubuntu 18.04 LTS), and python 3.7.3 
(Devuan Beowulf).  It seems to omit different files on 32-bit and 64-bit 
systems.

--
components: Library (Lib)
messages: 371045
nosy: mcr314
priority: normal
severity: normal
status: open
title: tarfile creates output that appears to omit files
type: behavior
versions: Python 3.6

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