Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 16:20:10 -0700 (PDT)
From:      Paul te Bokkel <Paul@tebokkel.com>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/42018: pkg_info with PKG_PATH searches through tarred pkgs
Message-ID:  <200208262320.g7QNKA5E046329@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/42018; it has been noted by GNATS.

From: Paul te Bokkel <Paul@tebokkel.com>
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 01:19:54 +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/<pkgname+ver> 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




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