summaryrefslogtreecommitdiff
path: root/dh_install
diff options
context:
space:
mode:
authorjoey <joey>2002-07-19 00:58:01 +0000
committerjoey <joey>2002-07-19 00:58:01 +0000
commit699d0e5c2bd5bcd52a1833a802281ca66d7ae111 (patch)
tree32e4bf6134ab9281fd07d5f2cb9dff7d910327da /dh_install
parent620d5c492f5bfd918f3d88a8270b5e4565a41635 (diff)
r538: * Make dh_installchangelogs install debian/NEWS files as well, as
NEWS.Debian. Make dh_compress always compress them. The idea is to make these files be in a machine parsable form, like the debian changelog, but only put newsworthy info into them. Automated tools can then display new news on upgrade. It is hoped that if this catches on it will reduce the abuse of debconf notes. See discussion on debian-devel for details.
Diffstat (limited to 'dh_install')
-rwxr-xr-xdh_install41
1 files changed, 39 insertions, 2 deletions
diff --git a/dh_install b/dh_install
index 69f2436..8458840 100755
--- a/dh_install
+++ b/dh_install
@@ -7,11 +7,12 @@ dh_install - install files into package build directories
=cut
use strict;
+use File::Find;
use Debian::Debhelper::Dh_Lib;
=head1 SYNOPSIS
-B<dh_install> [B<-X>I<item>] [S<I<debhelper options>>] [S<I<file [...] dest>>]
+B<dh_install> [B<-X>I<item>] [B<--sutodest>] [B<--list-missing>] [S<I<debhelper options>>] [S<I<file [...] dest>>]
=head1 DESCRIPTION
@@ -65,6 +66,19 @@ Note that if you list only a filename on a line by itself in a
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<--list-missing>
+
+This option makes dh_install keep track of the files it installs, and then at
+the end, compare that list with the files in debian/tmp. If any of the files
+(and symlinks) in debian/tmp were not installed to somewhere, it will
+warn on stderr about that.
+
+This may be useful if you have a large package and want to make sure that
+you don't miss installing newly added files in new upstream releases.
+
+Note that files that are excluded from being moved via the -X option are not
+warned about.
+
=item B<--sourcedir=dir>
Makes all source files relative to "dir". If this is specified, it is akin
@@ -88,7 +102,7 @@ The files will be installed into the first package dh_install acts on.
init();
-my $ret=0;
+my @installed;
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
@@ -134,6 +148,15 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
doit("install","-d","$tmp/$dest");
}
+ # Keep track of what's installed.
+ if ($dh{LIST_MISSING}) {
+ # Kill any extra slashes. Makes the
+ # @installed stuff more robust.
+ $src=~y:/:/:s;
+ $src=~s:/+$::;
+ push @installed, "\Q$src\E\/.*|\Q$src\E";
+ }
+
if (-d $src && $exclude) {
my ($dir_basename) = basename($src);
# Pity there's no cp --exclude ..
@@ -148,6 +171,20 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
+if ($dh{LIST_MISSING}) {
+ my @missing;
+ my $installed=join("|", @installed);
+ $installed=qr{^$installed$};
+ find(sub {
+ -f || -l || return;
+ $_="$File::Find::dir/$_";
+ push @missing, $_ unless /$installed/;
+ }, './debian/tmp');
+ if (@missing) {
+ warning "$_ not installed" foreach @missing;
+ }
+}
+
=head1 SEE ALSO
L<debhelper(1)>