diff --git a/Alien/Package/Deb.pm b/Alien/Package/Deb.pm index 2d8829e..4ede110 100644 --- a/Alien/Package/Deb.pm +++ b/Alien/Package/Deb.pm @@ -258,12 +258,13 @@ patches in. sub getpatch { my $this=shift; - + my $anypatch=shift; + my @patches; foreach my $dir (@_) { push @patches, glob("$dir/".$this->name."_".$this->version."-".$this->release."*.diff.gz"); } - unless (@patches) { + if (! @patches && $anypatch) { # Try not matching the revision, see if that helps. foreach my $dir (@_) { push @patches,glob("$dir/".$this->name."_".$this->version."*.diff.gz"); diff --git a/alien.pl b/alien.pl index 87d712e..65804e3 100755 --- a/alien.pl +++ b/alien.pl @@ -135,6 +135,12 @@ Specify the patch to be used instead of automatically looking the patch up in B. This has no effect unless a debian package is being built. +=item B<--anypatch> + +Be less strict about which patch file is used, perhaps attempting to use a patch +file for an older verson of the package. This is not guaranteed to always work; +older patches may necessarily not work with newer packages. + =item B<--nopatch> Do not use any patch files. @@ -286,6 +292,7 @@ Usage: alien [options] file [...] --patch= Specify patch file to use instead of automatically looking for patch in /var/lib/alien. --nopatch Do not use patches. + --anypatch Use even old version os patches. --single Like --generate, but do not create .orig directory. --fixperms Munge/fix permissions and owners. @@ -310,7 +317,7 @@ EOF # Start by processing the parameters. my (%destformats, $generate, $install, $single, $scripts, $patchfile, - $nopatch, $tgzdescription, $keepversion, $fixperms, $test); + $nopatch, $tgzdescription, $keepversion, $fixperms, $test, $anypatch); # Bundling is nice anyway, and it is required or Getopt::Long will confuse # -T and -t. @@ -328,8 +335,9 @@ GetOptions( "install|i", \$install, "single|s", sub { $single=1; $generate=1 }, "scripts|c", \$scripts, - "patch|p=s", \$patchfile, + "patch=s", \$patchfile, "nopatch", \$nopatch, + "anypatch", \$anypatch, "description=s", \$tgzdescription, "keep-version|k", \$keepversion, "fixperms", \$fixperms, @@ -441,7 +449,7 @@ foreach my $file (@ARGV) { $package->patchfile($patchfile) } else { - $package->patchfile($package->getpatch(patchdirs())); + $package->patchfile($package->getpatch($anypatch, patchdirs())); } } diff --git a/debian/changelog b/debian/changelog index 0eee993..5b1b279 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +alien (8.18) unstable; urgency=low + + * Be stricter about which patch files to apply by default. For old behavior + use --anypatch. + * Minor perl 5.8 fix. + + -- Joey Hess Thu, 22 Aug 2002 12:10:39 -0400 + alien (8.17) unstable; urgency=low * When converting from rpm, do parent directory 755 chmods first, then