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

Re: Binary depends



On Fri, May 24, 2002 at 05:18:13PM +0200, Sven Luther wrote:
> On Thu, May 23, 2002 at 06:45:47PM -0500, Steve Langasek wrote:
> > On Thu, May 23, 2002 at 06:39:16PM -0400, Bob Hilliard wrote:
> > >      I have just discovered (via a bug report) that dict and dictd
> > > depend on netbase.  (dict and dictd communicate with each other using
> > > the TCP/IP protocol.)  Since dictd has been in debian for over four
> > > years without declaring the dependency, this indicates that netbase is
> > > almost universally installed! :-)

> > >     Is there any tool, comparable to dpkg-shlibs, to determine
> > > non-library dependencies?

> > How would you propose to detect such a dependency?  Library dependencies
> > are easily detected; they're listed in a definitive location in every
> > ELF binary, and all libraries listed there are definitely dependencies
> > because the binary won't run without them.  Dependencies on other
> > programs, OTOH, can only be identified using heuristics, or by simply
> > knowing your package very well:  any tool that (e.g.) tries to grep
> > through the package sources to find out what other programs it
> > references will turn up lots of false positives on packages that *can*
> > use particular binaries if present, but don't really depend on those
> > external binaries.

> Well, you could try running the program through strace, and then look at
> all the opened files (with the proper strace flag) and then run dpkg -S
> on them.

Again, this will turn up a lot of false positives.  Not every package
whose files you might touch needs to be a dependency; your package may
function perfectly well in the absence of those files.  However, it's
probably safe to say that about 99% of the packages whose files you
touch should be declared in /some/ sort of relationship: either Depends,
Recommends, or Suggests.  Sounds like a good enough heuristic to be
worth implementing, if someone has the interest.

Detecting error conditions, to distinguish between a dependency and a
recommendation, will still require human judgement.

Steve Langasek
postmodern programmer

Attachment: pgps_Yk_UtE5i.pgp
Description: PGP signature


Reply to: