changeset 279:32b09a9b92ba

Use BaseSourcePackager to build enterprise4 kde_l10n, moving the package specific code from do_package to prepare_sources_for_tarball.
author Bernhard Herzog <bh@intevation.de>
date Thu, 07 May 2009 18:44:36 +0000
parents 354fc60d90a4
children d2382953b2c8
files recipes/kde_enterprise_4/kde_l10n.py
diffstat 1 files changed, 5 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/recipes/kde_enterprise_4/kde_l10n.py	Thu May 07 16:55:06 2009 +0000
+++ b/recipes/kde_enterprise_4/kde_l10n.py	Thu May 07 18:44:36 2009 +0000
@@ -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,26 +146,12 @@
                                       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):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)