p-m: support switching the logfile while master is running

start with logging to stderr and loglevel INFO until a section
logfile is opened

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-m: consolidate section initialization in Section

move section initialization from main() into Section

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-m: gracefully handle missing sections

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-m: add "section" command to master-slave protocol

Adds support for selecting the section inside the protocol
instead of requiring a command line parameter.
Forbid all other commands as long as no section was selected.

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-m: allow switching sections without reconnecting

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-s: use the "section" command to request a section

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-m: don't take a section argument from the command line

obsoleted by the new "section" command

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-m: don't exit after selecting a busy or unknown section

allow another section command to try the next section

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-s: don't pass command line arguments to master

superseded by the "section" command

Signed-off-by: Andreas Beckmann <anbe@debian.org>
Revert Python 2.7 requirement upgrade, and remove dwke options.

Remove argparse from detect_well_known_errors, disabling command
line argument support, and revert the required Python runtime to 2.6.
p-s/p-m: document the new "section" command

master: this will allow restricting the ssh key from the slave
to run a fixed command that does not take arguments

Signed-off-by: Andreas Beckmann <anbe@debian.org>
lib/db: get_package(): add flag resolve_virtual

Return the first provider of a virtual package if no real package with that
name exists. Disabled by default.

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-r: gracefully handle missing binary packages

These are usually udebs or binary packages for other architectures
that are listed in the Binary field of the source package.
Report them as unknown, but don't let them influence the overall
test result for that binary package.

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-r: properly report version of binary packages

which may be different from the version of their source package

Signed-off-by: Andreas Beckmann <anbe@debian.org>
lib/db: fix resolving virtual packages

try finding a real package first and lookup virtual ones on failure

Signed-off-by: Andreas Beckmann <anbe@debian.org>
Merge commit '5f5547c5ce9143326c1d47c8a6862f5fc4f670aa' into develop
p-m: remove obsolete and unused parts

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-s: use a persistent master connection

Keep the master connection open to reduce the number of ssh connections
opened. Close the connection after errors, before processing packages, or
before going to sleep.

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-s.deb: restrict slave's ssh key to only allow running piuparts-master

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-s: support empty master command

the command may be set in authorized_keys

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