diff --git a/pisi/scenarioapi/package.py b/pisi/scenarioapi/package.py index d4525557..310d0173 100644 --- a/pisi/scenarioapi/package.py +++ b/pisi/scenarioapi/package.py @@ -43,7 +43,7 @@ class Package: pspec.set_source(consts.homepage, consts.summary % self.name, consts.description % self.name, consts.license, self.partOf) pspec.set_packager(consts.packager_name, consts.packager_email) - pspec.set_archive(consts.skel_sha1sum, consts.skel_type, consts.skel_uri) + pspec.add_archive(consts.skel_sha1sum, consts.skel_type, consts.skel_uri) pspec.set_package(self.dependencies, self.conflicts) pspec.add_file_path(consts.skel_bindir, consts.skel_dirtype) pspec.set_history(self.date, self.version) diff --git a/pisi/scenarioapi/pspec.py b/pisi/scenarioapi/pspec.py index 65b7919f..e1be7cd5 100644 --- a/pisi/scenarioapi/pspec.py +++ b/pisi/scenarioapi/pspec.py @@ -10,7 +10,7 @@ # Please read the COPYING file. # -from pisi.specfile import SpecFile, Package, Update, Path, Action, AnyDependency +from pisi.specfile import SpecFile, Package, Update, Path, Action, Archive, AnyDependency from pisi.dependency import Dependency from pisi.conflict import Conflict from pisi.pxml.autoxml import LocalText @@ -124,10 +124,13 @@ class Pspec: self.update.name = unicode(name) self.update.email = email - def set_archive(self, sha1sum, type, uri): - self.pspec.source.archive.sha1sum = sha1sum - self.pspec.source.archive.type = type - self.pspec.source.archive.uri = uri + def add_archive(self, sha1sum, type, uri): + archive = Archive() + archive.sha1sum = sha1sum + archive.type = type + archive.uri = uri + + self.pspec.source.archive.append(archive) def add_file_path(self, path, type): p = Path()