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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jun 19 14:26:08 CEST 2008


Author: bh
Date: 2008-06-19 14:26:07 +0200 (Thu, 19 Jun 2008)
New Revision: 86

Modified:
   trunk/recipes/kde_enterprise_3_5/kdepim.py
Log:
kdepim recipe: raise an error if not all version replacements could be done


Modified: trunk/recipes/kde_enterprise_3_5/kdepim.py
===================================================================
--- trunk/recipes/kde_enterprise_3_5/kdepim.py	2008-06-19 12:25:30 UTC (rev 85)
+++ trunk/recipes/kde_enterprise_3_5/kdepim.py	2008-06-19 12:26:07 UTC (rev 86)
@@ -43,12 +43,17 @@
         """Overrides the inherited method to update version numbers in the code
         """
         versionstring = "(enterprise35 %s)" % self.enterprise_version
+        failed = []
         for versionfile in ["kmail/kmversion.h", "kontact/src/main.cpp",
                             "korganizer/version.h"]:
-	    #FIXME: should check successful replacements
-            treepkg.util.replace_in_file(os.path.join(pkgbasedir, versionfile),
-                                         "\(enterprise35 ([^)]*)\)",
-                                         versionstring)
+            if not treepkg.util.replace_in_file(os.path.join(pkgbasedir,
+                                                             versionfile),
+                                                "\(enterprise35 ([^)]*)\)",
+                                                versionstring):
+                failed.append(versionfile)
+        if failed:
+            raise RuntimeError("kdepim: failed to update version numbers in %s"
+                               % (", ".join(failed),))
 
     def do_package(self):
         pkgbaseversion, pkgbasedir = self.export_sources()



More information about the Treepkg-commits mailing list