changeset 281:2b9d94f0ccad

Pass the package revision as a parameter to the RevisionPackager
author Bernhard Herzog <bh@intevation.de>
date Tue, 04 Aug 2009 10:01:56 +0000
parents d2382953b2c8
children f58f9adb7dc3
files treepkg/packager.py
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/packager.py	Mon Aug 03 18:57:27 2009 +0000
+++ b/treepkg/packager.py	Tue Aug 04 10:01:56 2009 +0000
@@ -41,6 +41,7 @@
 
     track = _fromparent("track")
     revision = _fromparent("revision")
+    pkg_revision = _fromparent("pkg_revision")
     status = _fromparent("status")
     log_dir = _fromparent("log_dir")
     work_dir = _fromparent("work_dir")
@@ -143,7 +144,7 @@
             oldversionprefix = oldversion.split(":")[0] + ":"
         else:
             oldversionprefix = ""
-        debrev = self.track.debrevision_prefix + "1"
+        debrev = self.pkg_revision
         run.call(cmdexpand("debchange -c  $changelog"
                            " -v ${oldversionprefix}${pkgbaseversion}-${debrev}"
                            " $changemsg", **locals()),
@@ -245,10 +246,16 @@
     source_packager_cls = SourcePackager
     binary_packager_cls = BinaryPackager
 
-    def __init__(self, track, revision, rules_revision, tag=""):
+    def __init__(self, track, revision, rules_revision, pkg_revision=None,
+                 tag=""):
         self.track = track
         self.revision = revision
         self.rules_revision = rules_revision
+
+        if pkg_revision is None:
+            pkg_revision = self.track.debrevision_prefix + "1"
+        self.pkg_revision = pkg_revision
+
         self.base_dir = self.track.pkg_dir_for_revision(self.revision,
                                                         rules_revision)
         self.status = status.RevisionStatus(os.path.join(self.base_dir,
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)