Skip to content
Commits on Source (24)
......@@ -30,6 +30,7 @@ define placeholder_substitution
-e 's/__PIUPARTS_VERSION__/$(version)/g' \
-e 's%@libdir@%$(libdir)%g' \
-e 's%@sharedir@%$(sharedir)%g' \
-e 's%@sbindir@%$(sbindir)%g' \
$< > $@
endef
......
......@@ -375,6 +375,10 @@ section, too, and will serve as defaults for all other sections
used for logging stderr output from piuparts-master. This logfile
will be placed in the 'master-directory' and has the PID appended.
* "setarch" contains arguments for an optional 'setarch' command
that can be prepended to the 'piuparts-command'. Recommended value
for running 'i386' tests on an 'amd64' host is 'linux32'.
* "piuparts-command" is the command the slave uses to start
piuparts. It should include 'sudo' if necessary so that piuparts
runs with sufficient priviledges to do its testing (and that
......
......@@ -80,13 +80,13 @@ install_extra_package qflow netgen-lvs
# ruby-psych: Suggests: libpsych-java
install_extra_package ruby-psych libpsych-java
# /usr/lib/slepcdir/slepc3.9/x86_64-linux-gnu-complex/share/slepc/datafiles -> ../../../../../../share/doc/libslepc3.9-dev-examples/datafiles
# libslepc-complex3.9-dev: Suggests: libslepc3.9-dev-examples, slepc3.9-doc
install_extra_package libslepc-complex3.9-dev libslepc3.9-dev-examples slepc3.9-doc
# /usr/lib/slepcdir/slepc3.10/x86_64-linux-gnu-complex/share/slepc/datafiles -> ../../../../../../share/doc/libslepc3.10-dev-examples/datafiles
# libslepc-complex3.10-dev: Suggests: libslepc3.10-dev-examples
install_extra_package libslepc-complex3.10-dev libslepc3.10-dev-examples slepc3.10-doc
# /usr/lib/slepcdir/slepc3.9/x86_64-linux-gnu-real/share/slepc/datafiles -> ../../../../../../share/doc/libslepc3.9-dev-examples/datafiles
# libslepc-real3.9-dev: Suggests: libslepc3.9-dev-examples, slepc3.9-doc
install_extra_package libslepc-real3.9-dev libslepc3.9-dev-examples slepc3.9-doc
# /usr/lib/slepcdir/slepc3.10/x86_64-linux-gnu-real/share/slepc/datafiles -> ../../../../../../share/doc/libslepc3.10-dev-examples/datafiles
# libslepc-real3.10-dev: Suggests: libslepc3.10-dev-examples
install_extra_package libslepc-real3.10-dev libslepc3.10-dev-examples slepc3.10-doc
# /usr/lib/wml/exec/wml_aux_weblint -> ../../../bin/weblint
# /usr/lib/wml/exec/wml_aux_freetable -> ../../../bin/freetable
......@@ -152,18 +152,22 @@ install_extra_package libembperl-perl libjs-prototype
# libgraphicsmagick1-dev: Suggests: graphicsmagick
install_extra_package libgraphicsmagick1-dev graphicsmagick
# /usr/share/doc/libjs-mocha/example/chai.js -> ../../../javascript/chai/chai.js
# libjs-mocha: Suggests: libjs-chai
install_extra_package libjs-mocha libjs-chai
# /usr/share/doc/libjs-sprintf-js/examples/angular.min.js -> ../../../javascript/angular.js/angular.min.js
# libjs-sprintf-js: Suggests: libjs-angularjs
install_extra_package libjs-sprintf-js libjs-angularjs
# /usr/share/doc/libpetsc3.9-dev-examples/include -> ../petsc3.9-doc/include
# /usr/share/doc/libpetsc3.9-dev-examples/docs -> ../petsc3.9-doc/docs
# libpetsc3.9-dev-examples: Suggests: petsc3.9-doc
install_extra_package libpetsc3.9-dev-examples petsc3.9-doc
# /usr/share/doc/libpetsc3.10-dev-examples/docs -> ../petsc3.10-doc/docs (libpetsc3.10-dev-examples)
# /usr/share/doc/libpetsc3.10-dev-examples/include -> ../petsc3.10-doc/include (libpetsc3.10-dev-examples)
# libpetsc3.10-dev-examples: Suggests: petsc3.10-doc
install_extra_package libpetsc3.10-dev-examples petsc3.10-doc
# /usr/share/doc/libslepc3.9-dev-examples/examples/docs -> ../../slepc3.9-doc/docs
# libslepc3.9-dev-examples: Suggests: slepc3.9-doc
install_extra_package libslepc3.9-dev-examples slepc3.9-doc
# /usr/share/doc/libslepc3.10-dev-examples/examples/docs -> ../../slepc3.10-doc/docs
# libslepc3.10-dev-examples: Suggests: slepc3.10-doc
install_extra_package libslepc3.10-dev-examples slepc3.10-doc
# /usr/share/doc/libvirt-doc/changelog.gz -> ../libvirt0/changelog.gz
install_extra_package libvirt-doc libvirt0
......@@ -171,6 +175,12 @@ install_extra_package libvirt-doc libvirt0
# /usr/share/doc/mkvtoolnix/README.source -> ../quilt/README.source
install_extra_package mkvtoolnix quilt nullmailer
# /usr/share/doc/node-setimmediate/examples/chai.js -> ../../../javascript/chai/chai.js
# /usr/share/doc/node-setimmediate/examples/mocha.css -> ../../../javascript/mocha/mocha.css
# /usr/share/doc/node-setimmediate/examples/mocha.js -> ../../../javascript/mocha/mocha.js
# node-setimmediate: Suggests: libjs-mocha, libjs-chai
install_extra_package node-setimmediate libjs-chai libjs-mocha
# /usr/share/doc/python-ly/html -> ../python-ly-doc/html
# python-ly: Suggests: python-ly-doc
install_extra_package python-ly python-ly-doc
......@@ -234,6 +244,10 @@ install_extra_package org-mode ditaa
# python-biopython: Suggests: w3-dtd-mathml
install_extra_package python-biopython w3-dtd-mathml
# /usr/lib/python2.7/dist-packages/sas/sasview/doc -> ../../../../../share/doc/sasview/html
# python-sasview: Suggests: sasview-doc
install_extra_package python-sasview sasview-doc
# /usr/share/pyshared/MoinMoin/words -> /etc/moin/words
# /etc/moin/words -> /usr/share/dict/words
install_extra_package python-moinmoin wamerican
......@@ -323,6 +337,11 @@ create_extra_file vdr /var/cache/vdr/commands.conf /var/cache/vdr/reccmds.con
# /etc/vdr/plugins/xineliboutput/config -> /var/lib/vdr/plugins/xineliboutput/config
create_extra_file vdr-plugin-xineliboutput /var/lib/vdr/plugins/xineliboutput/config
# /usr/lib/mesa-diverted/i386-linux-gnu/libGLX_indirect.so.0 -> libGLX_mesa.so.0
# /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLX_indirect.so.0 -> libGLX_mesa.so.0
create_extra_file glx-diversions /usr/lib/mesa-diverted/i386-linux-gnu/libGLX_mesa.so.0
create_extra_file glx-diversions /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLX_mesa.so.0
# /usr/sbin/ganeti-masterd -> ../share/ganeti/default/ganeti-masterd
# #857289
create_extra_file ganeti /usr/share/ganeti/default/ganeti-masterd
......
......@@ -88,6 +88,7 @@ if [ -d /var/lib/mysql ]; then
echo "mariadb-server-10.0 mysql-server-10.0/postrm_remove_databases boolean true" | debconf-set-selections
echo "mariadb-server-10.0 mariadb-server-10.0/postrm_remove_databases boolean true" | debconf-set-selections
echo "mariadb-server-10.1 mariadb-server-10.1/postrm_remove_databases boolean true" | debconf-set-selections
echo "mariadb-server-10.3 mariadb-server-10.3/postrm_remove_databases boolean true" | debconf-set-selections
echo "percona-xtradb-cluster-server-5.5 mysql-server-5.1/postrm_remove_databases boolean true" | debconf-set-selections
fi
......
......@@ -38,6 +38,28 @@ case "$PIUPARTS_DISTRIBUTION_NEXT" in
;;
esac
case "$PIUPARTS_DISTRIBUTION_NEXT" in
wheezy)
CANDIDATES="$CANDIDATES mysql-server-5.5"
CANDIDATES="$CANDIDATES postgresql-9.1"
;;
jessie)
CANDIDATES="$CANDIDATES mysql-server-5.5"
CANDIDATES="$CANDIDATES mariadb-server-10.0"
CANDIDATES="$CANDIDATES postgresql-9.4"
;;
stretch)
CANDIDATES="$CANDIDATES mariadb-server-10.1"
CANDIDATES="$CANDIDATES postgresql-9.6"
;;
buster)
CANDIDATES="$CANDIDATES mariadb-server-10.3"
CANDIDATES="$CANDIDATES postgresql-11"
;;
esac
PACKAGES=
RETRY="false"
......
......@@ -78,6 +78,7 @@ case ${PIUPARTS_OBJECTS%%=*} in
heat-common) SQLITE3=yes ;;
heat-engine) SQLITE3=yes ;;
icinga-idoutils) POSTGRESQL=yes ;;
icinga-idoutils-dbgsym) POSTGRESQL=yes ;;
icinga-phpapi) MYSQL=yes ;;
icinga-web) POSTGRESQL=yes ;;
icinga-web-config-icinga) POSTGRESQL=yes ;;
......@@ -101,6 +102,7 @@ case ${PIUPARTS_OBJECTS%%=*} in
moodle-book) POSTGRESQL=yes ;;
moodle-debian-edu-*) POSTGRESQL=yes ;;
movabletype-opensource) SQLITE3=yes ;;
movim) POSTGRESQL=yes ;;
mtop) MYSQL=yes ;;
mythtv-database) MYSQL=yes ;;
nagvis) MYSQL=yes ;;
......
piuparts (0.97) unstable; urgency=medium
[ Andreas Beckmann ]
* Ignore broken /var/lib/mender symlink. (Closes: #915680)
* scripts/pre_distupgrade_zz_database-server: Also act on dist-upgrades
within a release, e.g. stable -> stable-proposed-updates.
* piuparts-slave.py:
- Support prepending a setarch command to the piuparts invocation.
* piuparts-report.py:
- Report [cruft] in logfile lists.
[ David Steele ]
* instances/piuparts.conf-template.pejacevic:
- report results of stable2sid to DDPO.
- swap stable2sid and stable22sid priorities, to promote the one reported
to DDPO.
[ Holger Levsen ]
* slave_bin: on stop, show what's keeping the slaves busy, to identify
packages with a very long installation time.
* Makefile: include @sbindir@ in placeholder_substitution.
* instances/piuparts.conf-template.pejacevic: lower priorities of oldstable
suites.
[ Herbert Fortes ]
* piuparts.py, piuparts-slave.py, piupartslib/pkgsummary.py and
piuparts-analyze.py: add '()' to print. Py2 and Py3 compatible.
* piupartslib/dwke.py:
- class Problem:
- Class attr instead of instance attr
Save some memory
- get_file_dict function:
- dictionary comprehension. "More readable and
often faster at the same time".
- create_problem_list function:
- list.sort() instead of sorted(list).
sorted() returns a *new* sorted list. This is
not necessary here.
list.sort() sorts the list in place.
Save some memory
- make_kprs function: do not concat str, simplify 'if' statement.
-- Holger Levsen <holger@debian.org> Mon, 11 Feb 2019 12:30:10 +0100
piuparts (0.96) unstable; urgency=medium
[ Andreas Beckmann ]
......
......@@ -332,8 +332,7 @@ reschedule-old-count = 0
[stable2sid]
precedence = 10
json-sections = none
precedence = 4
description = + Find possible issues before the package migrates to testing.
piuparts-flags =
%(flags-default)s
......@@ -343,7 +342,7 @@ upgrade-test-distros = stable sid
[stable22sid]
precedence = 4
precedence = 5
json-sections = none
piuparts-flags =
%(flags-default)s
......@@ -353,7 +352,7 @@ upgrade-test-distros = stable testing sid
[oldstable222sid]
precedence = 5
precedence = 6
json-sections = none
piuparts-flags =
%(flags-default)s
......@@ -363,7 +362,7 @@ upgrade-test-distros = oldstable stable testing sid
[oldstable22testing]
precedence = 6
precedence = 7
json-sections = none
piuparts-flags =
%(flags-default)s
......@@ -407,7 +406,7 @@ upgrade-test-distros = stretch buster
[stretch2buster-rcmd]
precedence = 6
precedence = 5
json-sections = none
description = + Testing with --install-recommends.
piuparts-flags =
......@@ -509,7 +508,7 @@ upgrade-test-distros = stretch stretch-proposed
[jessie2stretch]
precedence = 4
precedence = 5
json-sections = none
piuparts-flags =
%(flags-default)s
......@@ -520,7 +519,7 @@ upgrade-test-distros = jessie stretch
[jessie2Xstretch]
precedence = 4
precedence = 5
json-sections = none
description = + Testing two-stage upgrades.
piuparts-flags =
......@@ -585,7 +584,7 @@ upgrade-test-distros = jessie jessie-backports stretch
[jessie2bpo]
precedence = 5
precedence = 6
json-sections = none
piuparts-flags =
%(flags-default)s
......@@ -597,7 +596,7 @@ upgrade-test-distros = jessie jessie-backports
[jessie]
precedence = 5
precedence = 6
piuparts-flags =
%(flags-default)s
%(flags-start-jessie)s
......@@ -606,7 +605,7 @@ distro = jessie
[jessie-rcmd]
precedence = 5
precedence = 6
json-sections = none
description = + With recommended packages.
piuparts-flags =
......@@ -618,7 +617,7 @@ distro = jessie
[jessie-security]
precedence = 2
precedence = 3
json-sections = none
piuparts-flags =
%(flags-default)s
......@@ -629,7 +628,7 @@ distro = jessie/updates
[jessie-pu]
precedence = 4
precedence = 5
json-sections = none
piuparts-flags =
%(flags-default)s
......@@ -640,7 +639,7 @@ distro = jessie-proposed-updates
[jessie-lts]
precedence = 4
precedence = 5
json-sections = none
piuparts-flags =
%(flags-default)s
......@@ -650,7 +649,7 @@ distro = jessie-lts
[jessie2lts]
precedence = 4
precedence = 5
json-sections = none
piuparts-flags =
%(flags-default)s
......
This diff is collapsed.
......@@ -27,7 +27,7 @@ get_config_value URLBASE global urlbase https://piuparts.debian.org
get_config_value DAYS global reschedule-untestable-days 7
ISSUE_LOG="$MASTER/archive_issues.txt"
LOG_OUTPUT=`mktemp`
LOG_OUTPUT=$(mktemp)
LOG_PREFIX=$(mktemp)
STARTDATE=$(date -u +%s)
......@@ -36,8 +36,8 @@ STARTDATE=$(date -u +%s)
# detect packages which are/were untestable due to archive issue and mark them as such
#
LOGS=`mktemp`
URLS=`mktemp`
LOGS=$(mktemp)
URLS=$(mktemp)
for SECTION in $SECTIONS ; do
test -d $MASTER/$SECTION || continue
URL_SED="s#$MASTER/$SECTION/fail#$URLBASE/$SECTION/untestable#"
......
......@@ -65,7 +65,7 @@ add_pattern "ERROR: Command failed \(status=-7\):.*'apt-get', 'update'"
add_pattern 'Package .* .* not found in .*, .* is available'
add_pattern "AppStream system cache was updated, but problems were found: Metadata files have errors"
FILE=`mktemp`
FILE=$(mktemp)
for SECTION in $SECTIONS ; do
test -d $MASTER/$SECTION || continue
for subdir in fail bugged affected untestable ; do
......
......@@ -87,7 +87,7 @@ add_pattern "^NameError:"
add_pattern "^OSError:"
add_pattern "^SyntaxError:"
FILE=`mktemp`
FILE=$(mktemp)
for SECTION in $SECTIONS ; do
test -d $MASTER/$SECTION || continue
for subdir in fail bugged affected ; do
......
......@@ -28,7 +28,7 @@ get_config_value HTDOCS global output-directory
#
DAYS=1
LOGS=`mktemp`
LOGS=$(mktemp)
for SECTION in $SECTIONS ; do
test -d $MASTER/$SECTION/reserved || continue
find $MASTER/$SECTION/reserved/ -mtime +$DAYS -name "*.log" 2>/dev/null >> $LOGS
......
......@@ -33,7 +33,7 @@ LOG_PREFIX=$(mktemp)
# find packages which have been in untestable for more than $DAYS days and reschedule them for testing
#
LOGS=`mktemp`
LOGS=$(mktemp)
for SECTION in $SECTIONS ; do
# only act on sections with precedence < 100
get_config_value PRECEDENCE $SECTION precedence 1
......
......@@ -29,7 +29,7 @@ headers of the log in ./fail to the one in ./bugged and vice versa. It will then
move the failed log to ./bugged as well.
"""
from __future__ import print_function
import os
import sys
......@@ -311,7 +311,7 @@ def mark_logs_with_reported_bugs():
raise
except:
print('ERROR processing %s' % failed_log)
print sys.exc_info()[0]
print(sys.exc_info()[0])
alarm(0)
......
......@@ -287,7 +287,7 @@ LOG_LIST_BODY_TEMPLATE = """
<tr class="normalrow">
<td class="contentcell2" colspan="2">
$preface
The list has $count packages, with $versioncount total versions.
The list has $count packages.
</td>
</tr>
$logrows
......@@ -891,14 +891,18 @@ class Section:
names = sorted(packages.keys())
lines = []
version_count = 0
for package in names:
versions = []
for pathname, version in packages[package]:
version_count += 1
versions.append("<a href=\"%s\">%s</a>" %
cruft = ""
bin_pkg = self._binary_db.get_package(package)
if self._source_db.has_package(bin_pkg.source()) and \
bin_pkg.source_version() != self._source_db.get_version(bin_pkg.source()):
cruft = " [cruft]"
versions.append("<a href=\"%s\">%s</a>%s" %
(html_protect(pathname),
html_protect(version)))
html_protect(version),
cruft))
line = "<tr class=\"normalrow\"><td class=\"contentcell2\">%s</td><td class=\"contentcell2\">%s</td></tr>" % \
(html_protect(package),
", ".join(versions))
......@@ -918,7 +922,6 @@ class Section:
"title_style": title_style,
"preface": preface,
"count": len(packages),
"versioncount": version_count,
"logrows": "".join(lines),
})
......
......@@ -22,7 +22,7 @@
Lars Wirzenius <liw@iki.fi>
"""
from __future__ import print_function
import os
import sys
......@@ -84,6 +84,7 @@ class Config(piupartslib.conf.Config):
"master-command": None,
"proxy": None,
"mirror": None,
"setarch": None,
"piuparts-command": "sudo piuparts",
"piuparts-flags": "",
"tmpdir": None,
......@@ -115,15 +116,15 @@ def alarm_handler(signum, frame):
def sigint_handler(signum, frame):
global interrupted
interrupted = True
print '\nSlave interrupted by the user, waiting for the current test to finish.'
print 'Press Ctrl-C again to abort now.'
print('\nSlave interrupted by the user, waiting for the current test to finish.')
print('Press Ctrl-C again to abort now.')
signal(SIGINT, old_sigint_handler)
def sighup_handler(signum, frame):
global got_sighup
got_sighup = True
print 'SIGHUP: Will flush finished logs.'
print('SIGHUP: Will flush finished logs.')
class MasterIsBusy(Exception):
......@@ -675,7 +676,11 @@ class Section:
distupgrade = len(self._config.get_distros()) > 1
command = self._config["piuparts-command"].split()
command = []
if self._config["setarch"]:
command.append("setarch")
command.extend(self._config["setarch"].split())
command.extend(self._config["piuparts-command"].split())
if self._config["piuparts-flags"]:
command.extend(self._config["piuparts-flags"].split())
if "http_proxy" in os.environ:
......@@ -820,7 +825,7 @@ def run_test_with_timeout(cmd, maxwait, kill_all=True):
stdout, stderr = ps.communicate()
pids.extend([int(pid) for pid in stdout.split()])
if p.poll() is None:
print 'Sending SIGINT...'
print('Sending SIGINT...')
try:
os.killpg(os.getpgid(p.pid), SIGINT)
except OSError:
......@@ -831,7 +836,7 @@ def run_test_with_timeout(cmd, maxwait, kill_all=True):
if p.poll() is not None:
break
if p.poll() is None:
print 'Sending SIGTERM...'
print('Sending SIGTERM...')
p.terminate()
# piuparts has 5 seconds to clean up after SIGTERM
for i in range(10):
......@@ -839,13 +844,13 @@ def run_test_with_timeout(cmd, maxwait, kill_all=True):
if p.poll() is not None:
break
if p.poll() is None:
print 'Sending SIGKILL...'
print('Sending SIGKILL...')
p.kill()
for pid in pids:
if pid > 0:
try:
os.kill(pid, SIGKILL)
print "Killed %d" % pid
print("Killed %d" % pid)
except OSError:
pass
......@@ -864,11 +869,11 @@ def run_test_with_timeout(cmd, maxwait, kill_all=True):
terminate_subprocess(p, kill_all)
return -1, stdout
except KeyboardInterrupt:
print '\nSlave interrupted by the user, cleaning up...'
print('\nSlave interrupted by the user, cleaning up...')
try:
terminate_subprocess(p, kill_all)
except KeyboardInterrupt:
print '\nTerminating piuparts was interrupted... manual cleanup still neccessary.'
print('\nTerminating piuparts was interrupted... manual cleanup still neccessary.')
raise
raise
......@@ -880,7 +885,11 @@ def run_test_with_timeout(cmd, maxwait, kill_all=True):
def create_chroot(config, tarball, distro):
command = config["piuparts-command"].split()
command = []
if config["setarch"]:
command.append("setarch")
command.extend(config["setarch"].split())
command.extend(config["piuparts-command"].split())
if config["piuparts-flags"]:
command.extend(config["piuparts-flags"].split())
if "http_proxy" in os.environ:
......@@ -1002,8 +1011,8 @@ if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print ''
print 'Slave interrupted by the user, exiting...'
print('')
print('Slave interrupted by the user, exiting...')
sys.exit(1)
# vi:set et ts=4 sw=4 :
......@@ -30,7 +30,7 @@ more usage information.
Lars Wirzenius <liw@iki.fi>
"""
from __future__ import print_function
VERSION = "__PIUPARTS_VERSION__"
......@@ -3175,7 +3175,7 @@ def main():
# check if user has root privileges
if os.getuid():
print 'You need to be root to use piuparts.'
print('You need to be root to use piuparts.')
sys.exit(1)
logging.info("-" * 78)
......@@ -3230,18 +3230,18 @@ if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print ''
print 'Piuparts interrupted by the user, exiting...'
print('')
print('Piuparts interrupted by the user, exiting...')
panic(1)
sys.exit(1)
except SystemExit:
raise
except:
print ''
print 'Piuparts caught exception, exiting...'
print '-'*60
print('')
print('Piuparts caught exception, exiting...')
print('-'*60)
traceback.print_exc(file=sys.stdout)
print '-'*60
print('-'*60)
panic(1)
raise
......
......@@ -34,6 +34,8 @@ LOG_EXT = '.log'
class Problem():
""" Encapsulate a particular known problem """
required_tags = ["PATTERN", "WHERE", "ISSUE", "HEADER", "HELPTEXT"]
optional_tags = ["EXCLUDE_PATTERN", "EXPLAIN", "PRIORITY"]
def __init__(self, probpath):
"""probpath is the path to the problem definition file"""
......@@ -44,10 +46,6 @@ class Problem():
self.tags_are_valid = True
self.required_tags = ["PATTERN", "WHERE", "ISSUE",
"HEADER", "HELPTEXT"]
self.optional_tags = ["EXCLUDE_PATTERN", "EXPLAIN", "PRIORITY"]
self.init_problem()
for tag in self.required_tags:
......@@ -194,22 +192,19 @@ def get_file_dict(workdirs, ext):
"""For files in [workdirs] with extension 'ext', create a dict of
<pkgname>_<version>: <path>"""
filedict = {}
for dir in workdirs:
for fl in os.listdir(dir):
if os.path.splitext(fl)[1] == ext:
filedict[os.path.splitext(os.path.basename(fl))[0]] \
= os.path.join(dir, fl)
return filedict
return {os.path.splitext(os.path.basename(fl))[0]: os.path.join(d, fl)
for d in workdirs
for fl in os.listdir(d)
if os.path.splitext(fl)[1] == ext}
def create_problem_list(pdir):
plist = []
pdir_list = os.listdir(pdir)
pdir_list.sort()
for pfile in [x for x in sorted(os.listdir(pdir)) if x.endswith(".conf")]:
for pfile in [x for x in pdir_list if x.endswith(".conf")]:
prob = Problem(os.path.join(pdir, pfile))
if prob.valid():
......@@ -258,13 +253,14 @@ def make_kprs(logdict, kprdict, problem_list):
where = get_where(logpath)
kprs = ""
for problem in problem_list:
if problem.has_problem(logbody, where):
kprs += "%s/%s.log %s\n" % (where, pkg_spec, problem.name)
kprs = ["%s/%s.log %s\n" % (where, pkg_spec, problem.name)
for problem in problem_list
if problem.has_problem(logbody, where)]
kprs = ''.join(kprs)
if not where in ['pass'] and not len(kprs):
kprs += "%s/%s.log %s\n" % (where, pkg_spec, "unclassified_failures.conf")
if where != 'pass' and not kprs:
kprs = "%s/%s.log %s\n" % (where, pkg_spec, "unclassified_failures.conf")
with open(get_kpr_path(logpath), 'w') as f:
f.write(kprs)
......
......@@ -78,7 +78,7 @@
#
# The global file also includes an 'overall' json-section, which contains
# the 'worst' result across the other json-sections.
from __future__ import print_function
import json
import datetime
......@@ -240,4 +240,4 @@ if __name__ == '__main__':
for pkg in summary['packages']:
flag, blocked, url = summary['packages'][pkg][DEFSEC]
print pkg, flag, url, tooltip(summary, pkg)
print(pkg, flag, url, tooltip(summary, pkg))