[Blends-commit] [SCM] website branch, devel, updated. 8aec1f15c5708df976cb569bd5e6f46d876d1751

Andreas Tille tille at debian.org
Fri Nov 30 15:53:51 UTC 2012


The following commit has been merged in the devel branch:
commit 8aec1f15c5708df976cb569bd5e6f46d876d1751
Author: Andreas Tille <tille at debian.org>
Date:   Fri Nov 30 16:53:51 2012 +0100

    Enable dealing with non-task files (=Files lacking a 'Task' field) in tasks/ dir - those files will be ignored (ported to devel branch)

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 0e8d13a..8727b84 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -963,7 +963,10 @@ class Tasks:
             translations = None
             if metapkg_translations.has_key(pkgname):
                 translations = metapkg_translations[pkgname]
-            td.SetMetapackageInfo(pkgname, translations)
+            if td.SetMetapackageInfo(pkgname, translations):
+                self.tasks[task] = td
+            else: # Kick file that is obviosely no task file from metapackage list
+                self.metapackagekeys = filter(lambda name: name != task, self.metapackagekeys)
             td.GetTaskDependencies(source)
             self.tasks[task] = td
 
@@ -1609,9 +1612,12 @@ class TaskDependencies:
             for dep in self.dependencies[status]:
                 alldepends.append(dep.pkg)
 
+        if not self.metapkg.PrintedName:
+            logger.error("Task file %s is lacking field 'Task' - and thus will be ignored" % self.taskfile)
+            return 0 # Failure
         if not alldepends:
             logger.warning("No dependencies defined in taskfile %s" % self.task)
-            return
+            return 0 # Failure
         query = "EXECUTE query_pkgs ('%s', '%s')" % (List2PgArray(alldepends), List2PgSimilarArray(alldepends))
         _execute_udd_query(query)
         pkgs_in_pool = []
@@ -1927,6 +1933,7 @@ class TaskDependencies:
                 if dep.pkg in pkgs_in_pool or dep.pkg in pkgs_virtual:
                     if dep.source != None and dep.source not in source_pkgs:
                         source_pkgs.append(dep.source)
+        return 1 # Success
 
 
     def MarkupPreformatedStrings(self):

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list