Skip to main content.

2002-Sep-20

I was trying to use pkg_info's -F switch, but couldn't get it to work. I found out that you need to use full path, like:
pkg_info -F /usr/pkg/sbin/useradd
Then it will show the information (comment, description and homepage) about the package it belongs too. If you use -e switch, it has to be after the -F or it won't return anything. Example usage:
$ pkg_info -F -e /usr/pkg/etc/mailcap
mm-2.7

I was hoping for a tool to behave like: "grep mailcap /var/db/pkg/*/+CONTENTS".

"pkg_admin dump | grep mailcap" is faster (1.2 seconds versus 4.6 seconds), but it doesn't show as much. For example, "pkg_admin dump | grep useradd" doesn't show anything. Maybe it needs to be rebuilt.

On a different subject (of trying to build a dependencies database), "make show-depends-dirs" under a pkgsrc package directory will show a list of the dependencies (including build) needed for that package. I temporarily patched mk/bsd.pkg.mk so it didn't show build dependencies. For example:

rainier:/usr/pkgsrc/misc/koffice$ make show-depends-dirs
x11/kdebase2 x11/kdelibs2 audio/libaudiofile devel/pcre security/openssl
x11/qt2-libs graphics/MesaLib graphics/glu graphics/glut graphics/jpeg
graphics/mng graphics/lcms graphics/png
Or with the BUILD_DEPENDS also shown:
rainier:/usr/pkgsrc/misc/koffice$ make show-depends-dirs
x11/kdebase2 x11/kdelibs2 audio/libaudiofile devel/pcre security/openssl
x11/qt2-libs graphics/MesaLib graphics/glu graphics/glut graphics/jpeg
graphics/mng graphics/lcms graphics/png x11/qt2-designer-kde
pkgtools/x11-links devel/gmake devel/libtool-base

This doesn't recurse though. To recurse use show-all-depends-dirs target.

pkg_info -n package (or package.tgz file) also shows the complete dependencies with additional version information.

By the way, I disconnected a serial slip connection for a couple days, and rebooted one computer in the connection. And then next time, I reconnected the serial, powered it up, and did the slattach and ifconfig on it, it connected fine to already running slip on other end.