Discussion:
[Erp5-dev] Warning: possible Mandriva 2007 python tarfile module bug
Ivan Tyagov
2006-11-20 15:38:44 UTC
Permalink
Hi,

For those using ERP5 with Mandriva 2007.

It's possible that if you try to upload a bt5 file to ERP5 instance you
will not get all of bt5 content uploaded and thus you'll not be able to
install the bt5 file correctly.

The problem lies probably in the system libraries used by python'
tarfile module.

The following test script (similar to one used for extracting .bt5 for
ERP5):
=================================
#!/usr/bin/python
import tarfile
f = "/var/lib/zope/Products/bt5/erp5_accounting.bt5"
tar = tarfile.open(f, 'r:gz')
members = tar.getmembers()
for m in members:
tar.extractfile(m)
print len(members)
==================================

Will extract from file for:

* Mandriva 2006, python 2.4.1, tarfile 0.6.4 - 1250 files

* Mandriva 2007, python 2.4.3, tarfile 0.6.4 - 127 files

This happens silently without any error messages and can affect ERP5 (I
experienced it a lot of) but only for Mandriva 2007.
If you try to unzi/untar the same file using tar you'll get the correct
file content.

Ivan
Kevin Deldycke
2007-01-30 16:26:22 UTC
Permalink
Post by Ivan Tyagov
This happens silently without any error messages and can affect ERP5 (I
experienced it a lot of) but only for Mandriva 2007.
If you try to unzi/untar the same file using tar you'll get the correct
file content.
This issue was confirmed by several persons in Nexedi.

I've just done a new RPM of python to fix this problem. This RPM is available
right now on our Mandriva 2007 repository.

The RPM is based on the latest Mandriva 2007 update (python-2.4.3-3.1) and
I've replaced the /var/lib/python2.4/tarfile.py by the one that came with
python 2.4.1 (from Mandriva 2006 official RPM). For details, look here:
http://svn.erp5.org/spec/mandriva/2007.0/python/
--
Kevin Deldycke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20070130/39c0785b/attachment.pgp>
Loading...