Bug#871822: [debhelper-devel] Bug#871822: debhelper: Ignore .install files for "Section: doc" packages when the nodoc build option is set

2017-08-12 Thread Niels Thykier
Emmanuel Bourg:
> On 08/12/2017 08:46 AM, Niels Thykier wrote:
> 
>> I appreciate the idea, but it is not scalable to implement this kind of
>> filtering in dh_install.
> 
> Do you mean that debian/control would have to be parsed on each
> invocation of dh_install, roughly once per file installed?
> 

No, it is related to dh_install is the wrong place to do this kind of
filtering.  The best I can offer is:

 * dh_install + dh_exec.

 * Tag each relevant line with a nodoc filter and dh_exec will do the
   filtering.

It is not automatic, but it is the sort of filtering that
implementation-wise scales for dh_install (with dh_exec).

The fundamental problem is that I have to assume this will not be the
last filter of this kind.  For dh_installdocs, under nodocs that is
(almost) a no-op - this seems logical and well-defined as a whole
because it installs documentation and only documentation.
  Whereas dh_install installs all sorts of things.  So far, dh_install
has not cared what it installed.  But it would have to in order to
support this filtering.  And as you add new kind of filtering, you will
have to add more and more "content guessing rules".  That is why I
believe dh_install is the wrong place to support this filter - it does
not generalize to more filters.

It would also have to make assumptions about path names to do this
content filtering, which means if I want to support different prefixes
(e.g. /app for flatpak) or even harder, generalized paths outside FHS,
the content guessing rules become a nightmare to maintain.  Ergo, it
would also paint me into a corner, where I risk being unable to support
another feature I am considering to add.

> 
>> Instead, I will recommend that you use
>> dh_installdocs, dh_installman etc. to install such documentation.  They
>> will under the nodoc profile know what to ignore.
> 
> I considered that but it won't work. dh_installdocs installs to
> /usr/share/doc/package and this isn't the directory we want to install
> to (libfoo-java-doc installs the javadoc for libfoo-java in
> /usr/share/doc/libfoo-java, and not /usr/share/doc/libfoo-java-doc).
> 
> Emmanuel Bourg
> 

Right, dh_installdocs with a fix for #824221 (not that I am any wiser on
how to do that sanely).  A case where policy moved faster than the
tooling. :P

I appreciate the frustration; this nodoc thing plus #824221 caught me a
bit by surprise.  At the moment, the best I can offer is dh_install with
dh_exec as mentioned above.  It is not particularly great or automatic,
but it should work.

Thanks,
~Niels



Bug#871822: [debhelper-devel] Bug#871822: debhelper: Ignore .install files for "Section: doc" packages when the nodoc build option is set

2017-08-12 Thread Emmanuel Bourg
On 08/12/2017 08:46 AM, Niels Thykier wrote:

> I appreciate the idea, but it is not scalable to implement this kind of
> filtering in dh_install.

Do you mean that debian/control would have to be parsed on each
invocation of dh_install, roughly once per file installed?


> Instead, I will recommend that you use
> dh_installdocs, dh_installman etc. to install such documentation.  They
> will under the nodoc profile know what to ignore.

I considered that but it won't work. dh_installdocs installs to
/usr/share/doc/package and this isn't the directory we want to install
to (libfoo-java-doc installs the javadoc for libfoo-java in
/usr/share/doc/libfoo-java, and not /usr/share/doc/libfoo-java-doc).

Emmanuel Bourg



Bug#871822: [debhelper-devel] Bug#871822: debhelper: Ignore .install files for "Section: doc" packages when the nodoc build option is set

2017-08-12 Thread Emmanuel Bourg
On 08/12/2017 08:46 AM, Niels Thykier wrote:

> I appreciate the idea, but it is not scalable to implement this kind of
> filtering in dh_install.

Another idea, probably easier to implement: could dh_install simply skip
the files installed under /usr/share/doc when nodoc is set?

Emmanuel Bourg



Bug#871822: [debhelper-devel] Bug#871822: debhelper: Ignore .install files for "Section: doc" packages when the nodoc build option is set

2017-08-12 Thread Niels Thykier
Control: tags -1 wontfix

Emmanuel Bourg:
> Package: debhelper
> Version: 10.7.2
> Severity: normal
> 
> Hi,
> 
> I started implementing the new "nodoc" build option in maven-debian-helper
> but it led to build failures because even if the javadoc generation is
> skipped, the .install files are still interpreted and dh_install fails due
> to the missing files.
> 
> Would it be possible to modify debhelper such that the .install files are
> ignored for the packages identified as belonging to the "doc" section in
> debian/control when nodoc is set?
> 
> Thank you,
> 
> Emmanuel Bourg
> [...]


Hi,

I appreciate the idea, but it is not scalable to implement this kind of
filtering in dh_install.  Instead, I will recommend that you use
dh_installdocs, dh_installman etc. to install such documentation.  They
will under the nodoc profile know what to ignore.

Admittedly, these tools are suboptimal to use for this purpose before
compat 11.

Thanks,
~Niels



Bug#871822: debhelper: Ignore .install files for "Section: doc" packages when the nodoc build option is set

2017-08-11 Thread Emmanuel Bourg
Package: debhelper
Version: 10.7.2
Severity: normal

Hi,

I started implementing the new "nodoc" build option in maven-debian-helper
but it led to build failures because even if the javadoc generation is
skipped, the .install files are still interpreted and dh_install fails due
to the missing files.

Would it be possible to modify debhelper such that the .install files are
ignored for the packages identified as belonging to the "doc" section in
debian/control when nodoc is set?

Thank you,

Emmanuel Bourg