diff --git a/pisi/archive.py b/pisi/archive.py index c54bf19f..7099e986 100644 --- a/pisi/archive.py +++ b/pisi/archive.py @@ -62,9 +62,9 @@ class ArchiveZip(ArchiveBase): self.zip.close() def add_file(self, file): + """add file or directory to a zip file""" if os.path.isdir(file): self.zip.writestr(file + '/', '') - print file for f in os.listdir(file): self.add_file(file + '/' + f) else: diff --git a/pisi/build.py b/pisi/build.py index 8fa16659..0cdb7b7d 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -224,6 +224,6 @@ class PisiBuild: os.chdir(self.ctx.pkg_dir()) pkg.add_file(self.ctx.const.metadata_xml) pkg.add_file(self.ctx.const.files_xml) - # pkd.add_dir("install") + pkg.add_file("install") pkg.close() os.chdir(c) diff --git a/pisi/package.py b/pisi/package.py index ea92a3ce..3b3c2176 100644 --- a/pisi/package.py +++ b/pisi/package.py @@ -12,8 +12,8 @@ class Package: self.filename = packagefn def add_file(self, fn): - """add a file to package""" - self.impl.add_file(self.filename, fn) + """add a file or directory to package""" + self.impl.add_file(fn) def close(self): self.impl.close()