[Mageia-sysadm] [488] Allow submitting drakx-installer-images where BuildRequires version is in the name

root at mageia.org root at mageia.org
Tue Feb 8 14:13:53 CET 2011


Revision: 488
Author:   pterjan
Date:     2011-02-08 14:13:52 +0100 (Tue, 08 Feb 2011)
Log Message:
-----------
Allow submitting drakx-installer-images where BuildRequires version is in the name

Modified Paths:
--------------
    build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Deps.pm

Modified: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Deps.pm
===================================================================
--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Deps.pm	2011-02-08 00:31:17 UTC (rev 487)
+++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Deps.pm	2011-02-08 13:13:52 UTC (rev 488)
@@ -45,10 +45,23 @@
             }
 	    $notfound;
         } @requires;
+	# Try to handle BuildRequires: kernel-server-2.6.37-3.mga-1-1.mga1
+	@requires = grep {
+	    my $require = $_;
+	    my $notfound = 1;
+	    if (!$require->[Youri::Package::DEPENDENCY_RANGE] &&
+		$require->[Youri::Package::DEPENDENCY_NAME] =~ /-/) {
+		foreach my $provide (@provides) {
+		    next unless $require->[Youri::Package::DEPENDENCY_NAME] =~ /^$provide->[Youri::Package::DEPENDENCY_NAME]-/;
+		    $notfound = 0;
+		}
+	    }
+	    $notfound;
+	} @requires;
     };
     $media->traverse_headers($index);
     foreach my $require (@requires) {
-            push (@errors, "Unresolved dep on " . $require->[Youri::Package::DEPENDENCY_NAME] . " " . $require->[Youri::Package::DEPENDENCY_RANGE]);
+         push (@errors, "Unresolved dep on " . $require->[Youri::Package::DEPENDENCY_NAME] . " " . $require->[Youri::Package::DEPENDENCY_RANGE]);
     }
     return @errors;
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110208/ed402188/attachment.html>


More information about the Mageia-sysadm mailing list