control: tags -1 + patch Hi,
Nye Liu <[email protected]> writes: > Please support SUITE=stretch or implement #466407 or #612539 Attached you can find the following patch: [PATCH] Allow any suite, improve error message when downloading This way, the files available at security-tracker.debian.org become authoritative for what valid values are, as opposed to a hard-coded list that quickly goes out of date. -- Best regards, Michael
>From 31cb69e4f825ce7fde1a401708dd9f0e45edf684 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg <[email protected]> Date: Mon, 14 Nov 2016 08:51:56 +0100 Subject: [PATCH] Allow any suite, improve error message when downloading This way, the files available at security-tracker.debian.org become authoritative for what valid values are, as opposed to a hard-coded list that quickly goes out of date. --- src/debsecan | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/debsecan b/src/debsecan index 96ba9c3..625ab2e 100644 --- a/src/debsecan +++ b/src/debsecan @@ -316,9 +316,7 @@ def parse_cli(): parser.add_option("--config", metavar="FILE", help="sets the name of the configuration file", default='/etc/default/debsecan') - parser.add_option("--suite", type="choice", - choices=['woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy', - 'jessie', 'sid'], + parser.add_option("--suite", help="set the Debian suite of this installation") parser.add_option("--source", metavar="URL", help="sets the URL for the vulnerability information") @@ -531,6 +529,12 @@ def fetch_data(options, config): # In cron mode, we suppress almost all errors because we # assume that they are due to lack of Internet connectivity. except urllib2.HTTPError, e: + if e.code == 404: + sys.stderr.write("error: while downloading %s:\n%s\n" % (url, e)) + if options.suite: + sys.stderr.write("Are you sure \"%s\" is a Debian codename?\n" % + (options.suite)) + sys.exit(1) if (not options.cron) or e.code == 404: sys.stderr.write("error: while downloading %s:\n%s\n" % (url, e)) sys.exit(1) -- 2.9.3

