rev 13711 - scripts
Modestas Vainius
modax-guest at alioth.debian.org
Mon Feb 2 11:39:14 UTC 2009
Author: modax-guest
Date: 2009-02-02 11:39:14 +0000 (Mon, 02 Feb 2009)
New Revision: 13711
Modified:
scripts/dh_installgen
Log:
Support for compat 7 mode and debhelper >= 7.1
Modified: scripts/dh_installgen
===================================================================
--- scripts/dh_installgen 2009-02-02 10:37:00 UTC (rev 13710)
+++ scripts/dh_installgen 2009-02-02 11:39:14 UTC (rev 13711)
@@ -13,6 +13,7 @@
use Digest::MD5;
use Debian::Debhelper::Dh_Lib;
+use Debian::Debhelper::Dh_Version;
use Getopt::Long;
=head1 SYNOPSIS
@@ -770,22 +771,27 @@
my %autoremove;
my %instgen_opts;
-# Parse installgen specific command line options first
-my $prevconfig = Getopt::Long::Configure("pass_through", "no_auto_abbrev");
$instgen_opts{SORT} = 1;
$instgen_opts{MANPAGES} = 1;
$instgen_opts{EXTERNALS} = [];
-exit 1 unless (GetOptions(
- "builddir|b=s" => \$instgen_opts{BUILDDIR},
- "validate|test|t" => \$instgen_opts{VALIDATE},
- "sort!" => \$instgen_opts{SORT},
- "manpages!" => \$instgen_opts{MANPAGES},
- "external|e=s" => $instgen_opts{EXTERNALS},
-));
+my %OPTIONS = ( "builddir|b=s" => \$instgen_opts{BUILDDIR},
+ "validate|test|t" => \$instgen_opts{VALIDATE},
+ "sort!" => \$instgen_opts{SORT},
+ "manpages!" => \$instgen_opts{MANPAGES},
+ "external|e=s" => $instgen_opts{EXTERNALS} );
-# Get global debhelper options
-Getopt::Long::Configure($prevconfig);
-init();
+my @dh_version = split(/\./, $Debian::Debhelper::Dh_Version::version);
+if ($dh_version[0] == 7 && $dh_version[1] == 0 || $dh_version[0] < 7) {
+ my $prevconfig = Getopt::Long::Configure("pass_through", "no_auto_abbrev");
+ exit 1 unless (GetOptions(%OPTIONS));
+ Getopt::Long::Configure($prevconfig);
+ init();
+} else {
+ $OPTIONS{"autodest"} = \$dh{AUTODEST};
+ $OPTIONS{"list-missing"} = \$dh{LIST_MISSING};
+ $OPTIONS{"fail-missing"} = \$dh{FAIL_MISSING};
+ init(options => \%OPTIONS);
+}
my $installed = new DH::InstGen::Installed;
@@ -897,6 +903,14 @@
foreach (@$fileset) {
my $pat = "$sdir/$_";
my @files = glob $pat;
+
+ if (! compat(6) && $type eq "install") {
+ # Fall back to looking in debian/tmp.
+ if (! @files || ! -e $files[0]) {
+ @files = glob "debian/tmp/$_";
+ }
+ }
+
if (@files == 1 && $files[0] eq $pat) {
# The pattern might have not been expanded.
# Check manually
More information about the pkg-kde-commits
mailing list