From owner-freebsd-ports@FreeBSD.ORG Mon Jul 14 11:39:47 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 4B70A37B401; Mon, 14 Jul 2003 11:39:47 -0700 (PDT) Received: from baraca.united.net.ua (vlan1.baraca.united.net.ua [195.234.212.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C51743F3F; Mon, 14 Jul 2003 11:39:46 -0700 (PDT) (envelope-from max@vega.com) Received: from vega.vega.com (xDSL-2-2.united.net.ua [193.111.9.226]) h6EIdbER037746; Mon, 14 Jul 2003 21:39:41 +0300 (EEST) (envelope-from max@vega.com) Received: from vega.vega.com (max@localhost.vega.com [127.0.0.1]) by vega.vega.com (8.12.6/8.12.5) with ESMTP id h6EIfVOn003603; Mon, 14 Jul 2003 21:41:31 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Received: (from max@localhost) by vega.vega.com (8.12.6/8.12.5/Submit) id h6EIfUkG003602; Mon, 14 Jul 2003 21:41:30 +0300 (EEST) Date: Mon, 14 Jul 2003 21:41:30 +0300 From: Maxim Sobolev To: Joe Marcus Clarke Message-ID: <20030714184130.GD2875@vega.vega.com> References: <20030714165358.GC2875@vega.vega.com> <1058207026.299.60.camel@gyros> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <1058207026.299.60.camel@gyros> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 4.7-STABLE i386 cc: ports@FreeBSD.org cc: portmgr@FreeBSD.org Subject: Re: Major flaws of the new make deinstall code 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, 14 Jul 2003 18:39:47 -0000 On Mon, Jul 14, 2003 at 02:23:46PM -0400, Joe Marcus Clarke wrote: > On Mon, 2003-07-14 at 12:53, Maxim Sobolev wrote: > > Folks, > > > > I've noticed several misbehaviours of the new make deinstall code, > > particularly: > > > > 1. The new code behaves incorrectly when there are several @cwd > > statements in the packing list. Particularly, it affects many > > ports from games category, which usually create files and dirs > > under /var. For some reason, make deinstall code takes the second > > @cwd as the prefix of the installed package and obviously mismatch > > happens. This needs to be corrected ASAP. > > Do you have a specific port in mind? I don't recall seeing this in > testing. This is an in-house port for our product, pkg-plist looks like following: bin/radlast bin/radtest bin/raduse bin/radwho bin/radzap lib/xtradius/perlAAA.soc sbin/checkrad sbin/radiusd @dirrm lib/xtradius @cwd /var @exec /bin/mkdir %D/log/radacc > /dev/null 2> /dev/null || /usr/bin/true @unexec /bin/rmdir %D/log/radacc > /dev/null 2> /dev/null || /usr/bin/true @unexec if cmp -s %D/db/raddb/clients %D/db/raddb/clients.sample; then rm -f %D/db/raddb/clients; fi db/raddb/clients.sample @exec [ -f %B/clients ] || cp %B/%f %B/clients db/raddb/dictionary db/raddb/dictionary.ascend db/raddb/dictionary.cisco db/raddb/dictionary.compat db/raddb/dictionary.livingston db/raddb/dictionary.quintum db/raddb/dictionary.shiva db/raddb/dictionary.tunnel db/raddb/dictionary.usr db/raddb/dictionary.versanet db/raddb/dictionary.xtradius db/raddb/execparams db/raddb/hints db/raddb/huntgroups @unexec if cmp -s %D/db/raddb/naslist %D/db/raddb/naslist.sample; then rm -f %D/db/raddb/naslist; fi db/raddb/naslist.sample @exec [ -f %B/naslist ] || cp %B/%f %B/naslist db/raddb/naspasswd db/raddb/realms db/raddb/users db/raddb/users.xtr @dirrm db/raddb For some reason, it picks /var from the installed package as a main prefix resulting in false positive. I have not checked other ports with multiple @cwd's though. > > 2. In general, prefix-safety feature of make deinstall is misdesigned, > > as it should not reject deinstalling package which has no dependants > > (i.e. packages that depend on it) regardless of its prefix, as > > replacing this package with one with a different prefix will not > > lead to any problems I can think of. > > Replacing a dependency (pkgconfig, for example) with a version in a > different prefix could have disasterous effects if you're dealing with > files you expect to exist in a certain location. In any event, make > deinstall-all will remove all packages with a given ORIGIN regardless of > PKGNAME or PREFIX. I am not talking about "replacing", but about deleting - deleting package with different prefix should be harmless if no packages depend on one being deleted. -Maxim > > Joe > > > > > -Maxim > -- > PGP Key : http://www.marcuscom.com/pgp.asc > >