Date: Tue, 22 Apr 2003 18:32:31 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Sergey Matveychuk <sem@ciam.ru> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Recent bsd.port.mk changes Message-ID: <20030423013231.GA66663@rot13.obsecurity.org> In-Reply-To: <3EA5EA0D.8070500@ciam.ru> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 why > >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 port= =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 can= =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 changed=20 > (libsome.so and libsome_r.so). You can extract the prefix from the installed package by grepping for @cwd in +CONTENTS. Similarly you can extract the list of installed files by doing grep -v ^@ +CONTENTS. 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. Kris --SUOF0GtieIMvvwua Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+pe0uWry0BWjoQKURAsycAJ0ekbCLjzgi4/dAn0A9pjOkuOp0uACg6DFN iKu4HleHwqsS898P6gQnFB8= =mgMl -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030423013231.GA66663>