Ports dependencies

It wouldn't be great that someone develop a way, or a port/package to solve dependencies on ports? Or there are some problems about what I talk of?
 
I wish there was a software, that gave indications of which libraries weren't being used, and a vague sense of percentages of it for ports.
 
… indications of which libraries weren't being used, …

Do you mean, ports that have no dependency?

For example: devel/got, net/gitup, …

Like, the first two are below are dependency-free, the third has a few dependencies:
  1. <https://www.freshports.org/devel/got/#dependencies>
  2. <https://www.freshports.org/net/gitup/#dependencies>
  3. <https://www.freshports.org/x11/autorandr/#dependencies>
Code:
root@mowa219-gjp4-8570p-freebsd:~ # poudriere ports -u && poudriere bulk -j main -Ctv x11/autorandr
[00:00:00] Updating portstree "default" with git+https... done
[00:00:00] Creating the reference jail... done
[00:00:04] Mounting system devices for main-default
[00:00:04] Stashing existing package repository
[00:00:04] Mounting ccache from: /var/cache/ccache
[00:00:04] Mounting ports from: /usr/local/poudriere/ports/default
[00:00:04] Mounting packages from: /usr/local/poudriere/data/packages/main-default
[00:00:04] Mounting distfiles from: /usr/ports/distfiles
[00:00:04] Copying /var/db/ports from: /usr/local/etc/poudriere.d/options
[00:00:04] Appending to make.conf: /usr/local/etc/poudriere.d/make.conf
/etc/resolv.conf -> /usr/local/poudriere/data/.m/main-default/ref/etc/resolv.conf
[00:00:04] Starting jail main-default
[00:00:04] Will build as nobody:nobody (65534:65534)
[00:00:05] Logs: /usr/local/poudriere/data/logs/bulk/main-default/2022-03-21_07h15m37s
[00:00:05] Loading MOVED for /usr/local/poudriere/data/.m/main-default/ref/usr/ports
[00:00:05] Ports supports: FLAVORS SELECTED_OPTIONS
[00:00:05] Inspecting ports tree for modifications to git checkout... yes
[00:00:07] Ports top-level git hash: 2c27922c7e (dirty)
[00:00:07] Gathering ports metadata
[00:00:07] x11/autorandr depends on devel/ccache
[00:00:07] x11/autorandr depends on devel/gmake
[00:00:07] x11/autorandr depends on devel/pkgconf
[00:00:07] x11/autorandr depends on devel/py-setuptools@py38
[00:00:07] x11/autorandr depends on lang/python38
[00:00:07] x11/autorandr depends on ports-mgmt/pkg
[00:00:07] x11/autorandr depends on textproc/gsed
[00:00:07] x11/autorandr depends on x11/libxcb
[00:00:07] x11/autorandr depends on x11/xrandr
[00:00:07] devel/pkgconf depends on devel/ccache
[00:00:07] devel/pkgconf depends on ports-mgmt/pkg
[00:00:07] devel/gmake depends on devel/ccache
[00:00:07] devel/gmake depends on devel/gettext-runtime
[00:00:07] devel/gmake depends on ports-mgmt/pkg
[00:00:07] devel/gmake depends on print/indexinfo
[00:00:07] devel/ccache depends on ports-mgmt/pkg
[00:00:07] textproc/gsed depends on devel/ccache
[00:00:07] textproc/gsed depends on devel/gettext-runtime
[00:00:07] textproc/gsed depends on devel/gettext-tools
[00:00:07] textproc/gsed depends on ports-mgmt/pkg
[00:00:07] textproc/gsed depends on print/indexinfo
[00:00:07] textproc/gsed depends on print/texinfo
[00:00:07] lang/python38 depends on devel/ccache
[00:00:07] lang/python38 depends on devel/gettext-runtime
[00:00:07] lang/python38 depends on devel/gettext-tools
[00:00:07] lang/python38 depends on devel/libffi
[00:00:07] lang/python38 depends on devel/pkgconf
[00:00:07] lang/python38 depends on devel/readline
[00:00:07] lang/python38 depends on math/mpdecimal
[00:00:07] lang/python38 depends on ports-mgmt/pkg
[00:00:07] x11/libxcb depends on devel/ccache
[00:00:07] x11/libxcb depends on devel/libpthread-stubs
[00:00:07] x11/libxcb depends on devel/pkgconf
[00:00:07] x11/xrandr depends on devel/ccache
[00:00:07] x11/libxcb depends on devel/xorg-macros
[00:00:07] x11/xrandr depends on devel/pkgconf
[00:00:07] x11/xrandr depends on devel/xorg-macros
[00:00:07] x11/libxcb depends on lang/python38
[00:00:07] x11/xrandr depends on ports-mgmt/pkg
[00:00:07] x11/libxcb depends on ports-mgmt/pkg
[00:00:07] x11/xrandr depends on x11/libX11
[00:00:07] x11/xrandr depends on x11/libXrandr
[00:00:07] x11/libxcb depends on x11/libXau
[00:00:07] x11/xrandr depends on x11/libXrender
[00:00:07] x11/libxcb depends on x11/libXdmcp
[00:00:07] x11/libxcb depends on x11/xcb-proto
[00:00:07] devel/libffi depends on devel/ccache
[00:00:07] devel/libffi depends on ports-mgmt/pkg
[00:00:07] devel/libffi depends on print/indexinfo
[00:00:07] devel/gettext-runtime depends on devel/ccache
[00:00:07] devel/gettext-runtime depends on ports-mgmt/pkg
[00:00:07] devel/gettext-runtime depends on print/indexinfo
[00:00:07] devel/gettext-tools depends on devel/ccache
[00:00:07] devel/gettext-tools depends on devel/gettext-runtime
[00:00:07] devel/gettext-tools depends on devel/libtextstyle
[00:00:07] devel/gettext-tools depends on ports-mgmt/pkg
[00:00:07] devel/gettext-tools depends on print/indexinfo
[00:00:07] devel/libpthread-stubs depends on devel/ccache
[00:00:07] devel/libpthread-stubs depends on ports-mgmt/pkg
[00:00:07] devel/readline depends on devel/ccache
[00:00:07] devel/readline depends on ports-mgmt/pkg
[00:00:07] devel/readline depends on print/indexinfo
[00:00:07] devel/xorg-macros depends on devel/ccache
[00:00:07] devel/xorg-macros depends on devel/pkgconf
[00:00:07] devel/xorg-macros depends on ports-mgmt/pkg
[00:00:07] math/mpdecimal depends on devel/ccache
[00:00:07] math/mpdecimal depends on devel/gmake
[00:00:07] math/mpdecimal depends on ports-mgmt/pkg
[00:00:07] print/indexinfo depends on devel/ccache
[00:00:07] print/indexinfo depends on ports-mgmt/pkg
[00:00:07] x11/libX11 depends on devel/ccache
[00:00:07] x11/libX11 depends on devel/pkgconf
[00:00:07] x11/libX11 depends on devel/xorg-macros
[00:00:07] x11/libX11 depends on ports-mgmt/pkg
[00:00:07] x11/libX11 depends on x11/libxcb
[00:00:07] x11/libX11 depends on x11/xorgproto
[00:00:07] x11/libX11 depends on x11/xtrans
[00:00:07] print/texinfo depends on converters/p5-Text-Unidecode
[00:00:07] print/texinfo depends on devel/ccache
[00:00:07] print/texinfo depends on devel/gettext-runtime
[00:00:07] print/texinfo depends on devel/gettext-tools
[00:00:07] print/texinfo depends on devel/gmake
[00:00:07] print/texinfo depends on devel/p5-Locale-libintl
[00:00:07] print/texinfo depends on lang/perl5.32
[00:00:07] x11/libXau depends on devel/ccache
[00:00:07] x11/libXau depends on devel/pkgconf
[00:00:07] x11/libXau depends on devel/xorg-macros
[00:00:07] print/texinfo depends on misc/help2man
[00:00:07] x11/libXau depends on ports-mgmt/pkg
[00:00:07] print/texinfo depends on ports-mgmt/pkg
[00:00:07] print/texinfo depends on print/indexinfo
[00:00:07] x11/libXau depends on x11/xorgproto
[00:00:07] print/texinfo depends on textproc/p5-Unicode-EastAsianWidth
[00:00:07] x11/libXdmcp depends on devel/ccache
[00:00:07] x11/libXdmcp depends on devel/pkgconf
[00:00:07] x11/libXdmcp depends on devel/xorg-macros
[00:00:07] x11/libXdmcp depends on ports-mgmt/pkg
[00:00:07] x11/libXdmcp depends on x11/xorgproto
[00:00:07] x11/libXrender depends on devel/ccache
[00:00:07] x11/libXrender depends on devel/pkgconf
[00:00:07] x11/libXrender depends on devel/xorg-macros
[00:00:07] x11/libXrender depends on ports-mgmt/pkg
[00:00:07] x11/libXrender depends on x11/libX11
[00:00:07] x11/libXrender depends on x11/xorgproto
[00:00:07] x11/libXrandr depends on devel/ccache
[00:00:07] x11/libXrandr depends on devel/pkgconf
[00:00:07] x11/libXrandr depends on devel/xorg-macros
[00:00:07] x11/libXrandr depends on ports-mgmt/pkg
[00:00:07] x11/libXrandr depends on x11/libX11
[00:00:07] x11/libXrandr depends on x11/libXext
[00:00:07] x11/libXrandr depends on x11/libXrender
[00:00:07] x11/libXrandr depends on x11/xorgproto
[00:00:07] x11/xcb-proto depends on devel/ccache
[00:00:07] x11/xcb-proto depends on devel/pkgconf
[00:00:07] x11/xcb-proto depends on devel/xorg-macros
[00:00:07] x11/xcb-proto depends on lang/python38
[00:00:07] x11/xcb-proto depends on ports-mgmt/pkg
[00:00:07] x11/xcb-proto depends on textproc/libxml2
[00:00:07] converters/p5-Text-Unidecode depends on devel/ccache
[00:00:07] converters/p5-Text-Unidecode depends on lang/perl5.32
[00:00:07] converters/p5-Text-Unidecode depends on ports-mgmt/pkg
[00:00:07] devel/libtextstyle depends on devel/ccache
[00:00:07] devel/libtextstyle depends on ports-mgmt/pkg
[00:00:07] devel/libtextstyle depends on print/indexinfo
[00:00:07] devel/p5-Locale-libintl depends on converters/libiconv
[00:00:07] devel/p5-Locale-libintl depends on devel/ccache
[00:00:07] devel/p5-Locale-libintl depends on devel/gettext-runtime
[00:00:07] devel/p5-Locale-libintl depends on devel/gettext-tools
[00:00:07] devel/p5-Locale-libintl depends on lang/perl5.32
[00:00:07] devel/p5-Locale-libintl depends on ports-mgmt/pkg
[00:00:07] misc/help2man depends on devel/ccache
[00:00:07] misc/help2man depends on devel/gettext-runtime
[00:00:07] misc/help2man depends on devel/gettext-tools
[00:00:07] misc/help2man depends on devel/gmake
[00:00:07] misc/help2man depends on devel/p5-Locale-gettext
[00:00:07] misc/help2man depends on lang/perl5.32
[00:00:07] misc/help2man depends on ports-mgmt/pkg
[00:00:07] misc/help2man depends on print/indexinfo
[00:00:07] lang/perl5.32 depends on devel/ccache
[00:00:07] lang/perl5.32 depends on ports-mgmt/pkg
[00:00:07] textproc/libxml2 depends on devel/ccache
[00:00:07] textproc/libxml2 depends on devel/pkgconf
[00:00:07] textproc/libxml2 depends on ports-mgmt/pkg
[00:00:07] textproc/p5-Unicode-EastAsianWidth depends on devel/ccache
[00:00:07] textproc/p5-Unicode-EastAsianWidth depends on lang/perl5.32
[00:00:07] textproc/p5-Unicode-EastAsianWidth depends on ports-mgmt/pkg
[00:00:07] x11/xorgproto depends on devel/ccache
[00:00:07] x11/xorgproto depends on devel/pkgconf
[00:00:07] x11/xorgproto depends on devel/xorg-macros
[00:00:07] x11/xorgproto depends on ports-mgmt/pkg
[00:00:07] x11/libXext depends on devel/ccache
[00:00:07] x11/libXext depends on devel/pkgconf
[00:00:07] x11/libXext depends on devel/xorg-macros
[00:00:07] x11/libXext depends on ports-mgmt/pkg
[00:00:07] x11/libXext depends on x11/libX11
[00:00:07] x11/libXext depends on x11/libXau
[00:00:07] x11/libXext depends on x11/xorgproto
[00:00:07] x11/xtrans depends on devel/ccache
[00:00:07] x11/xtrans depends on devel/pkgconf
[00:00:07] x11/xtrans depends on devel/xorg-macros
[00:00:07] x11/xtrans depends on ports-mgmt/pkg
[00:00:07] devel/p5-Locale-gettext depends on devel/ccache
[00:00:07] devel/p5-Locale-gettext depends on devel/gettext-runtime
[00:00:07] devel/p5-Locale-gettext depends on devel/gettext-tools
[00:00:07] devel/p5-Locale-gettext depends on lang/perl5.32
[00:00:07] devel/p5-Locale-gettext depends on ports-mgmt/pkg
[00:00:07] converters/libiconv depends on devel/ccache
[00:00:07] converters/libiconv depends on ports-mgmt/pkg
[00:00:07] devel/py-setuptools depends on devel/ccache
[00:00:07] devel/py-setuptools depends on lang/python38
[00:00:07] devel/py-setuptools depends on ports-mgmt/pkg
[00:00:07] Calculating ports order and dependencies
[00:00:07] -C specified, cleaning listed packages
[00:00:07] (-C) Flushing package deletions
[00:00:08] Trimming IGNORED and blacklisted ports
[00:00:08] Package fetch: Looking for missing packages to fetch from pkg+http://pkg.FreeBSD.org/${ABI}/latest
Updating FreeBSD repository catalogue...
[main-default] Fetching meta.conf: 100%    163 B   0.2kB/s    00:01   
[main-default] Fetching packagesite.pkg: 100%    6 MiB   6.7MB/s    00:01   
Processing entries: 100%
FreeBSD repository update completed. 31146 packages processed.
All repositories are up to date.
[00:00:19] Package fetch: Will fetch gsed-4.8
[00:00:19] Package fetch: Will fetch python38-3.8.12_2
[00:00:19] Package fetch: Will fetch libxcb-1.14_1
[00:00:19] Package fetch: Will fetch pkgconf-1.8.0,1
[00:00:19] Package fetch: Will fetch libffi-3.3_1
[00:00:19] Package fetch: Will fetch xrandr-1.5.1
[00:00:19] Package fetch: Will fetch libpthread-stubs-0.4
[00:00:19] Package fetch: Will fetch readline-8.1.2
[00:00:19] Package fetch: Will fetch libX11-1.7.2,1
[00:00:19] Package fetch: Will fetch mpdecimal-2.5.1
[00:00:19] Package fetch: Will fetch xorg-macros-1.19.3
[00:00:19] Package fetch: Will fetch libXdmcp-1.1.3
[00:00:19] Package fetch: Will fetch libXrender-0.9.10_2
[00:00:19] Package fetch: Will fetch libXau-1.0.9
[00:00:19] Package fetch: Will fetch libXrandr-1.5.2
[00:00:20] Package fetch: Will fetch libxml2-2.9.12
[00:00:20] Package fetch: Will fetch xcb-proto-1.14.1
[00:00:20] Package fetch: Will fetch xorgproto-2021.5
[00:00:20] Package fetch: Will fetch libXext-1.3.4,1
[00:00:20] Package fetch: Will fetch xtrans-1.4.0
[00:00:20] Package fetch: Will fetch py38-setuptools-57.0.0
[00:00:20] Package fetch: Will fetch 21 packages from remote or local pkg cache

No packages are required to be fetched.
Integrity check was successful.
[00:00:20] Package fetch: Using cached copy of gsed-4.8
[00:00:20] Package fetch: Using cached copy of python38-3.8.12_2
[00:00:20] Package fetch: Using cached copy of libxcb-1.14_1
[00:00:20] Package fetch: Using cached copy of pkgconf-1.8.0,1
[00:00:20] Package fetch: Using cached copy of libffi-3.3_1
[00:00:20] Package fetch: Using cached copy of xrandr-1.5.1
[00:00:20] Package fetch: Using cached copy of libpthread-stubs-0.4
[00:00:20] Package fetch: Using cached copy of readline-8.1.2
[00:00:20] Package fetch: Using cached copy of libX11-1.7.2,1
[00:00:20] Package fetch: Using cached copy of mpdecimal-2.5.1
[00:00:20] Package fetch: Using cached copy of xorg-macros-1.19.3
[00:00:20] Package fetch: Using cached copy of libXdmcp-1.1.3
[00:00:20] Package fetch: Using cached copy of libXrender-0.9.10_2
[00:00:20] Package fetch: Using cached copy of libXau-1.0.9
[00:00:20] Package fetch: Using cached copy of libXrandr-1.5.2
[00:00:20] Package fetch: Using cached copy of libxml2-2.9.12
[00:00:20] Package fetch: Using cached copy of xcb-proto-1.14.1
[00:00:20] Package fetch: Using cached copy of xorgproto-2021.5
[00:00:20] Package fetch: Using cached copy of libXext-1.3.4,1
[00:00:20] Package fetch: Using cached copy of xtrans-1.4.0
[00:00:20] Package fetch: Using cached copy of py38-setuptools-57.0.0
[00:00:20] Sanity checking the repository
[00:00:20] Checking for stale cache files
[00:00:20] Checking packages for incremental rebuild needs
[00:00:20] Checking packages for missing dependencies
[00:00:20] Deleting stale symlinks... done
[00:00:20] Deleting empty directories... done
[00:00:20] Package fetch: Generating logs for fetched packages
[00:00:35] Unqueueing existing packages
[00:00:35] Unqueueing orphaned build dependencies
[00:00:35] Sanity checking build queue
[00:00:35] Processing PRIORITY_BOOST
[00:00:35] Balancing pool
[main-default] [2022-03-21_07h15m37s] [balancing_pool:] Queued: 22 Built: 0  Failed: 0  Skipped: 0  Ignored: 0  Fetched: 21 Tobuild: 1   Time: 00:00:31
[00:00:35] Recording filesystem state for prepkg... done
[00:00:44] Building 1 packages using up to 1 builders
[00:00:44] Hit CTRL+t at any time to see build progress and stats
[00:00:44] [01] [00:00:00] Builder starting
[00:00:45] [01] [00:00:01] Builder started
[00:00:45] [01] [00:00:00] Building x11/autorandr@py38 | autorandr-1.12.1
[00:00:45] [01] [00:00:00] Status   x11/autorandr@py38 | autorandr-1.12.1: check-sanity
[00:00:45] [01] [00:00:00] Status   x11/autorandr@py38 | autorandr-1.12.1: pkg-depends
[00:00:47] [01] [00:00:02] Status   x11/autorandr@py38 | autorandr-1.12.1: fetch-depends
[00:00:47] [01] [00:00:02] Status   x11/autorandr@py38 | autorandr-1.12.1: fetch
[00:00:48] [01] [00:00:03] Status   x11/autorandr@py38 | autorandr-1.12.1: checksum
[00:00:48] [01] [00:00:03] Status   x11/autorandr@py38 | autorandr-1.12.1: extract-depends
[00:00:48] [01] [00:00:03] Status   x11/autorandr@py38 | autorandr-1.12.1: extract
[00:00:48] [01] [00:00:03] Status   x11/autorandr@py38 | autorandr-1.12.1: patch-depends
[00:00:48] [01] [00:00:03] Status   x11/autorandr@py38 | autorandr-1.12.1: patch
[00:00:48] [01] [00:00:03] Status   x11/autorandr@py38 | autorandr-1.12.1: build-depends
[00:00:53] [01] [00:00:08] Status   x11/autorandr@py38 | autorandr-1.12.1: lib-depends
[00:00:53] [01] [00:00:08] Status   x11/autorandr@py38 | autorandr-1.12.1: configure
[00:00:54] [01] [00:00:09] Status   x11/autorandr@py38 | autorandr-1.12.1: build
[00:01:02] [01] [00:00:17] Status   x11/autorandr@py38 | autorandr-1.12.1: run-depends
[00:01:03] [01] [00:00:18] Status   x11/autorandr@py38 | autorandr-1.12.1: stage
[00:01:04] [01] [00:00:19] Status   x11/autorandr@py38 | autorandr-1.12.1: package
[00:01:05] [01] [00:00:20] Status   x11/autorandr@py38 | autorandr-1.12.1: install
[00:01:06] [01] [00:00:21] Status   x11/autorandr@py38 | autorandr-1.12.1: deinstall
[00:01:06] [01] [00:00:21] Finished x11/autorandr@py38 | autorandr-1.12.1: Success
[00:01:07] Stopping 1 builders
main-default-job-01: removed
main-default-job-01-n: removed
[00:01:08] Creating pkg repository
Creating repository in /tmp/packages: 100%
Packing files for repository: 100%
[00:01:12] Committing packages to repository: /usr/local/poudriere/data/packages/main-default/.real_1647847008 via .latest symlink
[00:01:12] Removing old packages
[00:01:12] Built ports: x11/autorandr@py38
[00:01:12] Fetched ports: lang/python38 textproc/gsed x11/libxcb x11/xrandr devel/libffi devel/readline devel/libpthread-stubs devel/pkgconf x11/libX11 math/mpdecimal x11/libXdmcp x11/libXrender x11/libXau x11/libXrandr textproc/libxml2 x11/xcb-proto x11/xorgproto x11/xtrans x11/libXext devel/xorg-macros devel/py-setuptools@py38
[main-default] [2022-03-21_07h15m37s] [committing:] Queued: 22 Built: 1  Failed: 0  Skipped: 0  Ignored: 0  Fetched: 21 Tobuild: 0   Time: 00:01:07
[00:01:12] Logs: /usr/local/poudriere/data/logs/bulk/main-default/2022-03-21_07h15m37s
[00:01:12] Cleaning up
main-default: removed
main-default-n: removed
[00:01:12] Unmounting file systems
root@mowa219-gjp4-8570p-freebsd:~ # pkg install x11/autorandr
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01   
Fetching packagesite.pkg: 100%   15 KiB  15.4kB/s    00:01   
Processing entries: 100%
The provides database is up-to-date.
poudriere repository update completed. 52 packages processed.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        autorandr: 1.12.1 [poudriere]

Number of packages to be installed: 1

Proceed with this action? [y/N]: y
[1/1] Installing autorandr-1.12.1...
[1/1] Extracting autorandr-1.12.1: 100%
root@mowa219-gjp4-8570p-freebsd:~ #
 
I didn't have my thought refined.

For basics, a program that looks through the sourcecode of a program, and lists which file dependency file names are asked for, both mandatory and optional. The package is needed, but the focus would be on files/library names themselves, than that. This would go a long way, even if this is as far as it goes.

What I wrote in the previous entry would be more difficult. Maybe taking the statistics of installed ports on any computer or of the entire portstree, and including rough percentages of how much their headers and libraries are used. This one could be difficult, maybe not as intensive as compiling, but so much is taken for compiling anyway. This one is like some fantasy idea, which would have abstract implementations and could be far from perfect in practice.
 
I've been playing with graph databases, like neo4j. The ports tree and dependency chains appear to be ideal to put in a graph DB. That should result in an interesting model to work with. I can remember somebody made tool that used similar graph theory to string all the ports together, but I can't remember the tool or who made it.
 
solve dependencies on ports
What do you mean? When you build a port, dependencies will be built automatically if not already installed.
If you prefer to install dependencies from pkg rather then build them you can use make install-missing-packages before running make.
 
Oh well. Just in case you wonder why I asked this... While I install from ports, I cannot install the desired program from once time. The logs shows that I need to port manually to another program, install those, the whole, and then install the program I wanted. Just that. Obviously pkg does it very fine, but, what if it happens in ports?
 
Thanks, but that shows you just the immediate dependencies. I'd like to see all the transitive dependencies up to the non-automatic package that pulls in packagename.
That's the main idea why I thought about putting the ports tree in a graph database. You could click on any port and it would, visually, show you the whole dependency chain. Both forwards and backwards. I also wanted to add the OPTIONS in it too. So if you enabled/disabled an option you could see how that would cascade up and down the chain. It could also help identifying conflicting options, or those dreaded dependency loops.
 
One that has an option to show only common dependencies of 2 or more of the asked for programs, and leaves out other dependencies.

If you've seen libcanberra with portgraph, the image won't even fit on my over 30” TV in a viewable size, or I need a magnifying glass if it all fits on my screen.
 
If one looks at Makefiles for a port, you often seen different types of dependencies. Buildtime and runtime come immediately to mind. Looking at source code doesn't always pick them all up (X depends on Y, Y depends on Z, looking at source code you see dependency on Y but not on Z), then when you look at a port that has different config options leading to different dependencies, the problem becomes even more "interesting".

Also, is the starting point a package that is installed or just built or just the source code? Big difference in how you get your information.
 
The dependency of the next dependency will pick up that dependency by looking at the source code of those combined, especially for those which aren't optional.
 
The dependency of the next dependency will pick up that dependency by looking at the source code of those combined, especially for those which aren't optional.
But only if the source code of that dependency is installed, no?

That's why I asked "what is the starting point".
In theory, any specific port has it's dependencies correctly defined, so looking at a port source tree, for any given port, dependencies should be defined in Makefiles (I'm ignoring things like standard libraries for gcc/c++/etc).
But a binary package may have been built with non default ports so if you are looking at the binary package you need to walk all the binaries.

Two different use cases:
"I want to install a port from source, using a specific configuration which may be default" and
"I want to install a prebuilt binary package from an existing repo which was built with a configuration"

The dependency tree for these two use cases may be the same or may be be different and different tools are used to make that tree.
 
If it downloads the compressed sourcecode files like make fetch-recursive does except as it finds the call for them in source code. Additional ones can be for required ports, but also for optional ones. It would be intensive, but not as much as compiling.

Going further than the sourcecode of 1 port may need a combination of knowing which packages have the neededfiles. It would have to rely on the package names listed in Makefile's, though to check the sourcecode for certainty of the filenames, not ports.
 
That's the main idea why I thought about putting the ports tree in a graph database. You could click on any port and it would, visually, show you the whole dependency chain. Both forwards and backwards. I also wanted to add the OPTIONS in it too. So if you enabled/disabled an option you could see how that would cascade up and down the chain. It could also help identifying conflicting options, or those dreaded dependency loops.
bsduck 's answer makes me think a lot of this information might already be in the pkg(8) database.
 
the problem is that you mix use ports or use the ready binary, good or something or another, in relation to the library the version you are compiling may be the most recent, and there may be some problems if you are compiling a newer version of a port of a software that is a common gtk library

and for example you have a stable version of gtk, and you want to update only that you have some libraries that depend on each other, on a version and that would definitely break your door.

what you have to do before I come to ask a question and study well, how should I ask a technical question, and that some of the FreeBSD engineers, can understand, and give me an answer that is technical and evaluative.

well I have different custom, since I develop for NetBSD. and I know how ABI system libraries work, elements that depend on a library, be it a library that has a wide dependency, may have possible problems, with others, there we have a serious problem
 
I've been playing with graph databases, like neo4j. The ports tree and dependency chains appear to be ideal to put in a graph DB. That should result in an interesting model to work with. I can remember somebody made tool that used similar graph theory to string all the ports together, but I can't remember the tool or who made it.
and graph theory is an efficient way to some extent. please tell me what is your experience with graphs
 
Portgraph depends on what you set the configuration options to, no matter if it's from ports or packages. Packages probably sets them, then, they can be set again through ports, no matter what's installed on the system. Portgraph will show dependencies of the current set options on the ports, regardless of what the options of the installed package are, or even if they're not installed. It will show, based on what was last set in make config no matter what's installed or not installed.
 
Back
Top