On Thu, Apr 24, 2008 at 10:24:39PM +0200, Patrick Schoenfeld wrote: > attached is patch against the current vcs version of lintian which adds > support for missing watch file detection and missing version mangling > in debian/watch for dfsg-ed packages.
> +open (VERSION, '< fields/version') or fail("cannot open fields/version: $!"); > +chomp(my $version = <VERSION>); > +close VERSION; > +my $native = (! -f "${pkg}_${version}.diff.gz"); This seems to be a buggy copy of the similar code in checks/cruft. This code should probably moved to lib/ and used by both scripts then. > +if (!$native) { > + if (!-f "debfiles/watch") { > + tag "debian-watch-file-is-missing", ""; > + } > + else { > + if ($version =~ /dfsg/) { > + my $mangle_option_found = 0; > + open(WATCH_FILE, "< debfiles/watch") or fail("cannot open watch > file for reading: $!"); > + while(<WATCH_FILE>) { > + if (/opts="*(uversionmangle|dversionmangle)/) { > + $mangle_option_found = 1; > + } > + } > + > + if ($mangle_option_found != 1) { > + tag "debian-watch-file-does-not-reflect-dfsg-version", ""; > + } > + } > + } That code should probably be changed so that it doesn't need a major reorganization once someone wants to add a second check. > +Tag: debian-watch-file-does-not-reflect-dfsg-version > +Type: warning > +Info: The version of the package contains the dfsg string, which indicates > that > + the upstream source has been changed in order to comply with the > + Debian Free Software Guidelines, but the watch file does not include any > + mangling option. Therefore the watch file is likely to be useless, > + as comparing the upstream version with the current local version will result > + in false results. "useless" is a rather strong word since it most cases a newer version still will be correctly detected. Gruesse, -- Frank Lichtenheld <[EMAIL PROTECTED]> www: http://www.djpig.de/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]