[Blends-commit] [SCM] website branch, master, updated. 92abd1567e66ff60c769b612d1e0b3473ee414f1
Andreas Tille
tille at debian.org
Tue Jan 12 15:51:29 UTC 2016
The following commit has been merged in the master branch:
commit 92abd1567e66ff60c769b612d1e0b3473ee414f1
Author: Andreas Tille <tille at debian.org>
Date: Tue Jan 12 16:44:12 2016 +0100
Selection of fitting remark needs specification of the task the remark belongs to. So blends_query_packages is changed in UDD and both web sentinel scripts (old + new) are adapted to this new interface
diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 0512a5c..84e6958 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -306,8 +306,8 @@ def _execute_udd_query(query):
except psycopg2.DataError, err:
print >>stderr, "%s; query was\n%s" % (err, query)
-query = """PREPARE query_pkgs (text[],text[]) AS
- SELECT * FROM blends_query_packages($1,$2) AS (
+query = """PREPARE query_pkgs (text[],text[],text) AS
+ SELECT * FROM blends_query_packages($1,$2,$3) AS (
package text, distribution text, release text, component text, version debversion,
maintainer text,
source text, section text, task text, homepage text,
@@ -352,7 +352,8 @@ query = """PREPARE query_pkgs (text[],text[]) AS
description_uk text, long_description_uk text,
description_vi text, long_description_vi text,
"description_zh_CN" text, "long_description_zh_CN" text,
- "description_zh_TW" text, "long_description_zh_TW" text
+ "description_zh_TW" text, "long_description_zh_TW" text,
+ remark text
)"""
_execute_udd_query(query)
@@ -1574,7 +1575,7 @@ class TaskDependencies:
if not alldepends:
logger.warning("No dependencies defined in taskfile %s" % self.task)
return 0 # Failure
- query = "EXECUTE query_pkgs ('%s', '%s')" % (List2PgArray(alldepends), List2PgSimilarArray(alldepends))
+ query = "EXECUTE query_pkgs ('%s', '%s', '%s')" % (List2PgArray(alldepends), List2PgSimilarArray(alldepends), self.task)
_execute_udd_query(query)
pkgs_in_pool = []
enhancing_pkgs = []
diff --git a/webtools_py3/blendstasktools_udd.py b/webtools_py3/blendstasktools_udd.py
index be94d7f..5379bf9 100644
--- a/webtools_py3/blendstasktools_udd.py
+++ b/webtools_py3/blendstasktools_udd.py
@@ -316,8 +316,8 @@ def _execute_udd_query(query):
except psycopg2.DataError as err:
print("%s; query was\n%s" % (err, query), file=stderr)
-query = """PREPARE query_pkgs (text[],text[]) AS
- SELECT * FROM blends_query_packages($1,$2) AS (
+query = """PREPARE query_pkgs (text[],text[],text) AS
+ SELECT * FROM blends_query_packages($1,$2,$3) AS (
package text, distribution text, release text, component text, version debversion,
maintainer text,
source text, section text, task text, homepage text,
@@ -362,7 +362,8 @@ query = """PREPARE query_pkgs (text[],text[]) AS
description_uk text, long_description_uk text,
description_vi text, long_description_vi text,
"description_zh_CN" text, "long_description_zh_CN" text,
- "description_zh_TW" text, "long_description_zh_TW" text
+ "description_zh_TW" text, "long_description_zh_TW" text,
+ remark text
)"""
_execute_udd_query(query)
@@ -1292,6 +1293,11 @@ class TaskDependencies:
dep.properties['maintainer'] = (row['maintainer'])
dep.responsible = '<a href="mailto:%s">%s</a>' % (_url, (_name))
+ if 'remark' in row and row['remark']:
+ (short, long) = SplitDescription(row['remark'])
+ dep.remark['short'] = MarkupString(short.encode('utf-8'), dep.pkg, 'RemarkShort')
+ dep.remark['long'] = MarkupString(long.encode('utf-8'), dep.pkg, 'RemarkLong')
+
# Publications
dep.SetPublications(row)
@@ -1335,7 +1341,7 @@ class TaskDependencies:
dependencies.append(dep)
#self.dependencies[dep.pkgstat].append(dep)
- query = "EXECUTE query_pkgs ('%s', '%s')" % (List2PgArray(alldepends), List2PgSimilarArray(alldepends))
+ query = "EXECUTE query_pkgs ('%s', '%s', '%s')" % (List2PgArray(alldepends), List2PgSimilarArray(alldepends), self.task)
_execute_udd_query(query)
if curs.rowcount > 0:
self.GetDepInfo(curs, dependencies, 1)
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list