Changeset 101 for trunk


Ignore:
Timestamp:
05/16/07 16:30:47 (18 years ago)
Author:
kdeugau
Message:

/trunk

Clean up end-of-section detection: Check for %[a-z] rather than just %
to avoid tripping on macros at the beginning of lines in a section.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r100 r101  
    501501        while (<SPECFILE>) {
    502502          next if /^#/;    # Messy.  Should be possible to do better.  :/
    503           redo LINE if /^\%/;
     503          redo LINE if /^\%[a-z]/;
    504504          $pkgdata{$subname}{desc} .= " $_";
    505505        }
     
    517517        $pkgdata{$subname}{arch} = $buildarch;  # Since it's likely subpackages will NOT have a BuildArch line...
    518518        while (<SPECFILE>) {
    519           redo LINE if /^\%/;
     519          redo LINE if /^\%[a-z]/;
    520520          if (my ($dname,$dvalue) = (/^(Summary|Group|Version|Requires|Provides|BuildArch(?:itecture)?):\s+(.+)$/i)) {
    521521            $dname =~ tr/[A-Z]/[a-z]/;
     
    611611      if (/^\%clean/) {
    612612        while (<SPECFILE>) {
    613           redo LINE if /^\%/;
     613          redo LINE if /^\%[a-z]/;
    614614          $cleanscript .= $_;
    615615        }
     
    626626        }
    627627        while (<SPECFILE>) {
    628           redo LINE if /^\%/;
     628          redo LINE if /^\%[a-z]/;
    629629          $pkgdata{$pkgname}{$scriptlet} .= $_;
    630630        }
     
    712712
    713713          # ... unknown or "next section" % directives ...
    714           redo LINE if /^\%/;
     714          redo LINE if /^\%[a-z]/;
    715715
    716716          # ... and "normal" files
     
    722722        $pkgdata{main}{changelog} = '';
    723723        while (<SPECFILE>) {
    724           redo LINE if /^\%/;
     724          redo LINE if /^\%[a-z]/;
    725725          $pkgdata{main}{changelog} .= $_;
    726726        }
Note: See TracChangeset for help on using the changeset viewer.