diff recipes/kde_enterprise_3_5/kdepim.py @ 271:12facd1b5f19

Implement tag detection for the KDEPIM enterprise 3.5 packages. This is a simple port of the implementation for the enterprise 4 branch. This change leads to a lot of duplicated code that needs to be refactored.
author Bernhard Herzog <bh@intevation.de>
date Thu, 07 May 2009 13:51:21 +0000
parents 710538908609
children c0cbd133b607
line wrap: on
line diff
--- a/recipes/kde_enterprise_3_5/kdepim.py	Wed May 06 14:00:51 2009 +0000
+++ b/recipes/kde_enterprise_3_5/kdepim.py	Thu May 07 13:51:21 2009 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 by Intevation GmbH
+# Copyright (C) 2007, 2008, 2009 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh@intevation.de>
 #
@@ -15,15 +15,12 @@
 import treepkg.util
 import treepkg.packager
 
+import base
 
-class SourcePackager(treepkg.packager.SourcePackager):
+class SourcePackager(base.BaseSourcePackager):
 
     pkg_basename = "kdepim"
-
-    def __init__(self, *args, **kw):
-        super(SourcePackager, self).__init__(*args, **kw)
-        self.enterprise_version = (time.strftime("%Y%m%d", time.localtime()) \
-                                   + "." + str(self.revision))
+    changemsg_template = "Update to SVN enterprise35 branch rev. %(revision)d"
 
     def kdepim_version(self, directory):
         """Determine the kdepim version.
@@ -55,31 +52,13 @@
             raise RuntimeError("kdepim: failed to update version numbers in %s"
                                % (", ".join(failed),))
 
-    def do_package(self):
-        pkgbaseversion, pkgbasedir = self.export_sources()
-        self.update_version_numbers(pkgbasedir)
-
-        pkgbasename = "kdepim_" + pkgbaseversion
-        origtargz = os.path.join(self.work_dir,
-                                 pkgbasename + ".orig.tar.gz")
-        self.create_tarball(origtargz, self.work_dir,
-                            os.path.basename(pkgbasedir))
-
-        changemsg = ("Update to SVN enterprise35 branch rev. %d"
-                     % (self.revision,))
-        self.copy_debian_directory(pkgbasedir, pkgbaseversion,
-                                   changemsg)
-
-        self.create_source_package(pkgbasedir, origtargz)
-        self.move_source_package(pkgbasename)
-
 
 class RevisionPackager(treepkg.packager.RevisionPackager):
 
     source_packager_cls = SourcePackager
 
 
-class PackageTrack(treepkg.packager.PackageTrack):
+class PackageTrack(base.BasePackageTrack):
 
     revision_packager_cls = RevisionPackager
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)