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

Re: [RFC] dh_ifexists: support for Depends-If-Exists



Hi,

Geoffrey Thomas <geofft@MIT.EDU> writes:
> I'd like some feedback on a Debhelper command I wrote, dh_ifexists, to
> parse lines of the form
>   Depends-If-Exists: foo, bar, baz (>= 2.5)
> and add all the satisfiable dependencies in ${misc:Depends}. So, if a
> release has foo 1.0-1 and baz 1.0-1 and no bar, then ${misc:Depends}
> will expand to just foo.

I don't think there is a way to test for the existance of Debian
packages that will work:

You cannot assume that apt has current package lists (or even is
installed in the build environment).

dh_ifexists currently assumes packages are build in a clean chroot,
with APT only knowning about official repositories of the
distribution of interest.  This does not work when APT knows, for
example, about squeeze-backports when building a stable update for
squeeze, or when local repositories are configured.  There are also
still many people who don't use sbuild (or equivalent) when building
packages.

Regards,
Ansgar


Reply to: