Another try to fix:

http://liste.pardus.org.tr/gelistirici/2008-February/011133.html

Because YALI could not decompress index file to a read-only file system.
This commit is contained in:
Faik Uygur
2008-04-01 13:05:29 +00:00
parent 0b86bcc230
commit 4166878b63
2 changed files with 4 additions and 9 deletions
-8
View File
@@ -48,14 +48,6 @@ class Index(xmlfile.XmlFile):
return self.distribution.name + self.distribution.repositoryname
def read_uri(self, uri, tmpdir, force = False):
# A workaround for the side effect of commit revision 17027
# Someone should nuke pisi.file.File into pieces
fileuri = pisi.file.File.make_uri(uri)
if fileuri.is_local_file():
pisi.file.File.download(fileuri, tmpdir, not force, pisi.file.File.auto, pisi.file.File.detached, True)
uri = pisi.file.File.decompress(uri, pisi.file.File.auto)
##
self.read(uri, tmpDir=tmpdir, sha1sum=not force,
compress=pisi.file.File.auto, sign=pisi.file.File.detached, copylocal = True, nodecode = True)
+4 -1
View File
@@ -65,9 +65,12 @@ class XmlFile(object):
def readxml(self, uri, tmpDir='/tmp', sha1sum=False,
compress=None, sign=None, copylocal = False):
# workaround for repo index files to fix
# rev. 17027 regression (http://liste.pardus.org.tr/gelistirici/2008-February/011133.html)
compressed = uri.endswith(".bz2") or uri.endswith(".gz")
uri = pisi.file.File.make_uri(uri)
if uri.is_local_file():
if uri.is_local_file() and not compressed:
# this is a local file
localpath = uri.path()
else: