On Tue, 2026-01-06 at 19:07 +0100, Niels Thykier wrote:
> Steve M:
> > Hello,
> >
> > My package "swiftlang" has a build dependency on itself of the same
> > version or the prior version. So when building swiftlang 6.1.3 the
> > Build-Depends in d/rule are:
> >
> > [...]
> >
> > What I would like to do is have the swiftlang Build-Depends resolve
> > as
> > above but have swiftlang-dev be required to match the version of
> > swiftlang. Something like this:
> >
> > Build-Depends: debhelper-compat (= 13),
> > swiftlang (>=6.0.3),
> > swiftlang-dev (=${swiftlang:Version}),
> >
> > [...]
> >
> > Is there a way to create this version match requirement in Build-
> > Depends?
> >
> >
> > Thanks
> > -Steve
> >
>
> Hi Steve,
>
> To answer the immediate question: It is not possible with any
> supported
> tooling. The only way to achieve this is by generating the
> debian/control, which is generally not recommended (and if you do
> down
> this route, you have to ensure the control file is not regenerated
> during build).
>
> If you are at the point where regenerating the d/control is less of a
> pain than bumping the build-depends periodically, then it might be
> the
> better option for you. But mind the gap and the rough edges, because
> it
> is not a first class experience.
>
> Best regards,
> Niels
>
> PS: I assume in my response that breaking the self build-dependency
> has
> been considered and ruled out as an option for avoiding this problem.
Niels,
Thank you for confirming what I suspected. I'm going to explore one
suggestion from the Ubuntu community (where this issue has surfaced)
and one from my package sponsor. We'll go with whichever works the best
and is compliant with Debian policies.
Thanks
-Steve