changeset 277:4441aff001ac

Use base.BaseSourcePackager for building enterprise 35 kde-i18n and rely on the base class do_package method.
author Bernhard Herzog <bh@intevation.de>
date Thu, 07 May 2009 16:02:23 +0000
parents f3dee156e3e3
children 354fc60d90a4
files recipes/kde_enterprise_3_5/kde_i18n.py
diffstat 1 files changed, 4 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/recipes/kde_enterprise_3_5/kde_i18n.py	Thu May 07 16:01:10 2009 +0000
+++ b/recipes/kde_enterprise_3_5/kde_i18n.py	Thu May 07 16:02:23 2009 +0000
@@ -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,38 +87,20 @@
         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):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)