Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2009 18:48:08 +0200
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Garrett Cooper <yanefbsd@gmail.com>, kde@freebsd.org, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: pkg_info confusion (and configure.kde3)
Message-ID:  <4970BA48.9000402@icyb.net.ua>
In-Reply-To: <7d6fde3d0901152330p32c51b64i212c660c0aaeb04c@mail.gmail.com>
References:  <496F360E.1000508@icyb.net.ua>	 <28283d910901150529xfac5a13k6f81d199ee2f48d@mail.gmail.com>	 <496F3AB4.20202@icyb.net.ua> <20090115150602.GF50694@atarininja.org>	 <496F5151.7040703@icyb.net.ua> <7d6fde3d0901152330p32c51b64i212c660c0aaeb04c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
on 16/01/2009 09:30 Garrett Cooper said the following:
> On Thu, Jan 15, 2009 at 7:08 AM, Andriy Gapon <avg@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4970BA48.9000402>