* fix: decompress local file in read mode
This commit is contained in:
@@ -298,6 +298,7 @@ def index(dirs, output = 'pisi-index.xml', skip_sources=False):
|
||||
if not dirs:
|
||||
dirs = ['.']
|
||||
for repo_dir in dirs:
|
||||
repo_dir = str(repo_dir)
|
||||
ctx.ui.info(_('* Building index of PISI files under %s') % repo_dir)
|
||||
index.index(repo_dir, skip_sources)
|
||||
index.write(output, sha1sum=True, compress=File.xmill)
|
||||
|
||||
+3
-2
@@ -119,8 +119,9 @@ class File:
|
||||
else:
|
||||
raise Error(_("Remote write not implemented"))
|
||||
else:
|
||||
localfile = uri.get_uri() #TODO: use a special function here?
|
||||
localfile = File.decompress(localfile, self.compress)
|
||||
localfile = uri.get_uri()
|
||||
if self.mode == File.read:
|
||||
localfile = File.decompress(localfile, self.compress)
|
||||
|
||||
if self.mode == File.read:
|
||||
access = 'r'
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ class Index(XmlFile):
|
||||
errs = md.errors()
|
||||
if md.errors():
|
||||
ctx.ui.error(_('Package %s: metadata corrupt') % md.package.name)
|
||||
ctx.ui.error(str(Error(*errs)))
|
||||
ctx.ui.error(unicode(Error(*errs)))
|
||||
else:
|
||||
self.packages.append(md.package)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user