tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Detecting pkgsrc install (ocsinventory-agent)



On Sat, May 21, 2011 at 06:03:55PM +0100, David Brownlee wrote:
> net/ocsinventory-agent provides system inventories, including
> installed packages. The various backends tag installed packages as
> coming from 'deb', 'rpm', 'ByHand' or, for the output from pkg_info
> ''. It would be nice to be able to identify pkgsrc from other pkg_info
> commands, potentially by running a specific pkg_admin or other
> command.
> 
> The specific use case is on a RedHat ES server where pkgsrc is used to
> provide up to date perl and other packages without impacting the base
> RPM installs.
> 
> So, does anyone how of a simple command option to differentiate
> installed pkgsrc tools from Open or FreeBSD tools, or would it make
> sense to provide one? Note, I do not want to use OS as pkgsrc is
> multiplatform, and would prefer to avoid checking for /usr/pkg as
> admins can reasonably alter that

random thoughts, may or may not be useful:

        pkg_info -V

        test -e ${PKG_DBDIR}/pkgdb.byfile.db

        test -d ${PKG_DBDIR}/../pkg.refcount

        test -d ${PKG_DBDIR}/digest-*

        test -e ${PKG_DBDIR}/digest-*/+SIZE_ALL

        test -e ${PKG_DBDIR}/digest-*/+BUILD_INFO

        test -e ${PKG_DBDIR}/digest-*/+BUILD_VERSION

best,
alistair


Home | Main Index | Thread Index | Old Index