Le 17/01/2016 16:51, Bastien ROUCARIES a écrit : > On Sat, Jan 16, 2016 at 2:02 PM, Sylvestre Ledru <sylves...@debian.org> wrote: >> With the correct patch :) >> >> S >> > > I will prefer to use lintian/Data Here it is!
> BTW what is the plan of watch=3 obsolescence ? I don't know. I just encountered the issue with version=4 with lintian. I just wanted to address this issue. Thanks Sylvestre
>From dbb7b4e79ae9ee1a629047c57c58f16dacc6e506 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru <sylves...@debian.org> Date: Sat, 16 Jan 2016 13:57:06 +0100 Subject: [PATCH] debian/watch can be version=4 now since #795804 --- checks/watch-file.desc | 2 +- checks/watch-file.pm | 6 +++++- data/watch-file/version | 4 ++++ debian/changelog | 1 + t/tests/legacy-maintainer-scripts/debian/debian/watch | 2 +- t/tests/legacy-maintainer-scripts/tags | 2 +- 6 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 data/watch-file/version diff --git a/checks/watch-file.desc b/checks/watch-file.desc index 792c85a..c3860f6 100644 --- a/checks/watch-file.desc +++ b/checks/watch-file.desc @@ -36,7 +36,7 @@ Certainty: certain Ref: uscan(1) Info: The <tt>version=</tt> line in the <tt>debian/watch</tt> file in this package declares an unknown version. The currently known watch file - versions are 2 and 3. + versions are 2, 3 and 4 Tag: debian-watch-file-missing-version Severity: normal diff --git a/checks/watch-file.pm b/checks/watch-file.pm index 05eab9c..fdba305 100644 --- a/checks/watch-file.pm +++ b/checks/watch-file.pm @@ -27,6 +27,8 @@ use autodie; use Lintian::Tags qw(tag); +our $WATCH_VERSION = Lintian::Data->new('watch-file/version', qr/\s*=\s*/o); + sub run { my (undef, undef, $info) = @_; my $template = 0; @@ -78,7 +80,9 @@ sub run { tag 'debian-watch-file-declares-multiple-versions', "line $."; } $watchver = $1; - if ($watchver ne '2' and $watchver ne '3') { + my $minver = $WATCH_VERSION->value('min-version'); + my $maxver = $WATCH_VERSION->value('max-version'); + if ($watchver < $minver or $watchver > $maxver) { tag 'debian-watch-file-unknown-version', $watchver; } } else { diff --git a/data/watch-file/version b/data/watch-file/version new file mode 100644 index 0000000..7f2cc83 --- /dev/null +++ b/data/watch-file/version @@ -0,0 +1,4 @@ +# Minimum and maximum version supported for debian/watch + +min-version = 2 +max-version = 4 diff --git a/debian/changelog b/debian/changelog index ddda61f..0965c1a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,7 @@ lintian (2.5.40) UNRELEASED; urgency=medium + [BR] Apply patch from Chris Lamb <la...@debian.org>, warn if debian/watch uses deprecated githubredir.debian.net scraper (Closes: #803106). + + [SL] debian/watch can be version=4 now since #795804 * data/spelling/corrections*: + [JW] Add more corrections. diff --git a/t/tests/legacy-maintainer-scripts/debian/debian/watch b/t/tests/legacy-maintainer-scripts/debian/debian/watch index 982696c..430eea3 100644 --- a/t/tests/legacy-maintainer-scripts/debian/debian/watch +++ b/t/tests/legacy-maintainer-scripts/debian/debian/watch @@ -1,5 +1,5 @@ # A whitespace is fine for uscan: - version=4 + version=5 # Following line should not be matched: #opts=uversionmangle=s/$/+debian/,dversionmangle=s/foo/bar/ \ diff --git a/t/tests/legacy-maintainer-scripts/tags b/t/tests/legacy-maintainer-scripts/tags index 48fbf15..c633187 100644 --- a/t/tests/legacy-maintainer-scripts/tags +++ b/t/tests/legacy-maintainer-scripts/tags @@ -47,7 +47,7 @@ W: maintainer-scripts source: debhelper-but-no-misc-depends maintainer-scripts W: maintainer-scripts source: debian-watch-file-in-native-package W: maintainer-scripts source: debian-watch-file-should-mangle-version line 11 W: maintainer-scripts source: debian-watch-file-should-mangle-version line 7 -W: maintainer-scripts source: debian-watch-file-unknown-version 4 +W: maintainer-scripts source: debian-watch-file-unknown-version 5 W: maintainer-scripts source: dfsg-version-in-native-package 7+dfsg-0.1 W: maintainer-scripts source: dm-upload-allowed-is-obsolete W: maintainer-scripts source: qa-upload-has-incorrect-version-number 7+dfsg-0.1 -- 2.6.4