[kde-freebsd] pkg_info confusion (and configure.kde3)

Andriy Gapon avg at icyb.net.ua
Fri Jan 16 17:48:08 CET 2009


on 16/01/2009 09:30 Garrett Cooper said the following:
> On Thu, Jan 15, 2009 at 7:08 AM, Andriy Gapon <avg at icyb.net.ua> wrote:
...
>> Thanks, but my question was:
>>> sh -c /usr/bin/tar -xp -j -f '/var/packages/All/curl-7.18.0.tbz' '+*'
>> why this command (and such for every package in /var/packages/All) was
>> spawned by pkg_info?
>> I.e. why pkg_info looks into package .tbz files instead of examining
>> /var/db/pkg?
> 
> Looks like bad logic to me. Here's where the call is coming from (mind
> you I'm referencing pkg_install from CURRENT's sources):
> 
> .../usr.sbin/pkg_install/info/perform.c:142           if
> (unpack(fname, "'+*'")) {
> .../usr.sbin/pkg_install/lib/file.c:354                      if
> (vsystem("/usr/bin/tar -xp %s -f '%s' %s", comp, pkg, flist ? flist :
> "")) {
> 
> Looking at the if-statement, it appears that the logic for the package
> finding is in fact sort of convoluted -- we should first check and see
> whether or not the package is installed, THEN if it's not installed we
> find the tarball (either from a local filesystem or a remote host),
> extract it, and grab the appropriate info.

Garrett, thanks!
I think that configure.kde3 should unset PKG_PATH (that can be set by
e.g. portupgrade) before running pkg_info:

env PKG_PATH= ${PKG_INFO}

-- 
Andriy Gapon


More information about the kde-freebsd mailing list