[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r176 - trunk/checks



Author: jeroen
Date: 2004-04-18 01:26:57 +0200 (Sun, 18 Apr 2004)
New Revision: 176

Added:
   trunk/checks/nmu.desc
Removed:
   trunk/checks/nmu.dsc
Modified:
   trunk/checks/fields
   trunk/checks/nmu
   trunk/checks/po-debconf
Log:
Fix up mess (programming errors) I created, plus added some TODO's to
po-debconf


Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields	2004-04-17 23:12:37 UTC (rev 175)
+++ trunk/checks/fields	2004-04-17 23:26:57 UTC (rev 176)
@@ -68,10 +68,12 @@
 		if ($upstream !~ /^\d/i) {
 			print "W: $pkg $type: upstream-version-not-numeric $version\n";
 		}
-		$debian =~ /^-([^.]+)?(?:\.[^.]+)?(?:\.[^.]+)?(\..*)?$/;
-		if (not defined $1 or defined $2) {
-			print "W: $pkg $type: debian-revision-not-welformed $version\n";
-			return;
+		if (defined $debian) {
+			$debian =~ /^-([^.]+)?(?:\.[^.]+)?(?:\.[^.]+)?(\..*)?$/;
+			if (not defined $1 or defined $2) {
+				print "W: $pkg $type: debian-revision-not-welformed $version\n";
+				return;
+			}
 		}
 	} else {
 		print "E: $pkg $type: bad-version-number $version\n";

Modified: trunk/checks/nmu
===================================================================
--- trunk/checks/nmu	2004-04-17 23:12:37 UTC (rev 175)
+++ trunk/checks/nmu	2004-04-17 23:26:57 UTC (rev 176)
@@ -28,7 +28,7 @@
 my $changelog_mentions_qa = 0;
 my $uploader = undef;
 
-open CHANGELOG, "changelog" or fail "Failed opening changelog";
+open CHANGELOG, "debfiles/changelog" or fail("Failed opening changelog");
 <CHANGELOG>;
 my $firstline = 1;
 while (<CHANGELOG>) {
@@ -44,9 +44,9 @@
 }
 close CHANGELOG;
 
-my $version = getfield "version";
-my $maintainer = getfield "maintainer";
-my $uploaders = getfield "uploaders";
+my $version = getfield("version");
+my $maintainer = getfield("maintainer");
+my $uploaders = getfield("uploaders");
 
 my $version_nmuness = 0;
 if ($version =~ /-[^.-]+(\.[^.-]+)?(\.[^.-]+)?$/) {
@@ -94,7 +94,6 @@
 	return undef if not open FIELD, "fields/".shift;
 	my $field = <FIELD>;
 	close FIELD;
-	my $field = shift;
 	$field =~ s/\n$//;
 	return $field;
 }

Copied: trunk/checks/nmu.desc (from rev 175, trunk/checks/nmu.dsc)
===================================================================
--- trunk/checks/nmu.dsc	2004-04-17 23:12:37 UTC (rev 175)
+++ trunk/checks/nmu.desc	2004-04-17 23:26:57 UTC (rev 176)
@@ -0,0 +1,43 @@
+Check-Script: nmu
+Author: Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
+Abbrev: nmu
+Standards-Version: 3.6.1
+Type: source
+Unpack-Level: 1
+Needs-Info: debfiles
+Info: This script checks if a source package is consequent about its NMU-ness.
+
+Tag: orphaned-package-should-not-have-uploaders
+Type: error
+Info: Packages which their maintainer set to packages@qa.debian.org, i.e.
+ orphaned packages, should not have uploaders. Properly adopt the package if
+ you want to resume its maintainance.
+
+Tag: qa-upload-has-incorrect-version-number
+Type: warning
+Info: A QA upload (uploading an orphaned package without adopting it) is
+ always a maintainer upload: it should not get a NMU revision number.
+
+Tag: source-nmu-has-incorrect-version-number
+Type: warning
+Info: A source NMU should have a Debian revision of '-x.x'. This is to prevent
+ stealing version numbers from the maintainer (and the -x.x.x version numbers
+ are reserved for binary-only NMU's).
+
+Tag: maintainer-upload-has-incorrect-version-number
+Type: warning
+Info: A maintainer upload should have a Debian revision without dots.
+ Revisions with dots are reserverd for Non-Maintainer Uploads (NMU's), if you
+ do a maintainer-upload with dots, a potential NMU'er has problems choosing a
+ correct version number.
+
+Tag: changelog-should-mention-qa
+Type: warning
+Info: If this upload is to orphan this package, please mention this fact on
+ the first line of the changelog. If this is a QA upload, please mention "QA
+ (group) upload" there.
+
+Tag: changelog-should-mention-nmu
+Type: warning
+Info: When you NMU a package, that fact should be mentioned on the first line
+ in the changelog entry.

Deleted: trunk/checks/nmu.dsc
===================================================================
--- trunk/checks/nmu.dsc	2004-04-17 23:12:37 UTC (rev 175)
+++ trunk/checks/nmu.dsc	2004-04-17 23:26:57 UTC (rev 176)
@@ -1,43 +0,0 @@
-Check-Script: nmu
-Author: Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
-Abbrev: nmu
-Standards-Version: 3.6.1
-Type: source
-Unpack-Level: 1
-Needs-Info: debfiles, changelog-file
-Info: This script checks if a source package is consequent about its NMU-ness.
-
-Tag: orphaned-package-should-not-have-uploaders
-Type: error
-Info: Packages which their maintainer set to packages@qa.debian.org, i.e.
- orphaned packages, should not have uploaders. Properly adopt the package if
- you want to resume its maintainance.
-
-Tag: qa-upload-has-incorrect-version-number
-Type: warning
-Info: A QA upload (uploading an orphaned package without adopting it) is
- always a maintainer upload: it should not get a NMU revision number.
-
-Tag: source-nmu-has-incorrect-version-number
-Type: warning
-Info: A source NMU should have a Debian revision of '-x.x'. This is to prevent
- stealing version numbers from the maintainer (and the -x.x.x version numbers
- are reserved for binary-only NMU's).
-
-Tag: maintainer-upload-has-incorrect-version-number
-Type: warning
-Info: A maintainer upload should have a Debian revision without dots.
- Revisions with dots are reserverd for Non-Maintainer Uploads (NMU's), if you
- do a maintainer-upload with dots, a potential NMU'er has problems choosing a
- correct version number.
-
-Tag: changelog-should-mention-qa
-Type: warning
-Info: If this upload is to orphan this package, please mention this fact on
- the first line of the changelog. If this is a QA upload, please mention "QA
- (group) upload" there.
-
-Tag: changelog-should-mention-nmu
-Type: warning
-Info: When you NMU a package, that fact should be mentioned on the first line
- in the changelog entry.

Modified: trunk/checks/po-debconf
===================================================================
--- trunk/checks/po-debconf	2004-04-17 23:12:37 UTC (rev 175)
+++ trunk/checks/po-debconf	2004-04-17 23:26:57 UTC (rev 176)
@@ -34,6 +34,7 @@
 my $has_template = 0;
 for my $file (readdir(DEB)) {
 	if ($file =~ m/^(.+\.)?templates$/) {
+# TODO: out of this loop, use fields/*?
 		open(IN,"debfiles/control")
 			or fail("Can't open debfiles/control.");
 		while (<IN>) {
@@ -48,6 +49,7 @@
 }
 closedir(DEB);
 
+#TODO: check whether all templates are named in TEMPLATES.pot
 if ( $has_template && ! -d "debfiles/po" ) {
 	print "W: $pkg $type: not-using-po-debconf\n";
 }



Reply to: