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

Re: Build-Depends-If-Available



Package: debian-policy

On Sun, Aug 09, 2020 at 06:28:50PM +0100, Barak A. Pearlmutter wrote:
> I understand what you're saying, and indeed trying to encode
> "Build-Depends-If-Available: foo" as "Build-Depends: foo | something"
> is a bad idea from the get-go. After all, foo can have three states on
> an architecture: installable, unavailable, or
> available-but-uninstallable-for-some-reason. And we want different
> behaviour in the three cases: build with it, build without it, or
> delay-building-until-installable. And we can't shoehorn those three
> things into the binary logic of "foo | something".

Exactly, and therein lies the problem.

Buildd used to consider alternative build-dependencies, and it caused a
never-ending stream of package transition entanglements, because the
delay-building-until-installable thing never happened, which meant that
every rebuild of something to solve a problem would have to either be
timed very well, or would be likely to be playing a roulette game of
"will the rebuild solve all problems or create yet even more".

-policy: this is a question that has come up before
(https://lists.debian.org/debian-devel/2016/12/msg00470.html is another
example that springs to mind, but I'm pretty sure there are more), so I
think we should document in Policy that a) buildd only looks at the
first dependency in alternative build-dependencies, and b) why this is
the case.

Suggestion:

---8<---
Note that sbuild, the program which builds packages on each of Debian's
architectures, only considers the first alternative for any declared
element in the Build-Depends: header, after removing alternatives with
architecture restrictions that don't apply to the architecture on which
the package is building. All other alternatives are ignored by sbuild.

This is done so that package dependencies are predictable; previously,
sbuild would consider alternative dependencies, but it made binary
package dependencies change based on whether a particular package
happened to be installable on unstable at the time of a package rebuild.
These changes were unpredictable, and made handling transitions harder
than they needed to be.
--->8---

Not sure in which section to place this though. Thoughts?

-- 
To the thief who stole my anti-depressants: I hope you're happy

  -- seen somewhere on the Internet on a photo of a billboard


Reply to: