pre_distupgrade_debug_packagemanager: enable Debug::pkgPackageManager

Signed-off-by: Andreas Beckmann <anbe@debian.org>
lib/db: simplify _find_packages_ready_for_testing()

Signed-off-by: Andreas Beckmann <anbe@debian.org>
lib/db: remove reserved packages from candidates

avoid rrdeps computation if not needed
avoid O(n^2) looping over previously reserved packages

Signed-off-by: Andreas Beckmann <anbe@debian.org>
make tmpdir setting mandatory for master/slave operation

use /var/cache/piuparts/tmp for the piuparts-slave package

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p.conf: add [global] PYTHONPATH setting

for non-default installations that use piuparts from git
in some other location than /usr

Signed-off-by: Andreas Beckmann <anbe@debian.org>
master-bin/slave-bin: get PYTHONPATH from piuparts.conf

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p.conf: get rid of [global] prefix setting

obsoleted by PYTHONPATH setting and @sharedir@ substitution

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p.conf: reorder/reformat some config settings

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p.conf: wrap sections, piuparts-command, and piuparts-flags

for better readability and easier patching

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p.conf: make bts-from optional

and let piuparts-analyze skip the updating part if DEBEMAIL is not set

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-s: add support for running piuparts under /usr/bin/timeout

timeout (from coreutils) seems to be more able to reliably kill
hanging piuparts processes than the piuparts-slave internal
implementation

one reason might be that it will run as root like the piuparts
process it is managing

handle the return values from timeout accordingly

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p.conf: use /usr/bin/timeout to ensure piuparts termination

timeout -s INT -k 5m 35m

-s INT    send SIGINT after runtime was exceeded
-k 5m     send SIGKILL 5 minutes later
35m       set limit to 35 minutes

(piuparts-slave has a hardcoded limit of 45 minutes)

Signed-off-by: Andreas Beckmann <anbe@debian.org>