From f79b8473da3cd5eb102f51d1f5b4078ec6357271 Mon Sep 17 00:00:00 2001 From: joey Date: Sat, 22 Apr 2000 04:52:41 +0000 Subject: [PATCH] full patch support (untested) --- TODO | 1 - alien | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 8b12160..ce19e3f 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,2 @@ * handling postinst script when converting to/from .slp packages. -* patches diff --git a/alien b/alien index a14ca82..cadb081 100755 --- a/alien +++ b/alien @@ -359,12 +359,23 @@ foreach my $file (@ARGV) { # Mutate package into desired format. bless($package, "Alien::Package::".ucfirst($format)); + # Make .orig.tar.gz directory? if ($format eq 'deb' && ! $single && $generate) { # Make .orig.tar.gz directory. system("cp -fa ".$package->unpacked_tree." ".$package->unpacked_tree.".orig") && die "cp -fa failed"; } - + + # See if a patch file should be used. + if ($format eq 'deb' && ! $nopatch) { + if (defined $patchfile) { + $package->patchfile($patchfile) + } + else { + $package->patchfile($package->getpatch); + } + } + $package->prep; # If generating build tree only, stop here with message.