From owner-freebsd-ports Mon Aug 26 16:20:49 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B998437B48D for ; Mon, 26 Aug 2002 16:20:09 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A07ED43E4A for ; Mon, 26 Aug 2002 16:20:08 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7QNK8JU046323 for ; Mon, 26 Aug 2002 16:20:08 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7QNK8YO046322; Mon, 26 Aug 2002 16:20:08 -0700 (PDT) Date: Mon, 26 Aug 2002 16:20:08 -0700 (PDT) Message-Id: <200208262320.g7QNK8YO046322@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: User & <> Subject: Re: ports/42018: pkg_info with PKG_PATH searches through tarred pkgs Reply-To: User & <> Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/42018; it has been noted by GNATS. From: User & <> To: freebsd-gnats-submit@FreeBSD.org, paul@tebokkel.com Cc: Subject: Re: ports/42018: pkg_info with PKG_PATH searches through tarred pkgs Date: Tue, 27 Aug 2002 00:41:41 +0200 Well.. Decided to look further into it. Fix proposal. in pkg_install/info/perform.c, line 123 every installed pkg is looked up = on=20 disk. If a package exists with the same version, that one is used instead= of=20 the (much faster) /var/db/pkg info. My proposal: old line 123: if ((cp =3D fileFindByPath(NULL, pkg)) !=3D NULL) new line 123: if ((MatchType !=3D MATCH_ALL) && ((cp =3D fileFindByPath(= NULL,=20 pkg)) !=3D NULL)) That seems to work for my case and probably for most practical cases. How= ever,=20 someone with more experience in pkg-mgmt (I'm rather new to FreeBSD) is m= ore=20 qualified to judge about that. IMHO it would be better to switch the code-logic, i.e. first test if=20 /var/db/pkg/ exists and if not, then test for an available=20 package. That way not-installed packages get skipped, but installed ones = get=20 looked up by /var/db/pkg. That seems the final fix to me. I'm not experience enough with C to provide a diff, but if preferred, I c= an=20 always try. Paul To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message