On Sat, 19 May 2018 11:38:00 +0000 Niels Thykier <ni...@thykier.net> wrote:
> Control: tags -1 moreinfo
> 
> On Wed, 6 Sep 2006 11:34:37 +0200 Martin Pitt <mp...@debian.org> wrote:
> > Package: debhelper
> > Version: 5.0.37.3
> > 
> > Hi!
> > 
> > While evaluating a curious kernel build failure in Ubuntu (where we
> > use a dh_strip wrapper to automatically generate debug symbol packages
> > for everything) I noticed a questionable behaviour: If the
> > package build directory does not exist, dh_* exits successfully rather
> > than failing (example in the built pmount source directory):
> > 
> >   $ ls -d debian/pmount debian/pmou
> >   ls: debian/pmou: No such file or directory
> >   debian/pmount
> > 
> >   $ dh_strip -ppmount --tmpdir=debian/pmou; echo $?
> >   Can't stat debian/pmou: No such file or directory
> >    at /usr/bin/dh_strip line 192
> >   0
> > 
> > This also happens without --tmpdir:
> >  
> >   $ dh_strip -ppmount; echo $?
> >   Can't stat debian/pmount: No such file or directory
> >    at /usr/bin/dh_strip line 192
> >   0
> > 
> > This also happens with dh_fixperms, so I guess dh_strip is not the
> > only affected script.
> > 
> > IMHO dh_* should really fail in that case. Otherwise packages with
> > typos or bugs debian/rules silently build and such failures might go
> > unnoticed. (in our kernel example, a make prerequisite was missing and
> > thus dh_strip did not have any effect; without our wrapper we would
> > never have noticed).
> > 
> > Thank you,
> > 
> > Martin
> > 
> > [...]
> 
> Hi Martin,
> 
> I appreciate the report and the issue.  In general, I agree with the
> sentiment, but in this case I find it difficult to implement in general.
> 
> The problem occurs because debhelper lazily generates the package build
> directories.  As such, a missing package build directory simply implies
> that no helper needed to install anything into the package so far.  What
> if this helper is simply the first helper that has anything to do in
> this package build directory?
> 
> Therefore, I cannot make dh_* fail on a missing package build directory
> in the general case.  Of course, a missing package build directory with
> the -P smells like it would be an issue - although, I would not be
> surprised if people rely on this to work (e.g. using -p<foo> for a
> package excluded by dpkg-buildpackage -A/-B).
>   If we are doing this check, then we need to talk about which helpers
> would that be and can we come with is the guiding principle for choosing
> them?
> 
> Thanks,
> ~Niels


Given the age of the bug and lack of feedback on the proposal, I am
taking the liberty of closing this bug.

Feel free to reopen it with the requested additional information if it
is still relevant.

Thanks,
~Niels

Reply via email to