Control: tags -1 patch

On Sun, 07 Jan 2018 18:45:00 +0000 Niels Thykier <ni...@thykier.net> wrote:
> On Sun, 4 Sep 2016 15:57:55 -0400 (EDT) Anders Kaseorg <ande...@mit.edu>
> wrote:
> > Package: debhelper
> > Version: 9.20160814
> > 
> > It would be useful to have dh $@ --with-indep ADDON, an analogue of dh $@ 
> > --with ADDON that only loads the addon when Architecture: all packages are 
> > being built.
> > 
> > [...]
> > 
> > Anders
> > 
> > 
> 
> [...]

Hi,

An update on this (Helmut and Paul already heard some of this on IRC
yesterday).  I have written a possible solution to this problem in the
form of the following branch:

 * https://salsa.debian.org/debian/debhelper/tree/sequence-with-indep

I am hoping for testing/feedback on this before I merge it.

 => Notably, does this resolve your issues/needs in this area?




# From a add-on provider's perspective

Ensure the package that containing the add-on provides the
pseudo-package "dh-sequence-ADDON" where ADDON is the name of the
sequence add-on.  E.g. "dh-sequence-sphinxdoc" for sphinx.

The addon will be restricted to only adding commands and only when it
happens in the relevant sequence (*-indep for Build-Depends-Indep).
This is to ensure that the result is deterministic.  A notably
restriction is that it *cannot* alter the clean target (as the sequence
is not guaranteed to be available during clean as it is not an -indep
target).




# From a user/packager's perspective:

Use the dh-sequence-ADDON solely in Build-Depends-Indep.  Concrete
example being:

  Build-Depends-Indep: dh-sequence-sphinxdoc


Note that this can be combined with build-profiles a la:

  Build-Depends-Indep: dh-sequence-sphinxdoc <!nodocs>

Or

  Build-Depends-Indep: dh-sequence-dhpython <!nopython>
  (Ditto for Build-Depends)

(Subject to spelling mistakes; I did not double check all the names)



# How come this and not --with-indep

We already supported dh-sequarence-ADDON in Build-Depends (admittedly it
is fairly new).  Adding Build-Depends-Indep is a reasonably declarative
and DRY to request a sequence only during -indep targets.  Furthermore,
it can also naturally support build-profiles and other optional
build-dependency markers without having the packager duplicate the logic
in d/rules (this has been done in the branch as well).

The downside is sphinxdoc and doxygen will need an upload to add a
provides for their sequence.  I think this is acceptable (in
particularly because doxygen will need an upload anyway to make
dh_doxygen work in this case any way as I understand #799543)


# End remarks

The Build-profile support can most likely be "extracted" and applied to
debhelper master *without* the rest if the other parts are not relevant.
 Though I am only considering this if we believe that the proposed
approach for handling indep-only add-on sequences is flawed or if the
work on this drags on.


Thanks,
~Niels

Reply via email to