Subject: Thoughts on dependency information
To: None <>
From: Masao Uebayashi <>
List: tech-pkg
Date: 03/05/2002 15:45:30
Now dependency information of an installed package is very limited and
insufficient to describe the real dependency of the package.

IMO, there are three relations of packages in the current Pkgsrc

 1) What package/version is required to use a package.  This
    information is used while running make(1).  The version
    information may have range.  For example, gdk-pixbuf-gnome
    (graphics/gdk-pixbuf-gnome) has a dependency to gdk-pixbuf
    (graphics/gdk-pixbuf).  The line looks

      BUILDLINK_DEPENDS.gdk-pixbuf=   gdk-pixbuf>=0.10.1

    Meaning the requirement to gdk-pixbuf has version range >=0.10.1.

 2) What package/version a binary package is built with.  A package is
    built with a certain version of another.  After build, the version
    requirement has no range.  For example, if gdk-pixbuf-gnome is
    built with gdk-pixbuf-0.10.2, the resulting binary package
    `gdk-pixbuf-gnome-X.Y.Z.tgz' is built with gdk-pixbuf-0.10.2.

    I think that information described in building procedures
    (makefiles) is kind of ``type'' and each binary package is an
    instance.  If you have an introductory book on object oriented
    methodology, you may be able to find some statements that a
    relation of types (classes) is called an ``association'' and a
    relation of instances a ``link''.

    I'm not claiming I'm an expert of OO.  The point is, the above two
    are distinct.

 3) What package a installed package requires.  An installed package
    may have some links to other installed ones.  This is used for
    administrative purpose.  This is what +REQUIRED_BY holds.

I think current binary package format has poor information, it has
only 3).  I guess adding 1) and 2) in binary packages is not so hard
(and not so big), alhough they have no real purpose now.