OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Marc Espie (espieschutzenberger.liafa.jussieu.fr)
Date: Mon Apr 02 2001 - 09:57:55 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Code has been committed to allow newer, nicer dependencies.

    All rely on a `wedge' in pkg_add that rewrites packing lists on the fly.

    The wedge is a perl script, named `pkg', that will long-term completely
    replace pkg_add. What it does for now is scan the package for a set of
    newdepend package:depspec:default

    and replace them with traditional
    pkgdep
    that pkg_add can grok.

    What goes on is highly magical:
    - the newdepend line hold the full dependency tree of a given packages.
    - dependency lookup stops as soon as the dependencies are satisfied.
    - if a dependency can not be found (nothing matching depspec), then it
    choose default, and recurse down default's dependencies (which are there
    as other newdepend lines).

    That way, it's possible to depend on `wildcarded' packages, or alternative
    packages, and still have pkg_add recurse down and bring the correct
    dependencies.

    One minor side-effect is that you no longer get a full closure of one
    package dependencies as one single file, since this will recurse only
    as deep as needed.

    Currently, pkg understands:
    pkg dependencies query foo
    (check all packages that satisfy foo)
    pkg dependencies resolve PLIST
    (rewrite all newdepend in PLIST based on installed packages)
    pkg dependencies show foo
    (show all forward dependencies from installed package foo, useful for
    finding out what you must delete along with foo).

    This `feature' is not activated unless packages are built with NEW_DEPENDS
    defined in bsd.port.mk.

    Christian will soon provide us with a set of test packages that have that
    feature.

    Without NEW_DEPENDS, pkg_add will work transparently.
    pkg dependencies resolve PLIST will be invoked anyways, but it's a no-op
    in the absence of newdepend lines.