[Treepkg-commits] r205 - trunk/recipes/kde_enterprise_4

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu May 7 20:44:37 CEST 2009


Author: bh
Date: 2009-05-07 20:44:36 +0200 (Thu, 07 May 2009)
New Revision: 205

Modified:
   trunk/recipes/kde_enterprise_4/kde_l10n.py
Log:
Use BaseSourcePackager to build enterprise4 kde_l10n, moving the package
specific code from do_package to prepare_sources_for_tarball.


Modified: trunk/recipes/kde_enterprise_4/kde_l10n.py
===================================================================
--- trunk/recipes/kde_enterprise_4/kde_l10n.py	2009-05-07 16:55:06 UTC (rev 204)
+++ trunk/recipes/kde_enterprise_4/kde_l10n.py	2009-05-07 18:44:36 UTC (rev 205)
@@ -14,7 +14,7 @@
 import treepkg.util
 import treepkg.subversion as subversion
 
-from base import BasePackageTrack
+from base import BaseSourcePackager, BasePackageTrack
 
 
 class SubversionSubset(object):
@@ -75,7 +75,7 @@
 
 
 
-class SourcePackager(treepkg.packager.SourcePackager):
+class SourcePackager(BaseSourcePackager):
 
     """Creates the debian source package for the l10n files
 
@@ -127,7 +127,7 @@
         enterprise_version = self.enterprise_version
         return self.track.version_template % locals()
 
-    def create_l10n_de_tarball(self, pkgbaseversion, pkgbasedir):
+    def create_l10n_de_tarball(self, pkgbasedir, pkgbaseversion):
         logging.info("Creating kde-l10n-de tarball")
         de_tarball = os.path.join(self.work_dir,
                                   "kde-l10n-de-" + pkgbaseversion + ".tar.bz2")
@@ -146,28 +146,14 @@
                                       bindmounts=[self.work_dir])
         return de_tarball
 
-    def do_package(self):
-        pkgbaseversion, pkgbasedir = self.export_sources()
-        de_tarball = self.create_l10n_de_tarball(pkgbaseversion, pkgbasedir)
+    def prepare_sources_for_tarball(self, pkgbasedir, pkgbaseversion):
+        de_tarball = self.create_l10n_de_tarball(pkgbasedir, pkgbaseversion)
         shutil.rmtree(pkgbasedir)
-
         os.mkdir(pkgbasedir)
-        pkgbasename = self.pkg_basename + "_" + pkgbaseversion
-        origtargz = os.path.join(self.work_dir,
-                                 pkgbasename + ".orig.tar.gz")
         os.rename(de_tarball,
                   os.path.join(pkgbasedir, os.path.basename(de_tarball)))
-        self.create_tarball(origtargz, self.work_dir,
-                            os.path.basename(pkgbasedir))
 
-        changemsg = ("Update to SVN enterprise4 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



More information about the Treepkg-commits mailing list