From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FEAJP-0000EO-4x for garchives@archives.gentoo.org; Tue, 28 Feb 2006 19:15:07 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id k1SJD3xS032489; Tue, 28 Feb 2006 19:13:03 GMT Received: from corwin.easynet.fr (smarthost171.mail.easynet.fr [212.180.1.171]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id k1SJ9ZUg031036 for ; Tue, 28 Feb 2006 19:09:35 GMT Received: from easyconnect2121138-64.clients.easynet.fr ([212.11.38.64] helo=eusebe) by corwin.easynet.fr with esmtp (Exim 4.50) id 1FEAEq-0004sY-Jj for gentoo-dev@lists.gentoo.org; Tue, 28 Feb 2006 20:10:24 +0100 Date: Tue, 28 Feb 2006 20:11:26 +0100 From: Thomas de Grenier de Latour To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [RFC] QA Team's role Message-ID: <20060228201126.3871bafb@eusebe> In-Reply-To: <44049022.4030906@gentoo.org> References: <20060226222217.GB17257@aerie.halcy0n.com> <1140997703.12229.166.camel@demandred.gnqs.org> <20060227003413.GE17257@aerie.halcy0n.com> <20060227170834.075e9388@snowdrop.home> <1141071970.804.19.camel@demandred.gnqs.org> <20060227203709.2a7bff47@snowdrop.home> <1159375278.20060227214923@gentoo.org> <20060227213321.7ee405ec@snowdrop.home> <394439379.20060228103817@gentoo.org> <20060228145246.67dee076@snowdrop.home> <1141139552.2741.2.camel@localhost> <7310506941.20060228162637@gentoo.org> <20060228154246.3e34d340@snowdrop.home> <1141143118.2741.18.camel@localhost> <20060228163532.273200be@snowdrop.home> <1232307950.20060228180003@gentoo.org> <20060228170954.37396045@snowdrop.home> <16410671399.20060228183024@gentoo.org> <20060228173810.3e209be2@snowdrop.home> <44049022.4030906@gentoo.org> Organization: Fasmz X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.12; i686-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 43ae17f7-2f63-4a8e-b522-04a2197778b9 X-Archives-Hash: af3cc8ea27725df993c8c4a41631c6d4 On Tue, 28 Feb 2006 13:02:10 -0500, Alec Warner wrote: > Ciaran McCreesh wrote: > > > if [ "${IS_UPGRADE}" = "1" ] ; then > > einfo "Removing old version ${REMOVE_PKG}" > > > > emerge -C "${REMOVE_PKG}" > > fi > > > > > > > Semantics of the logic aside, calling emerge from within an ebuild is > a BIG nono. > Reading the comments in the eclass, i can undestand the motivation. # why do we do this? well ... # # normally, emerge -u installs a new version and then removes the # old version. however, if the new version goes into a different # slot to the old version, then the old version gets left behind # # if USE=-vhosts, then we want to remove the old version, because # the user is relying on portage to do the magical thing for it Two suggestions (don't really know what they are worth though): * Short term, still evil, but less than calling emerge: pkg_postinst() { ... if ! use vhost ; then echo 0 > ${ROOT}var/db/pkg/${CATEGORY}/${PN}-${PVR}/SLOT fi } This way, emerge's autoclean (the slow one, at the end) would remove old version of USE="-vhost" packages, since they would be all slotted "0". * Long term, don't know how difficult it would be: Do some kind of USE-expansion of the SLOT variable, to allow something like SLOT="vhost? ( ${PVR} ) !vhost? ( 0 )" This would only affect SLOT when read from porttree sure. In vartree, and in the ebuild env in general, it should still be the reduced version ("${PVR}" or "0") that is used. -- TGL. -- gentoo-dev@gentoo.org mailing list