Kaydet (Commit) 4996e645 authored tarafından Fatih Aşıcı's avatar Fatih Aşıcı

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

This was broken by multiple Archive tag support.
üst 18ca225e
......@@ -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)
......
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment