#410 closed defect (fixed)
xerces-c-vc9 contians a funny tar file that core python libs can not decompress
Reported by: | jpalmer | Owned by: | |
---|---|---|---|
Priority: | major | Component: | Package |
Version: | Keywords: | ||
Cc: |
Description
The xerces-c-vc9-3.1.1-3-devel.tar.bz2 tar file in the x86\release\xerces-c folder seems to be compressed in a way that stops python from decompressing it. All other files on the site are fine but this one returns the following error:
import bz2 import tarfile file ='xerces-c-vc9-3.1.1-3-devel.tar.bz2' bzf = bz2.BZ2File(file) try: tarf = tarfile.TarFile(fileobj=bzf) tarf.extractall(working) finally: bzf.close()
File "build_nsis.py", line 94, in <module>
tarf = tarfile.TarFile(fileobj=bzf)
File "C:\OsGeo4W-LINZ\apps\Python27\lib\tarfile.py", line 1574, in init
self.firstmember = self.next()
File "C:\OsGeo4W-LINZ\apps\Python27\lib\tarfile.py", line 2319, in next
tarinfo = self.tarinfo.fromtarfile(self)
File "C:\OsGeo4W-LINZ\apps\Python27\lib\tarfile.py", line 1239, in fromtarfile
buf = tarfile.fileobj.read(BLOCKSIZE)
IOError: invalid data stream
I've double checked my downloaded file and it ok. tools like tar and 7z can actually decompress the tar.
despite the name the archive was gzipped instead of bzip2ed. fixed in 3.1.1-4