[8347] in athena10
Re: [RFC] dh_ifexists: support for Depends-If-Exists
daemon@ATHENA.MIT.EDU (Ansgar Burchardt)
Fri Aug 26 06:54:34 2011
From: Ansgar Burchardt <ansgar@43-1.org>
To: debian-derivatives@lists.debian.org, debathena@MIT.EDU
Date: Fri, 26 Aug 2011 12:54:21 +0200
In-Reply-To: <alpine.DEB.2.00.1108250320510.2015@tyger.mit.edu> (Geoffrey
Thomas's message of "Thu, 25 Aug 2011 03:59:10 -0400 (EDT)")
Message-ID: <87aaaw4f4y.fsf@deep-thought.43-1.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
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