Mailinglist Archive: opensuse-buildservice (116 mails)

< Previous Next >
[opensuse-buildservice] package Build: keep the the Requires and Provides rules
  • From: "Ronan Le Martret (Intel OTC)" <ronan@xxxxxxxxx>
  • Date: Tue, 07 Aug 2012 11:24:43 +0200
  • Message-id: <5020DEDB.5020609@fridu.net>
Package: Build

Hi,
I'm working on the project OBS Light and I am currently developing a feature to build with fakeobs (http://en.opensuse.org/openSUSE:OBS_Light_Fakeobs).

Everything works fine but I noticed a problem.

With a package:
-"A" which BuildRequires: Foo > 1.0.
and in my repository two packages:
- "B" Provides: Foo = 0.5
- "C" Provides: Foo = 1.5

expanddeps fails:
have choice for Foo needed by "A": "B" "C"

In the script "expanddeps", the function Build::addproviders is called (to check Provides rules on Build.pm Line 582).

We need to keep the Requires and Provides rules (< <= = >= >) for the dependency.

so in the script expanddeps (Line 173,190), we need to add:

if (@s && $s[0] =~ /^[<=>]/){
push @re, "$s $s[0] $s[1]";
}else{
push @re, $s;
}

instead of:

push @re, $s;

Does this patch have consequences on other scripts?

Could someone confirm this, please?

submit request 130302 to openSUSE:Tools
The Branch project on https://build.opensuse.org:
https://build.opensuse.org/project/show?project=home%3Aronan22%3Abranches%3AopenSUSE%3ATools

Ronan
--
Ronan Le Martret
Intel Open Source Technology Center

diff --git a/expanddeps b/expanddeps
index a51ef18..74b69af 100755
--- a/expanddeps
+++ b/expanddeps
@@ -171,7 +171,11 @@ for my $pack (keys %packs) {
splice(@s, 0, 2);
next;
}
+ if (@s && $s[0] =~ /^[<=>]/){
+ push @pr, "$s $s[0] $s[1]";
+ }else{
push @pr, $s;
+ }
splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
}
@s = split(' ', $req{$packs{$pack}} || '');
@@ -182,7 +186,11 @@ for my $pack (keys %packs) {
splice(@s, 0, 2);
next;
}
+ if (@s && $s[0] =~ /^[<=>]/){
+ push @re, "$s $s[0] $s[1]";
+ }else{
push @re, $s;
+ }
splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
}
$r->{'provides'} = \@pr;
< Previous Next >
This Thread
  • No further messages