[Blends-commit] [SCM] website branch, master, updated. 9aa8df51f6ecda5a9242ea890e7e59eefde7f3a1

Ole Streicher olebole at debian.org
Sun Mar 20 19:27:49 UTC 2016


The following commit has been merged in the master branch:
commit 9aa8df51f6ecda5a9242ea890e7e59eefde7f3a1
Author: Ole Streicher <olebole at debian.org>
Date:   Sun Mar 20 20:27:45 2016 +0100

    Rename last .pkg -> .properties['name']

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 88707d2..eef328b 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -279,7 +279,8 @@ def GetDependencies2Use(dependencystatus=[], max_order='prospective'):
 ###########################################################################################
 # Define several prepared statements to query UDD
 try:
-    conn = psycopg2.connect(host="localhost", port=PORT, user="guest",
+    conn = psycopg2.connect(host="public-udd-mirror.xvm.mit.edu", port=5432,
+                            user="public-udd-mirror", password="public-udd-mirror",
                             database="udd")
 except psycopg2.OperationalError as err:
     try:
@@ -733,7 +734,6 @@ class DependantPackage:
                                     # ... which could be copied to (or from if exists)
                                     # WNPP bug and finally can be used for packaging
         self.desc['en']     = {}    # An English description should be available in any case
-        self.dep_strength   = 0     # Type of Dependency (Depends, Recommends, Suggests, Experimental, New, Avoid, Ignore, WNPP
 
     # sort these objects according to the package name
     def __cmp__(self, other):
@@ -745,8 +745,6 @@ class DependantPackage:
 
     def __str__(self):
         ret = "pkg:"    + self.properties['name']
-        if self.dep_strength:
-            ret += ", Dep_strength: " + self.dep_strength
         if self.desc:
             ret += ", desc: "         + str(self.desc)
         for prop in self.properties:
@@ -853,6 +851,7 @@ class Tasks:
             task for task in os.listdir(self.tasksdir)
             if os.path.isfile(os.path.join(self.tasksdir, task))
         )
+        self.metapackagekeys = ['python']
 
     def GetAllDependencies(self, source=0):
         # If we want to subscribe ddpo we need the source package names.
@@ -897,6 +896,7 @@ class Tasks:
                     metapkg_translations[row['package']] = row
 
         for task in self.metapackagekeys:
+            print(task)
             td = TaskDependencies(self.blendname, task=task, tasksdir=self.tasksdir)
             pkgname = prefix + task
             translations = None
@@ -1083,7 +1083,7 @@ class TaskDependencies:
         # no dupplication in case of source depencencies
         if dep is None:
             return
-        if dep.dep_strength == 'Ignore' or dep.dep_strength == 'Avoid':
+        if dep.properties['dep_strength'] in ('Ignore', 'Avoid'):
             logger.debug("Ignore/Avoid package : %s" % dep.properties['name'])
             return
         if source != 1:
@@ -1194,7 +1194,7 @@ class TaskDependencies:
                             (_name, _url) = email.utils.parseaddr(responsible)
                             dep.properties['maintainer'] = {'name':_name, 'email': _url}
 
-                        dep.dep_strength   = key
+                        dep.properties['dep_strength'] = key
 
                     continue
 
@@ -1413,9 +1413,9 @@ class TaskDependencies:
                 # Debian Edu contains packages from main/debian-installer - that's why we use startswith here
                 if row['component'].startswith('main'):
                     dep.properties['component'] = 'main'
-                    if dep.dep_strength == 'Depends' or dep.dep_strength == 'Recommends':
+                    if dep.properties['dep_strength'] in ('Depends', 'Recommends'):
                         dep.properties['pkgstatus'] = 'official_high'
-                    elif dep.dep_strength == 'Suggests':
+                    elif dep.properties['dep_strength'] == 'Suggests':
                         dep.properties['pkgstatus'] = 'official_low'
                 else:
                     dep.properties['component'] = row['component']
@@ -1657,7 +1657,7 @@ class TaskDependencies:
                                                   'version':row['version']})
                 # Warn about remaining information of prospective package
                 if (dep.desc['en'] and dep.desc['en']['short']) or dep.properties['homepage'] != HOMEPAGENONE:
-                    logger.info("The package %s is not yet in Debian but it is just in Blends %s Vcs. (Task %s)" % (dep.pkg, row['blend'], self.task))
+                    logger.info("The package %s is not yet in Debian but it is just in Blends %s Vcs. (Task %s)" % (dep.properties['name'], row['blend'], self.task))
                 for prop in PROPERTIES:
                     dep.properties[prop] = row[prop]
                 dep.properties['license'] = row['license']
@@ -1733,7 +1733,7 @@ class TaskDependencies:
 
         if has_official == 1:
             if self.properties['component'] == 'main':
-                if self.dep_strength == 'Depends' or self.dep_strength == 'Recommends':
+                if self.properties['dep_strength'] in ('Depends', 'Recommends'):
                     self.properties['pkgstatus'] = 'official_high'
                 else:
                     self.properties['pkgstatus'] = 'official_low'
@@ -1812,7 +1812,7 @@ class TaskDependencies:
                             if responsible:
                                 (_name, _url) = email.utils.parseaddr(responsible)
                                 dep.properties['maintainer'] = {'name':_name, 'email': _url}
-                            dep.dep_strength   = key
+                            dep.properties['dep_strength'] = key
                             dep._QueryUDD4Package(source)
                 else:
                     logger.warning("Dependency with unknown status: %s (Task %s)" % (dep.properties['name'], self.task))

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list