[Blends-commit] [SCM] website branch, tasks-files-in-git, updated. 45ef7fe4b3df054de7fd75431ec888e9286b95ea

Andreas Tille tille at debian.org
Sun Dec 9 16:54:29 UTC 2012


The following commit has been merged in the tasks-files-in-git branch:
commit 99f16aea653a97ed49e3c5592361533abdfffac2
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 92ac1a8..c450839 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -893,8 +893,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
@@ -1488,9 +1490,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 = []
@@ -1797,6 +1802,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