Revert to revision 16924 to keep 2007 compatibility

until a workable 2008 packages and environment is 
ready.
This commit is contained in:
Faik Uygur
2008-02-04 13:41:09 +00:00
parent ca3f92c481
commit 61f13b9ac5
4 changed files with 47 additions and 31 deletions
-5
View File
@@ -26,7 +26,6 @@ from pisi.actionsapi.shelltools import system
from pisi.actionsapi.shelltools import can_access_file
from pisi.actionsapi.shelltools import unlink
from pisi.actionsapi.libtools import gnuconfig_update
from pisi.actionsapi.libtools import libtoolize
class ConfigureError(pisi.actionsapi.Error):
def __init__(self, value=''):
@@ -56,10 +55,6 @@ class RunTimeError(pisi.actionsapi.Error):
def configure(parameters = ''):
'''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
if can_access_file('ltmain.sh'):
libtoolize("--copy --force")
if can_access_file('configure'):
gnuconfig_update()
+1 -18
View File
@@ -19,7 +19,6 @@ import shutil
import tarfile
import zipfile
import gzip
import struct
import gettext
__trans = gettext.translation('pisi', fallback=True)
@@ -213,23 +212,7 @@ class MyZipFile(zipfile.ZipFile):
"Attempt to read ZIP archive that was already closed"
zinfo = self.getinfo(name)
filepos = self.fp.tell()
self.fp.seek(zinfo.header_offset, 0)
# Skip the file header:
fheader = self.fp.read(30)
if fheader[0:4] != zipfile.stringFileHeader:
raise BadZipfile, "Bad magic number for file header"
fheader = struct.unpack(zipfile.structFileHeader, fheader)
fname = self.fp.read(fheader[zipfile._FH_FILENAME_LENGTH])
if fheader[zipfile._FH_EXTRA_FIELD_LENGTH]:
self.fp.read(fheader[zipfile._FH_EXTRA_FIELD_LENGTH])
if fname != zinfo.orig_filename:
raise zipfile.BadZipfile, \
'File name in directory "%s" and header "%s" differ.' % (
zinfo.orig_filename, fname)
self.fp.seek(zinfo.file_offset, 0)
destfile = file(outname, 'wb')
+8 -8
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005 - 2008, TUBITAK/UEKAE
# Copyright (C) 2005 - 2007, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
@@ -25,9 +25,9 @@
#host = i686-pc-linux-gnu
#generateDebug = False
#jobs = "-j1"
#CFLAGS= -mtune=generic -march=i686 -O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2
#CXXFLAGS= -mtune=generic -march=i686 -O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2
#LDFLAGS= -Wl,-O1 -Wl,-z,relro -Wl,--hash-style=gnu
#CFLAGS= -mtune=generic -mcpu=generic -march=i686 -O2 -pipe -fomit-frame-pointer -Wstrict-overflow
#CXXFLAGS= -mtune=generic -mcpu=generic -march=i686 -O2 -pipe -fomit-frame-pointer -Wstrict-overflow
#LDFLAGS=
#buildno=True # necessary for generating build nos
#buildhelper = None / ccache / icecream
#compressionlevel = 7
@@ -65,7 +65,7 @@ class GeneralDefaults:
destinationdirectory = "/"
autoclean = False
distribution = "Pardus"
distribution_release = "2008"
distribution_release = "2007"
architecture = "i686"
http_proxy = os.getenv("HTTP_PROXY") or None
https_proxy = os.getenv("HTTPS_PROXY") or None
@@ -78,9 +78,9 @@ class BuildDefaults:
host = "i686-pc-linux-gnu"
jobs = "-j1"
generateDebug = False
cflags = "-mtune=generic -march=i686 -O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2"
cxxflags = "-mtune=generic -march=i686 -O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2"
ldflags = "-Wl,-O1 -Wl,-z,relro -Wl,--hash-style=gnu"
cflags = "-mtune=i686 -O2 -pipe -fomit-frame-pointer"
cxxflags = "-mtune=i686 -O2 -pipe -fomit-frame-pointer"
ldflags = ""
buildno = False
buildhelper = None
compressionlevel = 7
+38
View File
@@ -0,0 +1,38 @@
Index: pisi/archive.py
===================================================================
--- pisi/archive.py (revision 16476)
+++ pisi/archive.py (working copy)
@@ -19,6 +19,7 @@
import tarfile
import zipfile
import gzip
+import struct
import gettext
__trans = gettext.translation('pisi', fallback=True)
@@ -212,8 +213,24 @@
"Attempt to read ZIP archive that was already closed"
zinfo = self.getinfo(name)
filepos = self.fp.tell()
- self.fp.seek(zinfo.file_offset, 0)
+ self.fp.seek(zinfo.header_offset, 0)
+
+ # Skip the file header:
+ fheader = self.fp.read(30)
+ if fheader[0:4] != zipfile.stringFileHeader:
+ raise BadZipfile, "Bad magic number for file header"
+
+ fheader = struct.unpack(zipfile.structFileHeader, fheader)
+ fname = self.fp.read(fheader[zipfile._FH_FILENAME_LENGTH])
+ if fheader[zipfile._FH_EXTRA_FIELD_LENGTH]:
+ self.fp.read(fheader[zipfile._FH_EXTRA_FIELD_LENGTH])
+
+ if fname != zinfo.orig_filename:
+ raise zipfile.BadZipfile, \
+ 'File name in directory "%s" and header "%s" differ.' % (
+ zinfo.orig_filename, fname)
+
destfile = file(outname, 'wb')
if zinfo.compress_type == zipfile.ZIP_STORED: