[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Computing Build-Depends at build time (and other updates to debian/control)?

Josh Triplett writes ("Re: Computing Build-Depends at build time (and other updates to debian/control)?"):
> On Tue, Aug 23, 2016 at 11:45:03AM +0100, Ian Jackson wrote:
> > As people have said: there is nothing wrong with writing a program to
> > generate debian/control.  You just need to 1. put the generated
> > debian/control in the source package; 2. not have the Debian build
> > system (ie, the normal rules targets) ever update it[1]; 3. rerun your
> > generator manually whenever you like.
> > I don't understand what your objection to this is.
> Lack of standardization and consistency.

I think there should be a standard rules target for updating any
autogenerated debian/control.  (And perhaps debian/copyright too...)
But the lack of a de jure standard does not mean that this approach is
not best practice.

>  I've seen various packages
> implement this differently (and often not following point (2), insofar
> as making a change to the package may cause the control generator to
> re-run during clean or build).

Please file bugs in such cases.  If there are many, you may want to
make a MBF.

>  Even if dpkg-buildpackage doesn't invoke this automatically, and
> the source package instead becomes a generated output format not
> actually checked into version control,

You should commit the generated debian/control to your version
control.  It is of course fine to have separate branches in your
version control some of which don't have these files.

>  I'd still love to see a consistent mechanism to invoke the control
> generator for any package, and some (ideally enforceable) subset of
> Build-Depends needed to run that generator.

Under what circumstances would or should an automatic build tool,
which does not know anything about your package, do this ?

I think in practice you only need to run this generator for packages
whose build system arrangements you understand (eg, in your situation,
for package you know are part of this Cargo setup).  So there is not a
huge need for an automatic check.

>  If the generation doesn't run as part of the build process,
> then perhaps this could just use a new build profile "control", tagging
> the required Build-Depends with <control>, and a "debian/rules control"
> target, not automatically invoked but manually invokable.

Perhaps what you want instead is just this:

> > [1] As I say, if the contents of debian/control only need to depend on
> > other contents of the same source package, you can write a check to
> > see whether it's up to date.

but made into a DEP-8 autopkgtest.


Ian Jackson <ijackson@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply to: