[Treepkg-commits] r209 - trunk/recipes/kde_enterprise_3_5

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 4 12:13:12 CEST 2009


Author: bh
Date: 2009-08-04 12:13:12 +0200 (Tue, 04 Aug 2009)
New Revision: 209

Modified:
   trunk/recipes/kde_enterprise_3_5/base.py
Log:
kdepim recipes: introduce a BaseRevisionPackager that allows the track
to set the packaging date.  Make the BaseSourcePackager use the date
from the parent RevisionPackager.


Modified: trunk/recipes/kde_enterprise_3_5/base.py
===================================================================
--- trunk/recipes/kde_enterprise_3_5/base.py	2009-08-04 10:09:12 UTC (rev 208)
+++ trunk/recipes/kde_enterprise_3_5/base.py	2009-08-04 10:13:12 UTC (rev 209)
@@ -21,8 +21,8 @@
 
     def __init__(self, *args, **kw):
         super(BaseSourcePackager, self).__init__(*args, **kw)
-        self.enterprise_version = (time.strftime("%Y%m%d", time.localtime()) \
-                                   + "." + str(self.revision))
+        self.enterprise_version = (self.parent.pkg_date + "."
+                                   + str(self.revision))
 
     def determine_package_version(self, directory):
         enterprise_version = self.enterprise_version
@@ -38,6 +38,14 @@
         """
 
 
+class BaseRevisionPackager(treepkg.packager.RevisionPackager):
+
+    def __init__(self, *args, **kw):
+        self.pkg_date = kw.pop("pkg_date",
+                               time.strftime("%Y%m%d", time.localtime()))
+        super(BaseRevisionPackager, self).__init__(*args, **kw)
+
+
 class BasePackageTrack(treepkg.packager.PackageTrack):
 
     extra_config_desc = [("version_template", str, "%(enterprise_version)s"),



More information about the Treepkg-commits mailing list