why do I need to run pkg_glob as root?
Fernan Aguero
fernan at iib.unsam.edu.ar
Fri Mar 17 21:51:32 UTC 2006
+----[ Frank Laszlo <laszlof at vonostingroup.com> (17.Mar.2006 18:40):
|
| Fernan Aguero wrote:
| > [fernan at omega] pkg_glob -R x11-toolkits/gtkmm24
| > ** You do not own /var/db/pkg. (use -f to force or run as root)
| > Command failed [exit code 1]: /usr/local/sbin/pkgdb -aFQ
| >
| > Of course I do not own /var/db/pkg ... but I can read it!
| >
| > [fernan at omega] ls -ld /var/db/pkg
| > drwxr-xr-x 483 root wheel 13824 Mar 17 17:52 /var/db/pkg
| >
| > I can even get a list of required packages for gtkmm24 just
| > by doing something like:
| > grep pkgdep /var/db/pkg/gtkmm-2.8.3_2/+CONTENTS | awk '{print $2}'
| >
| > so why can't pkg_glob?
| >
| > Fernan
| >
| >
| Hello Fernan,
Hello Frank,
| pkg_glob calls `pkgdb -aFQ` which requires 'write' access to the
| pkgdb. read the error message completely next time. :)
|
+----]
I did. I also noticed the use of pkgdb ... but my question
still remains, why is root access needed for this?
The man page for pkgdb(1) is confusing since it says (about
pkg_which) "If the database is outdated but you do not have
permission to update it, it delegates tasks to pkg_info(1)".
And also it says that "pkgdb and pkg_which are the same
command, and are equivalent".
I understand that root access (write access) is needed to
fix and/or update the package registry database. But I don't
understand why you need it to query the database.
That was what I was trying to get at. If it's a bug (I
believe so, but I was looking for other opinions), I'll
submit a PR.
Fernan
More information about the freebsd-ports
mailing list