|
|
@@ -837,15 +837,14 @@ sub simple_text_parser ($$$$$$) {
|
|
|
? { %options }
|
|
|
: parse_options($desc);
|
|
|
|
|
|
+ $mywith = name_with($name, $with);
|
|
|
if ($options) {
|
|
|
my(@t) = get_targets($installed->{$name},sub { 1; });
|
|
|
$mywith = combine_options(
|
|
|
$options,
|
|
|
@t ? get_with($t[0]) : undef,
|
|
|
- $with
|
|
|
+ $mywith
|
|
|
);
|
|
|
- } else {
|
|
|
- $mywith = $with;
|
|
|
}
|
|
|
|
|
|
eval {
|
|
|
@@ -938,16 +937,15 @@ sub xml_parser ($$$$$$) {
|
|
|
? { %options }
|
|
|
: parse_options($desc);
|
|
|
|
|
|
+ $mywith = name_with($name, $with);
|
|
|
if ($options) {
|
|
|
my(@t) = get_targets($installed->{$name},sub { 1; });
|
|
|
$mywith = combine_options(
|
|
|
$options,
|
|
|
@t ? get_with($t[0]) : undef,
|
|
|
- $with
|
|
|
+ $mywith
|
|
|
);
|
|
|
- } else {
|
|
|
- $mywith = $with;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
eval {
|
|
|
$rec = {
|
|
|
@@ -1292,6 +1290,26 @@ sub target_better ($$$) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+#
|
|
|
+# filter out package relevant options
|
|
|
+#
|
|
|
+sub name_with ($$) {
|
|
|
+ my($name, $with) = @_;
|
|
|
+ my(@keys);
|
|
|
+
|
|
|
+ push(@keys, grep { !/::/ } keys %$with);
|
|
|
+ push(@keys, grep { /::/ } keys %$with);
|
|
|
+
|
|
|
+ return {
|
|
|
+ map {
|
|
|
+ my($k) = $_;
|
|
|
+ $k !~ /::/ || $k =~ s/^\Q$name\E:://
|
|
|
+ ? ( $k => $with->{$_} )
|
|
|
+ : ( )
|
|
|
+ } @keys
|
|
|
+ };
|
|
|
+}
|
|
|
+
|
|
|
#
|
|
|
# check wether installed package matches
|
|
|
# build options
|
|
|
@@ -1301,6 +1319,8 @@ sub target_suitable ($$) {
|
|
|
my($iwith);
|
|
|
my($k,$v);
|
|
|
|
|
|
+ $with = name_with($target->{name}, $with);
|
|
|
+
|
|
|
$iwith = $target->{OPTIONS};
|
|
|
while (($k,$v) = each %$with) {
|
|
|
if (exists $iwith->{$k}) {
|
|
|
@@ -1332,10 +1352,11 @@ sub warn_about_options ($$$) {
|
|
|
my($k,$v);
|
|
|
|
|
|
return unless defined $iwith;
|
|
|
+ $with = name_with($target->{name}, $with);
|
|
|
while (($k,$v) = each %$with) {
|
|
|
- if (!exists $iwith->{$k} && $k !~ $c->{optreg}) {
|
|
|
- print "# ATTENTION: $target->{name} ignores option '$k'\n";
|
|
|
- }
|
|
|
+ unless ($k =~ /^$c->{optreg}$/ || exists $iwith->{$k}) {
|
|
|
+ print "# ATTENTION: $target->{name} ignores option '$k'\n";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1870,7 +1891,7 @@ sub make_defines ($$$$$) {
|
|
|
sub print_list1 ($$$@$) {
|
|
|
my($list,$c,$uncond,$with,$ignore) = @_;
|
|
|
my($spkg,$bpkg,$ppkg);
|
|
|
- my($opt);
|
|
|
+ my($mywith, $opt);
|
|
|
my($cmd1, $cmd2, $mark);
|
|
|
|
|
|
$mark = '::::';
|
|
|
@@ -1878,6 +1899,7 @@ sub print_list1 ($$$@$) {
|
|
|
foreach (@$list) {
|
|
|
$spkg = $_->{href};
|
|
|
$bpkg = target2rpm($_, $c);
|
|
|
+ $mywith = name_with($_->{name},$with);
|
|
|
|
|
|
#
|
|
|
# rebuild binary package IF
|
|
|
@@ -1890,9 +1912,9 @@ sub print_list1 ($$$@$) {
|
|
|
#
|
|
|
$cmd1 = undef;
|
|
|
if ($uncond || $_->{REBUILD} || !-f $bpkg ||
|
|
|
- !target_suitable(binary_target($_, $bpkg),$with)) {
|
|
|
+ !target_suitable(binary_target($_, $bpkg),$mywith)) {
|
|
|
|
|
|
- $opt = make_defines($_->{OPTIONS}, $with,
|
|
|
+ $opt = make_defines($_->{OPTIONS}, $mywith,
|
|
|
$_->{DEFOPTS}, $c,
|
|
|
$_->{GOAL});
|
|
|
|
|
|
@@ -2115,8 +2137,7 @@ $env = {
|
|
|
sourceonly => ($opt_u ||
|
|
|
$opt_U ||
|
|
|
$opt_z ||
|
|
|
- $opt_Z ||
|
|
|
- scalar(%with) > 0 )
|
|
|
+ $opt_Z)
|
|
|
};
|
|
|
|
|
|
if ($opt_L) {
|