Subject: non-flat depends [was: Re: Package Views Integration (finally!)]
To: Julio M. Merino Vidal <>
From: Hubert Feyrer <>
List: tech-pkg
Date: 08/21/2003 12:39:33
[subject adjusted]

On Thu, 21 Aug 2003, Julio M. Merino Vidal wrote:
> > Um, that's not true.
> > You can DEPEND+=kde and still have a lot of depending pkgs, w/o buildlink
> > involved at all.
> Hmm... I thought using DEPENDS directly included a single dependancy.

You thought wrong. See bsd.*

> > IMHO having dependencies registered as we have it right now is a benefit
> > as you see with one "pkg_delete foo" what still needs foo
> It has been discussed more than once IIRC, and it is a problem.  For example,
> all revision bumps needed when bumping a revision.  Or having a program depend
> on a package where this dependancy is only needed by another dependancy (for
> example, what I noticed yesterday, xmms does not use esound at all ATM, but it
> registers it as a dependancy because libmikmod needs it; the same happens with
> lots of packages).

so instead of
	xmms needs (libmikmod, esound)
you say
	xmms needs (libmikmod needs esound)

What I guess you try to solve is easy removing of esound.
But this will still not work as esound is still needed by libmikmod.
You just won't find out when removing libmikmod, but have to go in

> > You'll have to
> > descend down otherwise... either manually, which would suck, or
> > automatically, which you have to code first, and which has the same effect
> > as not doing this at all.
> I think pkgdepgraph does it... or maybe it relies on the current behavior?

I don't know what pkgdepgraph does, but various other places far more
inside the pkg tools do. depends prescan in pkg_add, pkg size calculation,
pkg_tarup and at least one other place i cannot recall.

> I said it may be a good time to do this change now because, as you will have
> to convert packages manually, you have the chance to review which exact deps
> it uses and remove any of the indirect ones if not needed (i.e., if a package
> depends on gnome-vfs2, it shouldn't need an explicit dependancy on bzip2 or
> whatever, if not used *directly* by the package).

Well, that dependency won't show up in pkgsrc. Which I presume is what you
are talking here.

See the esound example above on why this won't work for binary/installed
pkgs.  You'll have to add code either way to work around the
recursive/tree-like structure you build that way.

 - Hubert

  ___ _ _  _   _        * Harddisk Image Cloning *
 / __| | || | | | 
| (_ |_  _| |_| |
 \___| |_| \___/          v1.12 out now, including partition support!