Changeset 114
- Timestamp:
- 07/19/07 13:07:38 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r113 r114 1508 1508 # support for **some** %if constructs. Note that this breaks somewhat if 1509 1509 # there's no value specified... but so does rpm. 1510 while ($macrostring =~ /\%\{\?(\!)?([a-z0-9_.-]+)(?:\:([a-z0-9_.-]+))?\}/) { #Whew.... 1511 my $neg = $1; 1512 my $macro = $2; 1513 my $value = $3; 1510 my $tmpcount = 0; 1511 while ($macrostring =~ /(\%\{(!\?|\?!|\?)([a-z0-9_.-]+)(?:\:([a-z0-9_.-]+))?\})/g) { #Whew.... 1512 my $wholemacro = $1; # Just for precision when replacing content in multimacro lines... 1513 my $qex = $2; 1514 my $macro = $3; 1515 my $value = $4; 1516 1517 my $neg = '1' if $qex =~ /\!/; 1514 1518 if ($specglobals{$macro}) { 1515 1519 $value = '' if $neg; … … 1517 1521 $value = '' if !$neg; 1518 1522 } 1519 $macrostring =~ s/\%\{\?\!?[a-z0-9_.-]+(?:\:[a-z0-9_.-]+)?\}/$value/; 1520 } 1523 $macrostring =~ s/$wholemacro/$value/; 1524 1525 # not certain about this, but I don't want to run away. It *can* happen if planned carefully. :/ 1526 $tmpcount++; 1527 die "excessive recursive macro replacement; dying.\n" if $tmpcount > 6; 1528 1529 } # while() 1521 1530 1522 1531 # system programs. RPM uses a global config file for these; we'll just
Note:
See TracChangeset
for help on using the changeset viewer.