On Thu, Dec 19, 2002 at 12:05:59AM +0100, Joerg Friedrich wrote:
> What exactly is buggy with dh_install,
I backported this fix:
debhelper (4.0.9) unstable; urgency=low
* dh_install: glob relative to --sourcedir. Closes: #147908
* Documented what globbing is allowed.
-- Joey Hess <joeyh@debian.org> Thu, 23 May 2002 12:28:30 -0400
Here's the change:
diff -urd debhelper-4.0.2/debian/changelog debhelper-4.0.2.openoffice/debian/changelog
--- debhelper-4.0.2/debian/changelog Tue Apr 16 19:29:36 2002
+++ debhelper-4.0.2.openoffice/debian/changelog Thu Jun 20 08:38:20 2002
@@ -1,3 +1,9 @@
+debhelper (4.0.2.openoffice) unstable; urgency=low
+
+ * Backport dh_install globbing fix
+
+ -- Chris Halls <chris.halls@gmx.de> Thu, 20 Jun 2002 16:37:18 +0200
+
debhelper (4.0.2) unstable; urgency=low
* dh_install: delay globbing until after destintations have been found.
diff -urd debhelper-4.0.2/dh_install debhelper-4.0.2.openoffice/dh_install
--- debhelper-4.0.2/dh_install Tue Apr 16 19:27:39 2002
+++ debhelper-4.0.2.openoffice/dh_install Thu Jun 20 08:37:01 2002
@@ -65,6 +65,18 @@
debian/package.install file, with no explicit destination, then dh_install
will automatically guess the destination even if this flag is not set.
+=item B<--sourcedir=dir>
+
+Makes all source files relative to "dir". If this is specified, it is akin
+to all the source files having "dir" prepended to them. By default, "dir"
+is '.'.
+
+To make dh_install behave like the old dh_movefiles, move your
+package.files file to package.install and call dh_install with
+"--sourcedir=debian/tmp" appended to the command. This will
+approximate dh_movefiles behaviour, except it will copy files instead
+of moving them.
+
=item I<file [...] dest>
Lists files (or directories) to install and where to install them to.
@@ -81,12 +93,15 @@
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $file=pkgfile($package,"install");
+ my $srcdir = '.';
my @install;
if ($file) {
@install=filedoublearray($file); # no globbing yet
}
+ $srcdir = $dh{SOURCEDIR}."/" if defined $dh{SOURCEDIR};
+
if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
push @install, [@ARGV];
}
@@ -103,8 +118,8 @@
if (! defined $dh{AUTODEST} && @$set > 1) {
$dest=pop @$set;
}
-
- foreach my $src (map { glob } @$set) { # glob now
+ # glob now, relative to srcdir
+ foreach my $src (map { glob "$srcdir/$_" } @$set) {
next if excludefile($src);
if (! defined $dest) {
> maybe joeyh can fix it, so its
> not neccessary to provide a backport of debhelper.
When we were orginally discussing the bug on IRC I asked him about
backporting the change to Woody and he said no because it was unlikely to
get accepted.
Chris
Attachment:
pgpEmucJOHgqO.pgp
Description: PGP signature