diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2016-10-27 14:26:00 +0900 |
---|---|---|
committer | SoonKyu Park <sk7.park@samsung.com> | 2017-02-10 10:03:19 +0900 |
commit | 5b60f70921a1174e9ee2ebb475a4c1f2c990be0c (patch) | |
tree | 2d808f375d64127b44772771707756be4960ef5f /createdirdeps | |
parent | 53409a67edf5778f7939506c30c192551f982bee (diff) | |
download | build-5b60f70921a1174e9ee2ebb475a4c1f2c990be0c.tar.gz build-5b60f70921a1174e9ee2ebb475a4c1f2c990be0c.tar.bz2 build-5b60f70921a1174e9ee2ebb475a4c1f2c990be0c.zip |
Recognize Recommends relations of RPMs
When there are multiple candidate packages as a result of
Provides, the current obs-build gives an error: "have choice for".
However, according to http://www.rpm.org/wiki/PackagerDocs/Dependencies ,
Recommends tells the system to install the corresponding package
unless there is a conflict; thus, if there is a package recommended
(as described in issue #302), obs-build shall install the recommended
package, resolving "have choice for" error.
To enable, OBS project should declare:
"BuildFlags: UseRecommendsForChoices=1"
or
"BuildFlags: UseRecommendsForChoices"
in its project config.
Fixes #302
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Conflicts:
createdirdeps
expanddeps
Change-Id: I65dc6dd16a6874b7c1ae47932d37c23ec98b9cdf
Diffstat (limited to 'createdirdeps')
-rwxr-xr-x | createdirdeps | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/createdirdeps b/createdirdeps index 280e4f5..b50739f 100755 --- a/createdirdeps +++ b/createdirdeps @@ -51,7 +51,7 @@ my %old; if (defined($oldfile) && open(F, '<', $oldfile)) { while (<F>) { chomp; - $old{$1} = $_ if /^([PRCOI]:[^ ]+): /; + $old{$1} = $_ if /^([PRrCOI]:[^ ]+): /; } close F; } @@ -78,14 +78,14 @@ for my $dir (@ARGV) { next if $seen{$idx}; $seen{$idx} = 1; print "F:$idx: $path\n"; - for (qw{P R C O I}) { + for (qw{P R r C O I}) { print $old{"$_:$idx"}."\n" if $old{"$_:$idx"}; } next; } } } - my $q = Build::query($path, 'addselfprovides' => 1, 'conflicts' => 1, 'evra' => 1, 'buildtime' => 1, 'alldeps' => 1); + my $q = Build::query($path, 'addselfprovides' => 1, 'conflicts' => 1, 'evra' => 1, 'buildtime' => 1, 'weakdeps' => 1); next unless $q && defined($q->{'name'}) && defined($q->{'arch'}) && defined($q->{'version'}); my $idx = "$q->{'name'}.$q->{'arch'}-$id"; next if $seen{$idx}; |