- Timestamp:
- 07/19/07 15:27:16 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r115 r116 1494 1494 $macrostring =~ s'%{_datadir}'/usr/share'g; 1495 1495 1496 # %define's1497 foreach my $key (keys %specglobals) {1498 $macrostring =~ s|%{$key}|$specglobals{$key}|g;1499 }1500 1501 1496 # special %define's. Handle the general case where we eval anything. 1502 1497 # Even more general: %(...) is a spec-parse-time shell code wrapper. … … 1515 1510 # there's no value specified... but so does rpm. 1516 1511 my $tmpcount = 0; 1517 while ($macrostring =~ /(\%\{(!\?|\?!|\?)([a-z0-9_.-]+)(?:\:([a-z0-9_.-]+))?\})/g) { #Whew.... 1518 my $wholemacro = $1; # Just for precision when replacing content in multimacro lines... 1519 my $qex = $2; 1520 my $macro = $3; 1521 my $value = $4; 1512 while ($macrostring =~ /\%\{(!\?|\?!|\?)([a-z0-9_.-]+)(?:\:([a-z0-9_.-]+))?\}/g) { #Whew.... 1513 my $qex = $1; 1514 my $macro = $2; 1515 my $value = $3; 1522 1516 1523 1517 my $neg = '1' if $qex =~ /\!/; … … 1527 1521 $value = '' if !$neg; 1528 1522 } 1529 $macrostring =~ s/ $wholemacro/$value/;1523 $macrostring =~ s/\%\{!?\?\!?[a-z0-9_.-]+(?:\:[a-z0-9_.-]+)?\}/$value/; 1530 1524 1531 1525 # not certain about this, but I don't want to run away. It *can* happen if planned carefully. :/ … … 1534 1528 1535 1529 } # while() 1530 1531 # should probably stick a "no runaway" flag in here... Just In Case... 1532 # %define's 1533 while (my ($key) = ($macrostring =~ /%{([a-z0-9]+)}/i) ) { 1534 $macrostring =~ s|%{$key}|$specglobals{$key}|g; 1535 # wanna limit this to "... if $specglobals{$key}", but need more magic 1536 } 1536 1537 1537 1538 # system programs. RPM uses a global config file for these; we'll just
Note:
See TracChangeset
for help on using the changeset viewer.