From owner-freebsd-ports@FreeBSD.ORG Mon Apr 21 14:03:00 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 0E4F137B401; Mon, 21 Apr 2003 14:02:59 -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 E0E2243FB1; Mon, 21 Apr 2003 14:02:58 -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 F30D566CFB; Mon, 21 Apr 2003 14:02:57 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id D32691531; Mon, 21 Apr 2003 14:02:57 -0700 (PDT) Date: Mon, 21 Apr 2003 14:02:57 -0700 From: Kris Kennaway To: Sergey Matveychuk Message-ID: <20030421210257.GA58574@rot13.obsecurity.org> References: <000501c3074c$e5c2be80$0a2da8c0@sem> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline In-Reply-To: <000501c3074c$e5c2be80$0a2da8c0@sem> User-Agent: Mutt/1.4i cc: ports@freebsd.org cc: marcus@FreeBSD.org cc: kris@obsecurity.org 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: Mon, 21 Apr 2003 21:03:00 -0000 --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 20, 2003 at 06:55:32PM +0400, Sergey Matveychuk wrote: > Joe Marcus Clarke wrote: > > On Fri, 2003-04-18 at 00:57, Kris Kennaway wrote: > > > In your case since the PREFIX is different they don't actually > > > conflict so one might argue that it should be allowed. I suppose > > > that's something that could be checked in bsd.port.mk by extracting > > > the prefix for the existing package from the contents file and > > > comparing to PREFIX. >=20 > Disagree. This case really dangerous for users. What happened if you try > install a port with other PREFIX than already installed port with the same > version? You'll lose port information in PKG_DBDIR. And when you'll > deinstall new installed port you'll have got orphan files. > That is user must understand the dangerous and use FORCE_PKG_REGISTER=3Dy= es > for his responsibility. Yes, that's a good point (I raised it in my original email). Perhaps the real solution for Joe is to set PKG_DBDIR when he is doing test installs in another prefix, so the registration cannot possibly conflict with real packages. However, there are other cases that are broken (pointed out by knu): If you compile e.g. python modules against multiple versions of python, they will have different package names and install in different places (so the packages do not conflict at all), but the same origin. The new check will not allow the user to do this. Another case that is broken is when a port is built with different options from the same directory. For example, ruby_r-qt2 and ruby-qt2 have a common origin but are different and should be allowed to coexist. This kills the build of ruby_r-qt2gl: http://bento.freebsd.org/errorlogs/i386-4-latest/ruby_r-qt2gl-0.14_1.log We should think about how to fix this so it is allowed. Perhaps the key is to compare the pkg-plist for the ports with the same origin to see if any files conflict. There also appears to be a bug that is performing substring matches on existing packages, somehow. http://bento.freebsd.org/errorlogs/i386-4-latest/kde-i18n-3.1.1.log kde-i18n-3.1.1 is not installed, but a lot of *-kde-i18n-3.1.1 ports are, and the build fails with =3D=3D=3D> kde-i18n-3.1.1 is already installed - perhaps an older version? > > This would be acceptable. However, the make deinstall would still > > remove both versions. What about keeping make deinstall the same as it > > was with one exception: if you type make deinstall in a port directory, > > and the version specified by that port's Makefile is not installed (but > > another version with the same origin is), then the other version would > > be deinstalled. However, if a package is found that matches the version > > specified in the port's Makefile, then only that version is removed. We >=20 > Sounds good. >=20 > > could then add a make deinstall-all target to handle deinstalling all > > packages with the same origin. Something like what's attached. >=20 > Kris, what do you think about this new target? I don't see necessity of i= t. > I'd like to test this patch properly. I'm no longer sure it will have the desired effect, given the points raised above. Kris --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+pFyBWry0BWjoQKURAoKrAJ4gc0D/9/FoiZ/Snmd2as8YfdYtAgCfQTHS YGVWYRNIGOyGPksdGqys8cs= =nTtC -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND--