aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2011-02-08 13:13:52 +0000
committerPascal Terjan <pterjan@mageia.org>2011-02-08 13:13:52 +0000
commit3760bb5c7f6b2cc24cc263d7c3e8b7348b8ed5bf (patch)
treec1aa35862063dbea473b7aec06961dde2834d7d1 /lib
parent0a086e6f377ee200265c1ac8be9b0556f76bfe85 (diff)
downloadmga-youri-submit-3760bb5c7f6b2cc24cc263d7c3e8b7348b8ed5bf.tar
mga-youri-submit-3760bb5c7f6b2cc24cc263d7c3e8b7348b8ed5bf.tar.gz
mga-youri-submit-3760bb5c7f6b2cc24cc263d7c3e8b7348b8ed5bf.tar.bz2
mga-youri-submit-3760bb5c7f6b2cc24cc263d7c3e8b7348b8ed5bf.tar.xz
mga-youri-submit-3760bb5c7f6b2cc24cc263d7c3e8b7348b8ed5bf.zip
Allow submitting drakx-installer-images where BuildRequires version is in the name
Diffstat (limited to 'lib')
-rw-r--r--lib/Youri/Submit/Check/Deps.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/Youri/Submit/Check/Deps.pm b/lib/Youri/Submit/Check/Deps.pm
index 06567d4..463d29a 100644
--- a/lib/Youri/Submit/Check/Deps.pm
+++ b/lib/Youri/Submit/Check/Deps.pm
@@ -45,10 +45,23 @@ sub resolvedep {
}
$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;
}