From owner-freebsd-ports@FreeBSD.ORG Fri Jan 16 16:48:13 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C1451065692; Fri, 16 Jan 2009 16:48:13 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 832048FC16; Fri, 16 Jan 2009 16:48:12 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA05390; Fri, 16 Jan 2009 18:48:09 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4970BA48.9000402@icyb.net.ua> Date: Fri, 16 Jan 2009 18:48:08 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Garrett Cooper , kde@freebsd.org, FreeBSD Ports 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> In-Reply-To: <7d6fde3d0901152330p32c51b64i212c660c0aaeb04c@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: pkg_info confusion (and configure.kde3) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2009 16:48:14 -0000 on 16/01/2009 09:30 Garrett Cooper said the following: > On Thu, Jan 15, 2009 at 7:08 AM, Andriy Gapon 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