[Blends-commit] r2292 - blends/trunk/webtools
Debian Pure Blends Subversion Commit
noreply at alioth.debian.org
Wed Jul 28 13:59:39 UTC 2010
Author: tille
Date: Wed Jul 28 13:59:37 2010
New Revision: 2292
URL: http://svn.debian.org/viewsvn/blends?rev=2292&view=rev
Log:
Seek for updatable packages to be able to send mail to the relevant mailing list
Added:
blends/trunk/webtools/new_upstream.py (contents, props changed)
Modified:
blends/trunk/webtools/blendstasktools.py
Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/viewsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=2292&view=diff&r1=2292&r2=2291&p1=blends/trunk/webtools/blendstasktools.py&p2=blends/trunk/webtools/blendstasktools.py
==============================================================================
--- blends/trunk/webtools/blendstasktools.py (original)
+++ blends/trunk/webtools/blendstasktools.py Wed Jul 28 13:59:37 2010
@@ -569,10 +569,10 @@
self.properties['pkg-url'] = 'http://ftp-master.debian.org/new/%s_%s.html' % (row['source'], row['version'])
for prop in PROPERTIES:
self.properties[prop] = row[prop]
- self.desc['en']['short'] = MarkupString(unicode(row['description'], 'utf-8'), self.pkg, 'ShortDesc - New')
+ self.desc['en']['short'] = MarkupString(to_unicode(row['description']), self.pkg, 'ShortDesc - New')
self.desc['en']['long'] = Markup(render_longdesc(row['long_description'].splitlines()))
(_name, _url) = email.Utils.parseaddr(row['maintainer'])
- self.responsible = '<a href="mailto:%s">%s</a>' % (_url, unicode(_name, 'utf-8'))
+ self.responsible = '<a href="mailto:%s">%s</a>' % (_url, to_unicode(_name))
print "The package %s is not yet in Debian but it is just in the new queue. (Task %s)" % (self.pkg, self.taskname)
return
@@ -598,7 +598,7 @@
self.component = 'non-free'
else:
self.component = curs.fetchone()[0]
- # Debian Edu contains packages from main/debian-installer
+ # Debian Edu contains packages from main/debian-installer
if self.component == 'main/debian-installer':
self.component = 'main'
self.properties['license'] = license_in_component[self.component]
@@ -690,7 +690,7 @@
self.desc['en']['long'] = Markup(render_longdesc(to_unicode(row['long_description']).splitlines()))
(_name, _url) = email.Utils.parseaddr(row['maintainer'])
self.properties['maintainer'] = to_unicode(row['maintainer'])
- self.responsible = '<a href="mailto:%s">%s</a>' % (_url, unicode(_name, 'utf-8'))
+ self.responsible = '<a href="mailto:%s">%s</a>' % (_url, to_unicode(_name))
if self.properties.has_key('source'):
query = "EXECUTE src_vcs ('%s')" % (self.properties['source'])
@@ -736,7 +736,7 @@
query = "EXECUTE query_get_latest_uploader ('%s')" % (self.src)
curs.execute(query)
try:
- changed = unicode(curs.fetchone()[0], 'utf-8')
+ changed = to_unicode(curs.fetchone()[0])
except TypeError, err:
changed = None
print "Query '%s' does not result in a valid changed entry (%s)" % (query, err)
@@ -877,6 +877,23 @@
ret[task] = list
return ret
+ def GetUpdatablePackages(self, dependencystatus=[]):
+ # List of Updatable packages: sourcepkg, version, upstream version
+ ret = {}
+ use_dependencystatus = GetDependencies2Use(dependencystatus, 'experimental')
+
+ for task in self.metapackagekeys:
+ tdeps = self.tasks[task]
+ list = []
+ for dep in use_dependencystatus:
+ for tdep in tdeps.dependencies[dep]:
+ if tdep.outdated != {}:
+ # versionen sind geordnete Liste ---v--- letztes wird gebraucht
+ list.append((tdep.pkg, tdep.version[-1]['version'], tdep.outdated['version']))
+ if list:
+ ret[task] = list
+ return ret
+
def GetNamesAndSourceDict(self, dependencystatus=()):
# For the bugs pages we need not only the binary package names but the
# source package as well to be able to link to the QA page
@@ -1111,7 +1128,7 @@
if curs.rowcount > 0:
row = RowDictionaries(curs)[0]
(_name, _url) = email.Utils.parseaddr(row['maintainer'])
- self.responsible = '<a href="mailto:%s">%s</a>' % (_url, unicode(_name, 'utf-8'))
+ self.responsible = '<a href="mailto:%s">%s</a>' % (_url, to_unicode(_name))
# if an English description was found chances are good that we are seeking for other languages
# as well
@@ -1125,14 +1142,13 @@
lang = row['language']
self.metapkg.desc[lang] = {}
try:
- # short = unicode(row['description'],'utf-8')
- short = row['description']
- self.metapkg.desc[lang]['short'] = MarkupString(unicode(short, 'utf-8'), \
+ short = to_unicode(row['description'])
+ self.metapkg.desc[lang]['short'] = MarkupString(to_unicode(short), \
self.metapkg.PrintedName, 'taskShortDesc - ' + lang)
except UnicodeEncodeError, err:
print >> stderr, "===> UnicodeDecodeError in metapackage %s (lang='%s'): '%s'; ErrTxt: %s" % \
(self.metapkg.pkg, lang, row['description'], err)
- short = unicode(row['description'],'latin1')
+ short = to_unicode(row['description'],'latin1')
self.metapkg.desc[lang]['short'] = MarkupString(short, \
self.metapkg.PrintedName, 'taskShortDesc - ' + lang)
@@ -1362,12 +1378,6 @@
# Only update use description from task file if not known from official package
if dep.desc['en'] == {}:
(short, long) = SplitDescription(to_unicode(stanza['pkg-description']))
- # If here would be used
- # unicode(long, 'utf-8')
- # this would lead to TypeError problems - and in the end it does not prevent
- # failures like
- # pkgLongDesc UnicodeDecodeError in tinyheb (lang='en'): 'debug-string';
- # ErrTxt: 'ascii' codec can't decode byte 0xc2 in position 108: ordinal not in range(128)
dep.desc['en']['short'] = short
dep.desc['en']['long'] = long
else:
@@ -1558,7 +1568,7 @@
def __init__(self, bug):
self.bug = bug['id']
- self.summary = unicode(bug['title'], 'utf-8')
+ self.summary = to_unicode(bug['title'])
self.severity = bug['severity']
query = "EXECUTE bugs_query_tags (%i)" % self.bug
Added: blends/trunk/webtools/new_upstream.py
==============================================================================
--- (empty file)
+++ blends/trunk/webtools/new_upstream.py Wed Jul 28 13:59:37 2010
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+# Check for packages of Blend which are not up to date and send
+# E-Mail to Blend developer list
+
+from sys import argv, exit, stderr
+
+from blendstasktools import Tasks
+
+if len(argv) <= 1:
+ print >>stderr, "Usage: %s <Blend name>\n The <Blend name> needs a matching config file webconf/<Blend name>.conf"\
+ % argv[0]
+ exit(-1)
+
+tasks = Tasks(argv[1])
+if tasks.data['pkglist'] == '':
+ print >>stderr, "Config file webconf/%s.conf is lacking pkglist field." % (argv[1])
+ exit(-1)
+tasks.GetAllDependencies(source=1)
+packages = tasks.GetUpdatablePackages(dependencystatus=['official_high', 'official_low', 'non-free', 'experimental'])
+
+for task in packages.keys():
+ print "Updatable packages in Task", task
+ for pkg_v_o in packages[task]:
+ print " %s: Highest version in Debian is %s; Upstream has %s" % ( pkg_v_o )
+
+# Perhaps we should also send a mail to pts at qa.debian.org
+# keyword %(pkg) %(list) = bts bts-control upload-source katie-other summary default cvs ddtp derivatives contact
+# to make sure the mailing list gets full information about packages including new upstream etc
+# see http://www.debian.org/doc/manuals/developers-reference/resources.html#pkg-tracking-system
More information about the Blends-commit
mailing list