[Blends-commit] [SCM] website branch, tasks-files-in-git, updated. 29defcd92dea97a7ea11656e3e73fe67e6cf0c86

Andreas Tille tille at debian.org
Fri Nov 30 15:08:58 UTC 2012


The following commit has been merged in the tasks-files-in-git branch:
commit 29defcd92dea97a7ea11656e3e73fe67e6cf0c86
Author: Andreas Tille <tille at debian.org>
Date:   Fri Nov 30 15:57:45 2012 +0100

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

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index a50e172..421b742 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -913,8 +913,10 @@ class Tasks:
             if metapkg_translations.has_key(pkgname):
                 translations = metapkg_translations[pkgname]
             td.SetMetapackageInfo(pkgname, translations)
-            td.GetTaskDependencies(source)
-            self.tasks[task] = td
+            if td.GetTaskDependencies(source):
+                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)
 
         if source == 0:
             # total number popcon submissions
@@ -1508,9 +1510,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 = []
@@ -1817,6 +1822,7 @@ class TaskDependencies:
 
         for dependency in self.dependencies.keys():
             self.dependencies[dependency].sort()
+        return 1 # Success
 
     def _QueryUDD4Package(self, source):
 

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list