[Distutils] bug in archive_util.unpack_archive ?

Godefroid Chapelle gotcha at bubblenet.be
Tue Nov 20 16:00:47 CET 2007


Hi,

I think there is a bug in archive_util.unpack_archive.

The following procedure has been tested with setuptools 0.6c7
under MacOSX 10.4.10, Mac OSX 10.5.1 and Ubuntu 7.10

Download archive :
http://switch.dl.sourceforge.net/sourceforge/textindexng/TextIndexNG3-3.1.8.tar.gz

Test it :

tar -xzf TextIndexNG3-3.1.8.tar.gz

cd TextIndexNG3

ls -al

total 64
drwxr-xr-x  21 gotcha  gotcha   714 Mar 11  2006 .
drwxr-xr-x   9 gotcha  gotcha   306 Nov 20 15:53 ..
drwxr-xr-x   5 gotcha  gotcha   170 Mar 11  2006 CVS
drwxr-xr-x   4 gotcha  gotcha   136 Mar 11  2006 Extensions
-rw-r--r--   1 gotcha  gotcha   658 Jun  4  2005 Makefile
-rw-r--r--   1 gotcha  gotcha  6056 Mar 11  2006 TextIndexNG3.py
-rw-r--r--   1 gotcha  gotcha  2226 Sep 21  2005 __init__.py
drwxr-xr-x   8 gotcha  gotcha   272 Mar 11  2006 adapters
-rw-r--r--   1 gotcha  gotcha  3444 Dec  8  2005 browser.py
-rw-r--r--   1 gotcha  gotcha  2034 Dec  7  2005 configure.zcml
drwxr-xr-x   6 gotcha  gotcha   204 Mar 11  2006 doc
drwxr-xr-x  10 gotcha  gotcha   340 Mar 11  2006 extension_modules
-rw-r--r--   1 gotcha  gotcha   320 May  1  2005 header.txt
drwxr-xr-x   5 gotcha  gotcha   170 Mar 11  2006 i18n
drwxr-xr-x   5 gotcha  gotcha   170 Mar 11  2006 interfaces
drwxr-xr-x  13 gotcha  gotcha   442 Mar 11  2006 pt
drwxr-xr-x   5 gotcha  gotcha   170 Mar 11  2006 skins
drwxr-xr-x   4 gotcha  gotcha   136 Mar 11  2006 src
drwxr-xr-x   8 gotcha  gotcha   272 Mar 11  2006 tests
-rw-r--r--   1 gotcha  gotcha     6 Mar 11  2006 version.txt
drwxr-xr-x   3 gotcha  gotcha   102 Mar 11  2006 www


Unpack it with setuptools function :

python2.4

 >>> from setuptools import archive_util
 >>> archive_util.unpack_archive('TextIndexNG3-3.1.8.tar.gz', 'dest')

cd dest/

ls -al TextIndexNG3/

total 8
drwxrwxr-x   6 gotcha  gotcha   204 Nov 20 15:57 .
drwxrwxrwx   3 gotcha  gotcha   102 Nov 20 15:57 ..
-rw-rw-r--   1 gotcha  gotcha  3444 Dec  8  2005 browser.py
drwxrwxr-x   8 gotcha  gotcha   272 Nov 20 15:57 extension_modules
drwxrwxr-x   5 gotcha  gotcha   170 Nov 20 15:57 i18n
drwxrwxr-x  13 gotcha  gotcha   442 Nov 20 15:57 pt


As you can see the output with unpack_archive in uncomplete.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be


More information about the Distutils-SIG mailing list