Check for all port dependencies

And if you mean "which port depends on which ports", either run pkg_info -rR <portglob> for an installed port, or run make build-depends-list && make run-depends-list in a port directory under /usr/ports.

Finally: if you wonder which dependencies you still need to install for a port, run make missing in a port directory under /usr/ports.
 
Last edited:
DutchDaemon said:
And if you mean "which port depends on which ports", either run [cmd=]pkg_info -rR <portglob>[/cmd] for an installed port, or run [cmd=]make build-depends-list && make run-depends-list[/cmd] in a port directory under /usr/ports.

and $ make all-depends-list will list all the dependencies, including grandchildren and so on going down the tree
 
Thx, but howto check for all already installed, dependent packages from a port?
 
simple solution
Code:
$ portmaster --show-work x11-wm/fvwm2-devel
it will show all dependancies that are not installed and that will be installed, if you run portmaster without --show-work, it'll also show which dependencies will be updated ;)

Note, might not be the best solution, since it doesn't check if all packages have all files, maybe some files were deleted etc.....
 
does FreeBSD have a archlinux equivalent of

PHP:
  #pacman -Ql package

- this will query the package database and List all files owned by a given package.

eg:
Code:
root@myhost ~#pacman -Ql mlocate
mlocate /etc/
mlocate /etc/cron.daily/
mlocate /etc/cron.daily/updatedb
mlocate /etc/updatedb.conf
mlocate /usr/
mlocate /usr/bin/
mlocate /usr/bin/locate
mlocate /usr/bin/slocate
mlocate /usr/bin/updatedb
mlocate /usr/share/
mlocate /usr/share/locale/
mlocate /usr/share/locale/ast/
.....
 
Also, the pkg-plist in the /port/ can be useful. One
can for example, grep it ...
Code:
grep bin /usr/ports/security/sudosh/pkg-plist
 
Last edited by a moderator:
Is there a way to see the reverse of make build-depends-list && make run-depends-list?

For example, I want to remove linux_base-f10-10_9. I want to know if any of the other ports depend on it.

For example, what will break once I delete linux_base-f10-10_9?
 
Is there a way to see the reverse of make build-depends-list && make run-depends-list?

For example, I want to remove linux_base-f10-10_9. I want to know if any of the other ports depend on it.

For example, what will break once I delete linux_base-f10-10_9?

It's not easy to figure out which ports are going to depend on a particular port until the ports get built and installed. The cross-reference information that would be needed just isn't there in the ports tree in any kind of pre-computed way, it would have to be done by searching the whole ports tree for references to the particular port by running make all-depends-list or make run-depends-list on every port except the one that is being examined.

Edit: The dependency information is available in INDEX-* files so they can be used to speed up the process.
 
Is there a way to see the reverse of make build-depends-list && make run-depends-list?

For example, I want to remove linux_base-f10-10_9. I want to know if any of the other ports depend on it.

For example, what will break once I delete linux_base-f10-10_9?
I know it's been a while, but I've come across a similar question. Actually a simple script can help to deal with that:
Code:
#!/usr/local/bin/bash
pkg info -ao | awk '{ print $2 }' |
while read line
do
cd /usr/ports/$line
if [ -n "$(make run-depends-list | grep linux_base-f10)" ]; then
  echo "$line depends on linux_base-f10"
fi
done
Since all run dependencies, unlike build dependencies, are kept in place and are found among the installed packages, there must be no problem about it.
 
Since the script only checks installed ports you might as well use pkg info -r linux_base-f10

pkg-info(8):
Code:
     -r, --required-by
             Display the list of packages which require pkg-name.
 
Yea, so it says. But I was a bit mistrusting it after it failed to show me why certain packages were persistently rebuilt (by portmaster) after removal, while "no installed package needed them" according to the pkg -r ... output.
 
Yea, so it says. But I was a bit mistrusting it after it failed to show me why certain packages were persistently rebuilt (by portmaster) after removal, while "no installed package needed them" according to the pkg -r ... output.
Probably because another rebuilt port needs them to build. pkg will only show runtime dependencies, which is enough for binary packages.
 
Yes, exactly. It shows runtime and library dependencies. Not the build dependencies (which aren't needed for a package).
 
Your script only shows run dependencies (run-depends-list).
 
In this case it probably won't matter, as far as I know emulators/linux_base-f10 is never a build or library dependency. It's only a run dependency. But I haven't checked all 25.000+ ports ;)
 
Back
Top