tighten source format check for 1.0

The regular expression used a ".", so it would accept "1-0" or even
"120" for source format 1.0.

Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
tell the uninitiated that 2 is ENOENT

Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
visually fix daklib.utils.parse_wnpp_bug_file

The file asks Vim to set tabstop=4. So the "lines = []" line formerly
being indented with a tab appears to be executed unconditionally whereas
it really only is executed in the exception handler.

Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
read file once in HashedFile.check

Reading the file to check once rather than three times is both faster
and shorter.

Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
put Python's with statement to good use

Rather than using try-finally blocks or even failing to close files in
the event of an exception, open files in with blocks where feasible.

Signed-off-by: Helmut Grohne <helmut@subdivi.de>
convert daklib.dbconn from os.popen to subprocess

It now explicitly closes the filedescriptors opened (by calling wait)
and checks the return code of gpg.
rewrite daklib.utils.gpg_get_key_addresses

 * No longer uses the deprecated commands module.
 * No longer invokes gpg via a shell.
 * Passes --with-colons to gpg now.
 * No longer depends on the current locale (since --with-colons forces
   UTF-8 output).

Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Merge remote-tracking branch 'helmut/smallthings' into merge

* helmut/smallthings:
  rewrite daklib.utils.gpg_get_key_addresses
  convert daklib.dbconn from os.popen to subprocess
  put Python's with statement to good use

Signed-off-by: Joerg Jaspert <joerg@debian.org>
fix gpg_get_key_addresses

Do not use codecs.decode(s, "unicode_escape"). It has two issues:
 * When being passed a bytes literal, the returned value becomes a str
   and the decoding operation is locale specific on Python3.
 * When passing a unicode literal, it implicitly encodes to
   sys.getdefaultencoding() (locale specific) on Python2.
Thus "unicode_escape" is a bad choice in all cases.

For Python2 string_escape works with str, but it hinders a potential
Python3 port of dak. Use it now, because Python3 is totally broken.
Merge remote-tracking branch 'helmut/fix-gpg_get_key_addresses'
Add a deb822 for the backports NEW queue (Closes: #749102)
dak queue-report: --822 outputs to stdout if no other location is given
cron.hourly: Include backports-new queue in new.822.
view src_associations_full: include sources for all binaries

The src_associations_full now includes sources for all binaries in a
suite. This includes old versions of source packages if old binary
packages are still around.
Revert "Add a deb822 for the backports NEW queue (Closes: #749102)"

This reverts commit cda77ad8e9f59752b615ec9a647848d05362a47d.
Implement architecture matching rules.
Add change-component command.