From owner-freebsd-ports@FreeBSD.ORG Tue Apr 22 23:48:16 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4159A37B401 for ; Tue, 22 Apr 2003 23:48:16 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-67-115-75-1.dsl.lsan03.pacbell.net [67.115.75.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C75743FA3 for ; Tue, 22 Apr 2003 23:48:15 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from rot13.obsecurity.org (rot13.obsecurity.org [10.0.0.5]) by obsecurity.dyndns.org (Postfix) with ESMTP id B7A2966CFA; Tue, 22 Apr 2003 23:48:14 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id 9A01B1537; Tue, 22 Apr 2003 23:48:14 -0700 (PDT) Date: Tue, 22 Apr 2003 23:48:14 -0700 From: Kris Kennaway To: Joe Marcus Clarke Message-ID: <20030423064814.GA67622@rot13.obsecurity.org> References: <000501c3074c$e5c2be80$0a2da8c0@sem> <20030421210257.GA58574@rot13.obsecurity.org> <3EA48724.3080602@ciam.ru> <20030422001917.GA60080@rot13.obsecurity.org> <3EA53B4A.4030700@ciam.ru> <20030422193337.GA64963@rot13.obsecurity.org> <3EA5EA0D.8070500@ciam.ru> <20030423013231.GA66663@rot13.obsecurity.org> <1051065189.68327.9.camel@shumai.marcuscom.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ew6BAiZeqk4r7MaW" Content-Disposition: inline In-Reply-To: <1051065189.68327.9.camel@shumai.marcuscom.com> User-Agent: Mutt/1.4i cc: ports@freebsd.org cc: Sergey Matveychuk cc: Kris Kennaway Subject: Re: Recent bsd.port.mk changes X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2003 06:48:16 -0000 --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 22, 2003 at 10:33:09PM -0400, Joe Marcus Clarke wrote: > On Tue, 2003-04-22 at 21:32, Kris Kennaway wrote: > > On Wed, Apr 23, 2003 at 05:19:09AM +0400, Sergey Matveychuk wrote: > > > Kris Kennaway wrote: > > > >features enabled ("foo-1.2.3" vs "foo-esound-1.2.3" etc.) This is w= hy > > > >I suggested that comparing the installation prefix and pkg-plist for > > > >overlap with ports that have the same origin may be the only way to = do > > > >this reliably. > > >=20 > > > I don't know how to compare pkg-plist files? How to make decision a p= ort=20 > > > is older version and not variant of current one? It must be some=20 > > > evristic method. Some files can be moved in other place, some files c= an=20 > > > be new, some files can be moved away in new version. > > > In port's variant case path can be changed or file name can be change= d=20 > > > (libsome.so and libsome_r.so). > >=20 > > You can extract the prefix from the installed package by grepping for > > @cwd in +CONTENTS. >=20 > Or you can use pkg_info -p -q ${PKGNAME} which is what the patch I sent > you uses. >=20 > > Similarly you can extract the list of installed > > files by doing grep -v ^@ +CONTENTS. =20 >=20 > pkg_info -f -q ${PKGNAME} should provide this. OK, cool. I didn't realise these existed. > > For each package that has our > > origin (or a previous origin as looked up in the MOVED file), do the > > following: if the installed prefix =3D=3D $PREFIX and one or more of the > > installed files matches a file in pkg-plist (checked using > > e.g. comm(1)), then we are going to conflict and we should not > > install. I can't immediately think of how to implement the installed > > plist extraction without using a temporary file, but it should be > > possible with some thought. >=20 > I can try to modify the patch I sent you to do this check as well. It > already does the ${PREFIX} check. I'm getting confused by multiple patches flying around :-) It looks like yours has some technical features I had overlooked, although I wasn't sure about the need for deinstall-all after the later discussion. Could you and Sergey come up with something that handles all the problem cases we've talked about? Kris --ew6BAiZeqk4r7MaW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+pjcuWry0BWjoQKURAm4gAKDEIRG43So1hGH+J0n+nSsUXcA+XwCgwKOn l/kEYdMDI432aGmUHY+n9sM= =NDSZ -----END PGP SIGNATURE----- --ew6BAiZeqk4r7MaW--