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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu May 7 18:02:23 CEST 2009


Author: bh
Date: 2009-05-07 18:02:23 +0200 (Thu, 07 May 2009)
New Revision: 203

Modified:
   trunk/recipes/kde_enterprise_3_5/kde_i18n.py
Log:
Use base.BaseSourcePackager for building enterprise 35 kde-i18n and rely
on the base class do_package method.


Modified: trunk/recipes/kde_enterprise_3_5/kde_i18n.py
===================================================================
--- trunk/recipes/kde_enterprise_3_5/kde_i18n.py	2009-05-07 16:01:10 UTC (rev 202)
+++ trunk/recipes/kde_enterprise_3_5/kde_i18n.py	2009-05-07 16:02:23 UTC (rev 203)
@@ -17,7 +17,7 @@
 
 import base
 
-class SourcePackager(treepkg.packager.SourcePackager):
+class SourcePackager(base.BaseSourcePackager):
 
     """Creates the debian source package for the i18n files
 
@@ -87,40 +87,22 @@
         logging.info("Created kde-i18n-de tarball")
         return tarball
 
-    def do_package(self):
-        # Create a new kde-i18n-de tarball from current SVN and the base
-        # kde-i18n-de tarball.
-        pkgbaseversion, pkgbasedir = self.export_sources()
-        tarball = self.create_i18n_de_tarball(pkgbasedir, pkgbaseversion)
-
+    def prepare_sources_for_tarball(self, pkgbasedir, pkgbaseversion):
         # We have to reuse the same directory when building the
-        # orig.tar.gz.  However, we need to preserver the scripts
+        # orig.tar.gz.  However, we need to preserve the scripts
         # sub-directory because it's not needed for the kde-i18n-de
         # tarball but for the .orig.tar.gz.
+        tarball = self.create_i18n_de_tarball(pkgbasedir, pkgbaseversion)
         pkg_scripts_dir = os.path.join(pkgbasedir, "scripts")
         tmp_scripts_dir = os.path.join(self.work_dir, "scripts")
         os.rename(pkg_scripts_dir, tmp_scripts_dir)
         shutil.rmtree(pkgbasedir)
         os.mkdir(pkgbasedir)
         os.rename(tmp_scripts_dir, pkg_scripts_dir)
-
-        pkgbasename = self.pkg_basename + "_" + pkgbaseversion
-        origtargz = os.path.join(self.work_dir,
-                                 pkgbasename + ".orig.tar.gz")
         os.rename(tarball, os.path.join(pkgbasedir,
                                         os.path.basename(tarball)))
-        self.create_tarball(origtargz, self.work_dir,
-                            os.path.basename(pkgbasedir))
 
-        changemsg = ("Update to SVN enterprise 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