freebsd-skq/usr.sbin/pkg_install
Brian Somers f345b422d1 When running pkg_add -r, check & install our dependencies for each
package rather than expecting our top level package to get all of
the dependencies correct.

Previously, the code depended on the top level package having all
of the pkgdep lines in +CONTENTS correct and in the right order,
but that doesn't always happen due to code such as this (in
security/gnutls/Makefile):

    .if (defined(WITH_LZO) || exists(${LOCALBASE}/lib/liblzo2.so)) && !defined(WITHOUT_LZO)
    LIB_DEPENDS+=           lzo2:${PORTSDIR}/archivers/lzo2
    ....

With such conditional dependencies, my 'sophox-packages' package won't
install.  The dependency tree looks like this:

    sophox-packages
      ...
      x11/gnome2
        x11/gnome-applets
          net/libgweather
            devel/libsoup
              security/gnutls
                security/libgcrypt
                  security/libgpg-error
      ...
      x11/gnome2
        archivers/file-roller
          archivers/gtar
            archivers/lzop
              archivers/lzo2
      ...

gnutls doesn't depend on lzo2 initially, but lzo2 is dragged into the
mix via other dependencies and is built by the initial 'make'.  The
subsequent package generation for gnutls adds a pkgdep line for lzo2
to gnutls' +CONTENTS but the pkgdeps in sophox-packages' +CONTENTS
has gnutls *before* lzo2.

As a result, sophox-packages cannot install; gnutls fails because lzo2
is missing, 82 more packages fail because gnutls is missing and the
whole thing spirals into a super-confusing mess!

MFC after:	3 weeks
2009-06-19 17:07:38 +00:00
..
add When running pkg_add -r, check & install our dependencies for each 2009-06-19 17:07:38 +00:00
create When running pkg_add -r, check & install our dependencies for each 2009-06-19 17:07:38 +00:00
delete - Add long options to pkg_install. 2008-05-30 14:26:09 +00:00
info When running pkg_add -r, check & install our dependencies for each 2009-06-19 17:07:38 +00:00
lib When running pkg_add -r, check & install our dependencies for each 2009-06-19 17:07:38 +00:00
updating - add: Keep dependent packages too if -K is specified. 2008-06-12 15:21:13 +00:00
version - Add long options to pkg_install. 2008-05-30 14:26:09 +00:00
Makefile Style fix (use naked commands). 2008-06-16 09:15:27 +00:00
Makefile.inc Use humanize_number to report pen-sizes so people don't have to count 2008-08-07 14:48:35 +00:00
README
tkpkg

This is the pkg_install suite of tools for doing maintainance of
software "packages".  More documentation is available in the man pages
for each individual command.

This code was written by Jordan Hubbard for FreeBSD, snatched and
mildly reshaped by John Kohl in NetBSD and the changes taken back into
FreeBSD again by Jordan, who then proceeded to add another couple
of dozen features on top.  Whee! :-)