Rename Pspec.set_archive as Pspec.add_arrchive in scenario api.

This was broken by multiple Archive tag support.
This commit is contained in:
Fatih Aşıcı
2010-02-20 15:38:22 +00:00
parent 18ca225e1e
commit 4996e645fc
2 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -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)
+8 -5
View File
@@ -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()