[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.51
David Steele
dsteele at gmail.com
Wed May 15 10:09:37 UTC 2013
The following commit has been merged in the master branch:
commit 9ca553969ac68f3c8087f6a84e73e242b866ffce
Author: David Steele <dsteele at gmail.com>
Date: Mon Feb 18 23:21:31 2013 -0500
detect_well_known_errors - Add PTS link to issue/error entries.
diff --git a/debian/changelog b/debian/changelog
index 3ac2520..f3a99b1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,7 @@ piuparts (0.51) UNRELEASED; urgency=low
- Replace the bash script with an equivalent Python script.
- Sort known error and issue packages by reverse dependency count.
(Closes: #698526)
+ - Add a PTS link to issue and error summary entries.
- Minor HTML syntax fix.
- Minor template integration.
diff --git a/master-bin/detect_well_known_errors b/master-bin/detect_well_known_errors
index 2984664..38ae96a 100755
--- a/master-bin/detect_well_known_errors
+++ b/master-bin/detect_well_known_errors
@@ -63,6 +63,7 @@ $PACKAGE_LIST
PKG_ERROR_TPL = \
"""<li>$RDEPS - <a href=\"$LOG\">$LOG</a>
+ (<a href=\"http://packages.qa.debian.org/$SDIR/$SPKG.html\">PTS</a>)
(<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\" target=\"_blank\">BTS</a>)
$BUG</li>
"""
@@ -216,6 +217,17 @@ def get_kpr_path( logpath ):
"""Return the kpr file path for a particular log path"""
return( replace_ext( logpath, KPR_EXT ) )
+def pts_subdir( source ):
+ if source[:3] == "lib":
+ return source[:4]
+ else:
+ return source[:1]
+
+def source_pkg( pkgspec, db ):
+ source_name = db.get_control_header(get_pkg(pkgspec), "Source")
+
+ return( source_name )
+
def get_file_dict( workdirs, ext ):
"""For files in [workdirs] with extension 'ext', create a dict of
<pkgname>_<version>: <path>"""
@@ -314,11 +326,22 @@ def update_tpl( basedir, section, problem, failures, logdict, ftpl, ptpl, pkgsdb
pkg_text = ""
for failure in failures:
- pkg_text += populate_tpl(ftpl, {
- 'LOG': section_path(logdict[failure.pkgspec]),
- 'PACKAGE': get_pkg(failure.pkgspec),
- 'BUG': get_bug_text(logdict[failure.pkgspec]),
- 'RDEPS': pkgsdb.get_package(failure.pkgspec.split('_')[0]).rrdep_count()
+ pkgspec = failure.pkgspec
+ bin_pkg = get_pkg(pkgspec)
+ try:
+ src_pkg = source_pkg(pkgspec, pkgsdb)
+ rdep_cnt = pkgsdb.get_package(bin_pkg).rrdep_count()
+ except KeyError:
+ src_pkg = bin_pkg
+ rdep_cnt = 0
+
+ pkg_text += populate_tpl(ftpl, {
+ 'LOG': section_path(logdict[pkgspec]),
+ 'PACKAGE': bin_pkg,
+ 'BUG': get_bug_text(logdict[pkgspec]),
+ 'RDEPS': rdep_cnt,
+ 'SDIR':pts_subdir(src_pkg),
+ 'SPKG':src_pkg,
} )
if len(pkg_text):
--
piuparts git repository
More information about the Piuparts-commits
mailing list