Changeset 70 for trunk


Ignore:
Timestamp:
06/23/06 11:14:16 (18 years ago)
Author:
kdeugau
Message:

/trunk

Update handling of %patch macro; bare %patch will now work
more or less correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r69 r70  
    461461          } elsif ( my ($patchnum,$patchopts) = (/^\%patch([^\s]+)(\s+.+)?$/) ) {
    462462            chomp $patchnum;
    463             $prepscript .= "patch ";
     463            $prepscript .= qq(echo "Patch #$patchnum ($pkgdata{main}{"patch$patchnum"}):"\n).
     464                "patch ";
     465        # If there are options passed, use'em.
     466        # Otherwise, catch a bare %patch and ASS-U-ME it's '-p0'-able.
     467        # Will break on options that don't provide -pnn, but what the hell.
    464468            $prepscript .= $patchopts if $patchopts;
    465             $prepscript .= " <$topdir/SOURCES/".$pkgdata{main}{"patch$patchnum"}."\n";
     469            $prepscript .= "-p0" if !$patchopts;
     470            $prepscript .= " -s <$topdir/SOURCES/".$pkgdata{main}{"patch$patchnum"}."\n";
    466471          } else {
    467472            last PREPSCRIPT if /^\%/;
Note: See TracChangeset for help on using the changeset viewer.