[Blends-commit] r3346 - /blends/trunk/webtools/blendstasktools.py
tille at users.alioth.debian.org
tille at users.alioth.debian.org
Wed May 23 19:16:41 UTC 2012
Author: tille
Date: Wed May 23 19:16:40 2012
New Revision: 3346
URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3346
Log:
Fetch license and wnpp bug number for blends-prospective packages from UDD
Modified:
blends/trunk/webtools/blendstasktools.py
Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=3346&op=diff
==============================================================================
--- blends/trunk/webtools/blendstasktools.py (original)
+++ blends/trunk/webtools/blendstasktools.py Wed May 23 19:16:40 2012
@@ -361,7 +361,8 @@
p.vcs_type AS "vcs-type",
p.vcs_browser AS "vcs-browser",
p.blend,
- p.license
+ p.license,
+ p.wnpp
FROM blends_prospectivepackages p
WHERE package = ANY ($1)"""
_execute_udd_query(query)
@@ -1263,6 +1264,9 @@
% (key, stanza[key.lower()]))
elif key == 'License':
if dep != None:
+ if dep.vcs_found == 1 and dep.properties.has_key(key.lower()):
+ fields_obsolete.append(key)
+ continue
dep.properties[key.lower()] = stanza[key.lower()]
else:
logger.error("Dep not initiated before %s %s -> something is wrong." \
@@ -1290,6 +1294,9 @@
% (key, stanza[key.lower()]))
elif key == 'WNPP':
if dep != None:
+ if dep.vcs_found == 1 and dep.properties.has_key(key.lower()):
+ fields_obsolete.append(key)
+ continue
wnpp = stanza['wnpp'].strip()
# in case somebody prepended a '#' sign before the bug number
wnpp = re.sub('^#', '', wnpp)
@@ -1567,7 +1574,6 @@
dep.responsible = '<a href="mailto:%s">%s</a>' % (_url, to_unicode(_name))
pkgs_in_pool.append(dep.pkg)
- # print "DEBUG: In task %s are the following enhancing packages" % self.task, enhancing_pkgs
# DEBUG
# print dep
@@ -1692,6 +1698,8 @@
dep.properties[prop] = row[prop]
for prop in ('vcs-url', 'vcs-browser', 'vcs-type', 'license'):
dep.properties[prop] = row[prop]
+ if int(row['wnpp']) > 0:
+ dep.properties['wnpp'] = row['wnpp']
dep.desc['en']['short'] = MarkupString(to_unicode(row['description_en']), dep.pkg, 'ShortDesc - New')
dep.desc['en']['long'] = Markup(render_longdesc(row['long_description_en'].splitlines()))
(_name, _url) = email.Utils.parseaddr(row['maintainer'])
More information about the Blends-commit
mailing list