Changeset 135


Ignore:
Timestamp:
11/06/07 13:14:01 (17 years ago)
Author:
kdeugau
Message:

/trunk

Fix lurking buglet with preamble parsing: No space is required between
'tag:' and the value for 'tag'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r134 r135  
    843843
    844844    if ($stage eq 'preamble') {
    845       if (/^summary:\s+(.+)/i) {
     845      if (/^summary:\s*(.+)/i) {
    846846        $pkgdata{main}{summary} = $1;
    847       } elsif (/^name:\s+(.+)/i) {
     847      } elsif (/^name:\s*(.+)/i) {
    848848        $pkgdata{main}{name} = expandmacros($1,'g');
    849       } elsif (/^epoch:\s+(.+)/i) {
     849      } elsif (/^epoch:\s*(.+)/i) {
    850850        $pkgdata{main}{epoch} = expandmacros($1,'g');
    851       } elsif (/^version:\s+(.+)/i) {
     851      } elsif (/^version:\s*(.+)/i) {
    852852        $pkgdata{main}{version} = expandmacros($1,'g');
    853       } elsif (/^release:\s+(.+)/i) {
     853      } elsif (/^release:\s*(.+)/i) {
    854854        $pkgdata{main}{release} = expandmacros($1,'g');
    855       } elsif (/^group:\s+(.+)/i) {
     855      } elsif (/^group:\s*(.+)/i) {
    856856        $pkgdata{main}{group} = $1;
    857       } elsif (/^copyright:\s+(.+)/i) {
     857      } elsif (/^copyright:\s*(.+)/i) {
    858858        $pkgdata{main}{copyright} = $1;
    859       } elsif (/^url:\s+(.+)/i) {
     859      } elsif (/^url:\s*(.+)/i) {
    860860        $pkgdata{main}{url} = $1;
    861       } elsif (/^packager:\s+(.+)/i) {
     861      } elsif (/^packager:\s*(.+)/i) {
    862862        $pkgdata{main}{packager} = $1;
    863       } elsif (/^buildroot:\s+(.+)/i) {
     863      } elsif (/^buildroot:\s*(.+)/i) {
    864864        $buildroot = $1;
    865       } elsif (/^source0?:\s+(.+)/i) {
     865      } elsif (/^source0?:\s*(.+)/i) {
    866866        $pkgdata{main}{source} = $1;
    867867        die "Unknown tarball format $1\n" if $1 !~ /\.tar\.(?:gz|bz2)$/;
    868       } elsif (/^source([0-9]+):\s+(.+)/i) {
     868      } elsif (/^source([0-9]+):\s*(.+)/i) {
    869869        $pkgdata{sources}{$1} = $2;
    870       } elsif (/^patch([^:]+):\s+(.+)$/i) {
     870      } elsif (/^patch([^:]+):\s*(.+)$/i) {
    871871        my $patchname = "patch$1";
    872872        $pkgdata{main}{$patchname} = $2;
     
    877877        }
    878878        chomp $pkgdata{main}{$patchname};
    879       } elsif (/^buildarch(?:itecture)?:\s+(.+)/i) {
     879      } elsif (/^buildarch(?:itecture)?:\s*(.+)/i) {
    880880        $pkgdata{main}{arch} = $1;
    881881        $pkgdata{main}{arch} =~ s/^noarch$/all/;
    882882        $buildarch = $pkgdata{main}{arch};
    883       } elsif (/^buildreq(?:uires)?:\s+(.+)/i) {
     883      } elsif (/^buildreq(?:uires)?:\s*(.+)/i) {
    884884        $buildreq .= ", $1";
    885       } elsif (/^requires:\s+(.+)/i) {
     885      } elsif (/^requires:\s*(.+)/i) {
    886886        $pkgdata{main}{requires} .= ", ".expandmacros("$1", 'gp');
    887       } elsif (/^provides:\s+(.+)/i) {
     887      } elsif (/^provides:\s*(.+)/i) {
    888888        $pkgdata{main}{provides} .= ", $1";
    889       } elsif (/^conflicts:\s+(.+)/i) {
     889      } elsif (/^conflicts:\s*(.+)/i) {
    890890        $pkgdata{main}{conflicts} .= ", $1";
    891       } elsif (/^recommends:\s+(.+)/i) {
     891      } elsif (/^recommends:\s*(.+)/i) {
    892892        $pkgdata{main}{recommends} .= ", $1";
    893893        warn "Warning:  Debian-specific 'Recommends:' outside \%if wrapper\n" if $iflevel == 0;
    894       } elsif (/^suggests:\s+(.+)/i) {
     894      } elsif (/^suggests:\s*(.+)/i) {
    895895        $pkgdata{main}{suggests} .= ", $1";
    896896        warn "Warning:  Debian-specific 'Suggests:' outside \%if wrapper\n" if $iflevel == 0;
    897       } elsif (/^replaces:\s+(.+)/i) {
     897      } elsif (/^replaces:\s*(.+)/i) {
    898898        $pkgdata{main}{replaces} .= ", $1";
    899899        warn "Warning:  Debian-specific 'Replaces:' outside \%if wrapper\n" if $iflevel == 0;
    900       } elsif (/^autoreq(?:prov)?:\s+(.+)/i) {
     900      } elsif (/^autoreq(?:prov)?:\s*(.+)/i) {
    901901        # we don't handle auto-provides (yet)
    902902        $NoAutoReq = 1 if $1 =~ /(?:no|0)/i;
Note: See TracChangeset for help on using the changeset viewer.