Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Aug 2019 16:02:57 +0200
From:      "Martin Jakob" <m.jakob@gmx.net>
To:        freebsd-pkgbase@freebsd.org
Subject:   Unset dependencies in some pkgbase packages
Message-ID:  <trinity-be3dce2d-be7d-463e-8033-4d93ed4903bd-1564927377343@3c-app-gmx-bs43>

next in thread | raw e-mail | index | archive | help
I am trying to visualize the dependencies of the pkgbase packages.
To produce the dot file for use with graphviz i used a shell script grepin=
g
and seding the ucl files in the worldstage directory (see below). After so=
me
fiddling i got a dot file graphviz could work with.

You can create one by your self running the script and using the resulting
output in a online graphviz tool like http://www.webgraphviz.com/ or
https://stamm-wilbrandt.de/GraphvizFiddle/#

I will describe some ascpects of the resulting diagramm.

- the biggest node is the runtime package, a lot of packages depend on it.

- runtime itself depends only on the clibs package.

- clibs has dependent packages:
  clibs-debug, clibs-development, clibs-lib32, clibs-lib32-debug,
  clibs-lib32-development, clibs-lib32-profile, clibs-profile

- some packages depend on runtime, as mentioned, and have some
  dependent packages, e.g
  -> ssh depends on runtime
  -> these packages depend on the ssh packages:
     ssh-debug, ssh-development, ssh-lib32, ssh-lib32-debug,
	 ssh-lib32-development, ssh-lib32-profile, ssh-profile

- there are other packages which depend on runtime, but the "subpackages"
  do not depend on the package itself, e.g
  -> jail depends on runtime
  -> these packages depend also on runtime instead of jail:
     jail-debug, jail-development, jail-lib32, jail-lib32-debug,
     jail-lib32-development

- there are a LOT of packages which are standalone in the diagramm, e.g
  sendmail, the dependent packages sendmail-debug, sendmail-development,
  sendmail-lib32, sendmail-lib32-debug, sendmail-lib32-development,
  sendmail-lib32-profile, sendmail-profile are standalone as well.

- there is a mixture of the above, for example the runtime has dependent
  packages as mentioned above and these standalone packages:
  runtime-lib32-debug, runtime-lib32-development, runtime-lib32-profile


as far as i can see, the dependencies are defined in the script
/usr/src/release/packages/generate-ucl.sh. In there, some names are
hardcoded, like "runtime", "runtime_*", "jail_*". Others are handled as
wildcards, like "*_lib32", "*_lib32_development", "*_lib32_debug", ...
which often do not depend on their "root" package. While the "named"
packages have their own ucl file, these wildcard packages are using
the template.ucl file, which does not contain the "deps:" attribute.


Script to create the graphviz dot file:
=2D--8<---8<---8<---8<---8<---8<---8<---8<---8<

#!/bin/sh

echo "digraph pkgdeps {"
echo "    graph [center=3D0 rankdir=3DTD ];"

(
    for PKG in /usr/obj/usr/src/amd64.amd64/worldstage/*.ucl
    {
        PKG_NAME=3D${PKG##*/}
        PKG_DEPS=3D$(grep -h -A 1 deps ${PKG} | tail -n 1 | sed -e 's/^[ \=
t]*//' -e 's/FreeBSD-//g' -e 's/"//g' -e 's/: {//g')
        if [ ! ${PKG_DEPS} =3D "" ]; then
            echo "    \"${PKG_NAME%.ucl}\" -> \"${PKG_DEPS}\";"
        else
            echo "    \"${PKG_NAME%.ucl}\";"
        fi
    }
) | sort

echo "}"

=2D-->8--->8--->8--->8--->8--->8--->8--->8--->8


=2D-
Martin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-be3dce2d-be7d-463e-8033-4d93ed4903bd-1564927377343>