[Blends-commit] [SCM] website branch, master, updated. 36d051751e2abf937ed2cb967d2cd5c83263aaaf

Ole Streicher olebole at debian.org
Fri Mar 18 07:57:23 UTC 2016


The following commit has been merged in the master branch:
commit 36d051751e2abf937ed2cb967d2cd5c83263aaaf
Author: Ole Streicher <olebole at debian.org>
Date:   Fri Mar 18 08:56:30 2016 +0100

    Revert "Remove vcs_found property"
    This was a bad idea :-(
    
    This reverts commit f74555259f2e9dfcff5d2cbc9053f170c588b64b.

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index d626d7e..ed44c16 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -738,6 +738,7 @@ class DependantPackage:
         self.properties['Enhances'] = {}  # Dictionary Enhancing pkg name as key, Link to package information as value; empty in most cases
                                           # because Enhances relations are quite seldom
         self.properties['stable_testing_version'] = []  # (release, version) tuples where release is codename for stable and testing
+        self.vcs_found      = 0     # we need a flag to store the fact whether Vcs information of a package is in UDD
         self.version        = []    # list of {'release', 'version', 'archs'} dictionary containing version and architecture information
         self.outdated       = {}    # If not empty directory then release='upstream' and package is outdated
         self.popcon         = {}    # dictionary containing vote and recnt values of popcon information
@@ -1282,7 +1283,7 @@ class TaskDependencies:
                 elif key == 'Vcs-Svn' or key == 'vcs-svn':  # strangely enough on alioth the later
                                                             # spelling seems to be needed - no idea why
                     if dep is not None:
-                        if 'vcs-url' in dep.properties:
+                        if dep.vcs_found == 1:
                             fields_obsolete.append(key)
                             continue
                         dep.properties['vcs-url']  = stanza['vcs-svn']
@@ -1301,7 +1302,7 @@ class TaskDependencies:
                 elif key == 'Vcs-Git' or key == 'vcs-git':  # strangely enough on alioth the later
                                                             # spelling seems to be needed - no idea why
                     if dep is not None:
-                        if 'vcs-url' in dep.properties:
+                        if dep.vcs_found == 1:
                             fields_obsolete.append(key)
                             continue
                         dep.properties['vcs-url']  = stanza['vcs-git']
@@ -1315,7 +1316,7 @@ class TaskDependencies:
                 elif key == 'Vcs-Browser' or key == 'vcs-browser':  # strangely enough on alioth the later
                                                                     # spelling seems to be needed - no idea why
                     if dep is not None:
-                        if 'vcs-url' in dep.properties:
+                        if dep.vcs_found == 1:
                             fields_obsolete.append(key)
                             continue
                         dep.properties['vcs-browser'] = stanza['vcs-browser']
@@ -1344,7 +1345,7 @@ class TaskDependencies:
                                      % (key, stanza[key.lower()]))
                 elif key == 'License':
                     if dep is not None:
-                        if 'vcs-url' in dep.properties and key.lower() in dep.properties:
+                        if dep.vcs_found == 1 and key.lower() in dep.properties:
                             fields_obsolete.append(key)
                             continue
                         dep.properties[key.lower()]  = stanza[key.lower()]
@@ -1374,7 +1375,7 @@ class TaskDependencies:
                                      % (key, stanza[key.lower()]))
                 elif key == 'WNPP':
                     if dep is not None:
-                        if 'vcs-url' in dep.properties and key.lower() in dep.properties:
+                        if dep.vcs_found == 1 and key.lower() in dep.properties:
                             fields_obsolete.append(key)
                             continue
                         wnpp = stanza['wnpp'].strip()
@@ -1823,6 +1824,7 @@ class TaskDependencies:
                 # There is only one line returned by this query
                 row = RowDictionaries(curs)[0]
                 # If some information about Vcs is found in the database make sure it is ignored from tasks file
+                self.vcs_found = 1
                 for prop in row.keys():
                     if row[prop]:
                         self.properties[prop] = row[prop]
diff --git a/webtools/blendstasktools_udd.py b/webtools/blendstasktools_udd.py
index 3fe768e..ddedbf1 100644
--- a/webtools/blendstasktools_udd.py
+++ b/webtools/blendstasktools_udd.py
@@ -694,6 +694,7 @@ class DependantPackage:
         self.properties['Enhances'] = {}  # Dictionary Enhancing pkg name as key, Link to package information as value; empty in most cases
                                           # because Enhances relations are quite seldom
         self.properties['stable_testing_version'] = []  # (release, version) tuples where release is codename for stable and testing
+        self.vcs_found      = 0     # we need a flag to store the fact whether Vcs information of a package is in UDD
         self.version        = []    # list of {'release', 'version', 'archs'} dictionary containing version and architecture information
         self.outdated       = {}    # If not empty directory then release='upstream' and package is outdated
         self.popcon         = {}    # dictionary containing vote and recnt values of popcon information

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list