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

[SCM] Debian package checker branch, master, updated. 1.24.4-110-g461090e



The following commit has been merged in the master branch:
commit b768f5e10e449500fb123dd573403b20769cd12a
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Sun Sep 7 15:18:33 2008 -0500

    Fixed a bug where source-field-malformed would never be triggered
    
    Signed-off-by: Raphael Geissert <atomo64@gmail.com>
    Signed-off-by: Frank Lichtenheld <djpig@debian.org>

diff --git a/checks/fields b/checks/fields
index 670cd34..a67bf6a 100644
--- a/checks/fields
+++ b/checks/fields
@@ -263,24 +263,22 @@ if (defined $info->field('uploaders') && defined $info->field('maintainer')) {
 
 #---- Source
 
-if ($type eq "source") {
-	if (not defined $info->field('source')) {
-		tag "no-source-field", "";
-	} else {
-		my $source = $info->field('source');
+if (not defined $info->field('source')) {
+	tag "no-source-field" if $type eq "source";
+} else {
+	my $source = $info->field('source');
 
-		unfold("source", \$source);
+	unfold("source", \$source);
 
-		if ($type eq 'source') {
-			if ($source ne $pkg) {
-				tag "source-field-does-not-match-pkg-name", "$_";
-			}
-		} else {
-			if ($source !~ /[A-Z0-9][-+\.A-Z0-9]+                      #Package name
-			                \s*
-			                (?:\((?:\d+:)?(?:[-\.+:A-Z0-9]+?)(?:-[\.+A-Z0-9]+)?\))?\s*$/ix) { #Version
-				tag "source-field-malformed", "$source";
-			}
+	if ($type eq 'source') {
+		if ($source ne $pkg) {
+			tag "source-field-does-not-match-pkg-name", "$source != $pkg";
+		}
+	} else {
+		if ($source !~ /[A-Z0-9][-+\.A-Z0-9]+                      #Package name
+		                \s*
+		                (?:\((?:\d+:)?(?:[-\.+:A-Z0-9]+?)(?:-[\.+A-Z0-9]+)?\))?\s*$/ix) { #Version
+			tag "source-field-malformed", "$source";
 		}
 	}
 }
diff --git a/debian/changelog b/debian/changelog
index bf252fe..c697c8b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,8 @@ lintian (2.0.0~rc1) experimental; urgency=low
       for such packages.  (Closes: #496875)
     + [FL] Check Enhances together with the other relational fields.
     + [FL] Add ant to @rule_clean_depends.  (Closes: #498135)
+    + [FL] Due to a logical error "source-field-malformed" was never actually
+      checked.  Patch by Raphael Geissert.  (Closes: #498197)
   * checks/files{,.desc}:
     + [RA,FL] Patches from Raphael Geissert:
       - Check for embedding copies of jsjac and jsMath.

-- 
Debian package checker


Reply to: