Rename Pspec.set_archive as Pspec.add_arrchive in scenario api.
This was broken by multiple Archive tag support.
This commit is contained in:
@@ -43,7 +43,7 @@ class Package:
|
|||||||
pspec.set_source(consts.homepage, consts.summary % self.name,
|
pspec.set_source(consts.homepage, consts.summary % self.name,
|
||||||
consts.description % self.name, consts.license, self.partOf)
|
consts.description % self.name, consts.license, self.partOf)
|
||||||
pspec.set_packager(consts.packager_name, consts.packager_email)
|
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.set_package(self.dependencies, self.conflicts)
|
||||||
pspec.add_file_path(consts.skel_bindir, consts.skel_dirtype)
|
pspec.add_file_path(consts.skel_bindir, consts.skel_dirtype)
|
||||||
pspec.set_history(self.date, self.version)
|
pspec.set_history(self.date, self.version)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# Please read the COPYING file.
|
# 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.dependency import Dependency
|
||||||
from pisi.conflict import Conflict
|
from pisi.conflict import Conflict
|
||||||
from pisi.pxml.autoxml import LocalText
|
from pisi.pxml.autoxml import LocalText
|
||||||
@@ -124,10 +124,13 @@ class Pspec:
|
|||||||
self.update.name = unicode(name)
|
self.update.name = unicode(name)
|
||||||
self.update.email = email
|
self.update.email = email
|
||||||
|
|
||||||
def set_archive(self, sha1sum, type, uri):
|
def add_archive(self, sha1sum, type, uri):
|
||||||
self.pspec.source.archive.sha1sum = sha1sum
|
archive = Archive()
|
||||||
self.pspec.source.archive.type = type
|
archive.sha1sum = sha1sum
|
||||||
self.pspec.source.archive.uri = uri
|
archive.type = type
|
||||||
|
archive.uri = uri
|
||||||
|
|
||||||
|
self.pspec.source.archive.append(archive)
|
||||||
|
|
||||||
def add_file_path(self, path, type):
|
def add_file_path(self, path, type):
|
||||||
p = Path()
|
p = Path()
|
||||||
|
|||||||
Reference in New Issue
Block a user