Changeset 105


Ignore:
Timestamp:
06/15/07 16:19:40 (17 years ago)
Author:
kdeugau
Message:

/trunk

Process %if statements in %description sections too. It has its uses...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r104 r105  
    540540    } # %if/%else/%endif
    541541
    542 # description.  not going to parse for %ifs in it.
     542# now we pick out the sections and set "state" to parse that section.  Fugly but I can't see a better way.  >:(
     543
    543544    if (/^\%description(?:\s+(?:-n\s+)?(.+))?/) {
     545      $stage = 'desc';
    544546      $subname = "main";
    545547      if ($1) {       # Magic to add entries to the right package
     
    547549        if (/-n/) { $subname = $tmp; } else { $subname = "$pkgdata{main}{name}-$tmp"; }
    548550      }
    549       while (<SPECFILE>) {
    550         next if /^#/;    # Messy.  Should be possible to do better.  :/
    551         redo LINE if /^\%[a-z]/;
    552         $pkgdata{$subname}{desc} .= " $_";
    553       }
     551      next LINE;
    554552    } # %description
    555 
    556 # now we pick out the sections and set "state" to parse that section.  Fugly but I can't see a better way.  >:(
    557553
    558554    if (/^\%package\s+(?:-n\s+)?(.+)/) {
     
    627623
    628624# now we handle individual lines from the various sections
     625
     626    if ($stage eq 'desc') {
     627      $pkgdata{$subname}{desc} .= " $_";
     628    } # description
    629629
    630630    if ($stage eq 'package') {
Note: See TracChangeset for help on using the changeset viewer.