Bug#863447: [debhelper-devel] Bug#863447: dh_install -X is ignored for --list/fail-missing

2017-06-01 Thread Niels Thykier
Iain Lane:
> On Sat, May 27, 2017 at 12:51:38AM +0200, Michael Biebl wrote:
>> Package: debhelper
>> Version: 10.4
>> Severity: normal
>>
>> Hi,
>>
>> I just tried debhelper 10.4 from experimental which implements
>> dh_install --list/fail-missing via the new dh_missing tool.
>>
>> I don't use dh_missing directly yet, but rely on the backwards compat
>> support. My debian/rules contains
>>
>> override_dh_install:
>>  dh_install -X.la --list-missing
>>
>> Apparently the -X.la is ignored though and dh_missing still complains
>> about the libtool .la files:
> 
> Indeed. How about a patch like this? Comes with a test.
> 
> Cheers,
> 
> [...]

Thanks :)

I don't have time to review/apply it now, but I will definitely come
back to it when I have time for debhelper. :)

Thanks,
~Niels



Bug#863447: [debhelper-devel] Bug#863447: dh_install -X is ignored for --list/fail-missing

2017-06-01 Thread Niels Thykier
Michael Biebl:
> Am 31.05.2017 um 22:23 schrieb Iain Lane:
>> On Sat, May 27, 2017 at 12:51:38AM +0200, Michael Biebl wrote:
>>> I also note, that usr/share/doc/NetworkManager/examples/server.conf is
>>> actually installed via debian/network-manager.examples, which contains:
>>> debian/tmp/usr/share/doc/NetworkManager/examples/server.conf
>>>
>>> I assume dh_installexamples is simply not updated yet to support the new
>>> dh_missing functionality?
>>
>> This also happens with dh_install --list-missing currently[0]. I *guess*
>> that this is because dh_install is run first, before all the other
>> dh_installfoo commands. So dh_install itself has no way of knowing what
>> is about to be installed by other commands. This to me seems unfixable
>> without either changing the order (at a compat bump?) or removing
>> --{list,fail}-missing and running dh_missing after all the dh_installfoo
>> commands. AFAICS they will all need to call log_installed_files for this
>> to work properly.
> 
> Right, I don't think this is fixable with the current dh_install and I
> was actually thinking of the new dh_missing helper here which indeed
> should run "last" i.e. after all other dh_installfoo helpers.
> 
> Michael
> 
> [...]

FTR, dh_missing is run after all (known dh_installX) helpers in the
sequence in debhelper 10.3+.  By default it does nothing, so you have to
override it to pass it --list-missing/--fail-missing.

Also, in compat 9, running dh_install with --list-missing/--fail-missing
may cause dh to assume that dh_missing has been run.  That is a
side-effect of how dh keeps track of which commands have been run.

Thanks,
~Niels



Bug#863447: dh_install -X is ignored for --list/fail-missing

2017-05-31 Thread Michael Biebl
Am 31.05.2017 um 22:23 schrieb Iain Lane:
> On Sat, May 27, 2017 at 12:51:38AM +0200, Michael Biebl wrote:
>> I also note, that usr/share/doc/NetworkManager/examples/server.conf is
>> actually installed via debian/network-manager.examples, which contains:
>> debian/tmp/usr/share/doc/NetworkManager/examples/server.conf
>>
>> I assume dh_installexamples is simply not updated yet to support the new
>> dh_missing functionality?
> 
> This also happens with dh_install --list-missing currently[0]. I *guess*
> that this is because dh_install is run first, before all the other
> dh_installfoo commands. So dh_install itself has no way of knowing what
> is about to be installed by other commands. This to me seems unfixable
> without either changing the order (at a compat bump?) or removing
> --{list,fail}-missing and running dh_missing after all the dh_installfoo
> commands. AFAICS they will all need to call log_installed_files for this
> to work properly.

Right, I don't think this is fixable with the current dh_install and I
was actually thinking of the new dh_missing helper here which indeed
should run "last" i.e. after all other dh_installfoo helpers.

Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#863447: dh_install -X is ignored for --list/fail-missing

2017-05-31 Thread Iain Lane
On Sat, May 27, 2017 at 12:51:38AM +0200, Michael Biebl wrote:
> I also note, that usr/share/doc/NetworkManager/examples/server.conf is
> actually installed via debian/network-manager.examples, which contains:
> debian/tmp/usr/share/doc/NetworkManager/examples/server.conf
> 
> I assume dh_installexamples is simply not updated yet to support the new
> dh_missing functionality?

This also happens with dh_install --list-missing currently[0]. I *guess*
that this is because dh_install is run first, before all the other
dh_installfoo commands. So dh_install itself has no way of knowing what
is about to be installed by other commands. This to me seems unfixable
without either changing the order (at a compat bump?) or removing
--{list,fail}-missing and running dh_missing after all the dh_installfoo
commands. AFAICS they will all need to call log_installed_files for this
to work properly.

Cheers,

-- 
Iain Lane  [ i...@orangesquash.org.uk ]
Debian Developer   [ la...@debian.org ]
Ubuntu Developer   [ la...@ubuntu.com ]

[0] 
https://buildd.debian.org/status/fetch.php?pkg=network-manager=i386=1.8.0-2=1494613902=0


signature.asc
Description: PGP signature


Bug#863447: dh_install -X is ignored for --list/fail-missing

2017-05-31 Thread Iain Lane
On Sat, May 27, 2017 at 12:51:38AM +0200, Michael Biebl wrote:
> Package: debhelper
> Version: 10.4
> Severity: normal
> 
> Hi,
> 
> I just tried debhelper 10.4 from experimental which implements
> dh_install --list/fail-missing via the new dh_missing tool.
> 
> I don't use dh_missing directly yet, but rely on the backwards compat
> support. My debian/rules contains
> 
> override_dh_install:
>   dh_install -X.la --list-missing
> 
> Apparently the -X.la is ignored though and dh_missing still complains
> about the libtool .la files:

Indeed. How about a patch like this? Comes with a test.

Cheers,

-- 
Iain Lane  [ i...@orangesquash.org.uk ]
Debian Developer   [ la...@debian.org ]
Ubuntu Developer   [ la...@ubuntu.com ]
From 0ca87c2d2b383e1e6e0c42c4f74e48eeb60cbb35 Mon Sep 17 00:00:00 2001
From: Iain Lane 
Date: Wed, 31 May 2017 20:45:15 +0100
Subject: [PATCH] dh_install: Pass --exclude/-X to dh_missing. (Closes:
 #863447)

---
 debian/changelog  | 6 ++
 dh_install| 3 +++
 t/dh_missing/Makefile | 1 +
 t/dh_missing/dh_missing.t | 9 -
 4 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index db49925f..20628ddd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+debhelper (10.5) UNRELEASED; urgency=medium
+
+  * dh_install: Pass --exclude/-X to dh_missing. (Closes: #863447)
+
+ -- Iain Lane   Wed, 31 May 2017 20:40:24 +0100
+
 debhelper (10.4) experimental; urgency=medium
 
   * Team upload.
diff --git a/dh_install b/dh_install
index 820ac70b..2806af9e 100755
--- a/dh_install
+++ b/dh_install
@@ -271,6 +271,9 @@ if ($missing_files) {
 
 if ($dh{LIST_MISSING} || $dh{FAIL_MISSING}) {
 	my @options;
+	foreach (@{$dh{EXCLUDE}}) {
+		push(@options, '--exclude', $_);
+	}
 	push(@options, '--sourcedir', $dh{SOURCEDIR}) if defined($dh{SOURCEDIR});
 	push @options, "--list-missing" if $dh{LIST_MISSING};
 	push @options, "--fail-missing" if $dh{FAIL_MISSING};
diff --git a/t/dh_missing/Makefile b/t/dh_missing/Makefile
index 679592a7..e33e1dfc 100644
--- a/t/dh_missing/Makefile
+++ b/t/dh_missing/Makefile
@@ -4,3 +4,4 @@ install:
 
 installmore: install
 	install -m 644 file-for-foo debian/tmp/usr/bin/file-for-foo-more
+	install -m 644 file-for-foo debian/tmp/usr/bin/file-for-foo-lots
diff --git a/t/dh_missing/dh_missing.t b/t/dh_missing/dh_missing.t
index 6cd80ea8..851c5ef5 100755
--- a/t/dh_missing/dh_missing.t
+++ b/t/dh_missing/dh_missing.t
@@ -22,7 +22,7 @@ if (not defined($rootcmd)) {
 	plan skip_all => 'fakeroot required';
 }
 else {
-	plan(tests => 4);
+	plan(tests => 5);
 }
 
 # Verify dh_missing does not fail when all files are installed.
@@ -41,6 +41,13 @@ ok(! ($? & 127), 'dh_missing did not die due to a signal');
 my $exitcode = ($? >> 8);
 is($exitcode, 2, 'dh_missing exited with exit code 2');
 
+# Verify that dh_install -X --fail-missing is passed through to dh_missing (#863447)
+# dh_install -Xfile makes file-for-foo not be installed. Then we shouldn't
+# complain about it not being missing.
+system("$rootcmd $TOPDIR/dh_clean");
+system("$rootcmd make install");
+is(system("PATH=$TOPDIR:\$PATH $rootcmd $TOPDIR/dh_install -X more --exclude lots --fail-missing"),0, 'dh_install -X... --fail-missing failed');
+
 system("$rootcmd $TOPDIR/dh_clean");
 
 # Local Variables:
-- 
2.11.0



signature.asc
Description: PGP signature


Bug#863447: dh_install -X is ignored for --list/fail-missing

2017-05-26 Thread Michael Biebl
Package: debhelper
Version: 10.4
Severity: normal

Hi,

I just tried debhelper 10.4 from experimental which implements
dh_install --list/fail-missing via the new dh_missing tool.

I don't use dh_missing directly yet, but rely on the backwards compat
support. My debian/rules contains

override_dh_install:
dh_install -X.la --list-missing

Apparently the -X.la is ignored though and dh_missing still complains
about the libtool .la files:


   debian/rules override_dh_install
make[1]: Verzeichnis „/home/michael/debian/build-area/network-manager-1.8.0“ 
wird betreten
dh_install -X.la --list-missing
dh_install: Please use dh_missing --list-missing/--fail-missing instead
dh_install: This feature will be removed in compat 11.
dh_missing: usr/lib/pppd/2.4.7/nm-pppd-plugin.la exists in debian/tmp but is 
not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/libnm-util.la exists in debian/tmp but is 
not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/libnm-glib.la exists in debian/tmp but is 
not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/libnm-glib-vpn.la exists in debian/tmp but 
is not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/libnm.la exists in debian/tmp but is not 
installed to anywhere
dh_missing: 
usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-bluetooth.la exists 
in debian/tmp but is not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-team.la 
exists in debian/tmp but is not installed to anywhere
dh_missing: 
usr/lib/x86_64-linux-gnu/NetworkManager/libnm-settings-plugin-ibft.la exists in 
debian/tmp but is not installed to anywhere
dh_missing: 
usr/lib/x86_64-linux-gnu/NetworkManager/libnm-settings-plugin-ifupdown.la 
exists in debian/tmp but is not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-wifi.la 
exists in debian/tmp but is not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/NetworkManager/libnm-wwan.la exists in 
debian/tmp but is not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-wwan.la 
exists in debian/tmp but is not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-adsl.la 
exists in debian/tmp but is not installed to anywhere
dh_missing: usr/lib/x86_64-linux-gnu/NetworkManager/libnm-ppp-plugin.la exists 
in debian/tmp but is not installed to anywhere
dh_missing: usr/share/doc/NetworkManager/examples/server.conf exists in 
debian/tmp but is not installed to anywhere
The following debhelper tools have reported what they installed (with 
files per package)
 * dh_install: gir1.2-networkmanager-1.0 (2), gir1.2-nm-1.0 (1), 
libnm-dev (7), libnm-glib-dev (36), libnm-glib-vpn-dev (6), libnm-glib-vpn1 
(2), libnm-glib4 (2), libnm-util-dev (36), libnm-util2 (2), libnm0 (2), 
network-manager (36), network-manager-config-connectivity-debian (1), 
network-manager-dev (7)
If the missing files are installed by another tool, please file a bug 
against it.
Be sure to test with dpkg-buildpackage -A/-B as the results may vary 
when only a subset is built
For a short-term work-around: Add the files to debian/not-installed


I also note, that usr/share/doc/NetworkManager/examples/server.conf is
actually installed via debian/network-manager.examples, which contains:
debian/tmp/usr/share/doc/NetworkManager/examples/server.conf

I assume dh_installexamples is simply not updated yet to support the new
dh_missing functionality?

Regards,
Michael

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64
 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debhelper depends on:
ii  autotools-dev20161112.1
ii  binutils 2.28-5
ii  dh-autoreconf14
ii  dh-strip-nondeterminism  0.034-1
ii  dpkg 1.18.24
ii  dpkg-dev 1.18.24
ii  file 1:5.30-1
ii  libdpkg-perl 1.18.24
ii  man-db   2.7.6.1-2
ii  perl 5.24.1-2
ii  po-debconf   1.0.20

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make  2.201608

-- no debconf information