From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PBv1z-0003rg-OL for garchives@archives.gentoo.org; Fri, 29 Oct 2010 19:54:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8A7A3E0767; Fri, 29 Oct 2010 19:54:26 +0000 (UTC) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 4E94BE0767 for ; Fri, 29 Oct 2010 19:54:26 +0000 (UTC) Received: by eyb6 with SMTP id 6so1066739eyb.40 for ; Fri, 29 Oct 2010 12:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=y+2bAPa8BJBOM0rbj15bVGdokjwyOOoDzBiqd2jLUqY=; b=mZLRAW+McRKz6IdDmqQX0XNBfVti2DqnCv1/6b7M6Y8uDyLFF/pbjgTFr9z4sIgU0C b5HgHza2WFsWDkNOfoDbiMXa0T11hhW8oYq+4rqI4fHpTU+6IHYfXPhEgfTaXXTwC0db LF1ZiaB+TsY3TTyCxY6uYv0kJ+QP3VeMOJ5Jw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=pLTIx8LNyiyhPSk1KSuCONLSQLKdeJy9aAYPr48tH9M9PR7Mxz/WYdVNJL5ZL5Bnvz N6yFm84OHWycJr5/3hlcJ5l5jQdh4OYiLsF2Pn3E1EjFDY5HyQDO4lEbQeOFdZWcmuKL Lp5+asyH1MQeiDOR8nx2753ciQMisaWwprLvU= Received: by 10.213.34.68 with SMTP id k4mr568426ebd.88.1288382065761; Fri, 29 Oct 2010 12:54:25 -0700 (PDT) Received: from nazgul.localnet (196-215-2-42.dynamic.isadsl.co.za [196.215.2.42]) by mx.google.com with ESMTPS id w20sm1990590eeh.18.2010.10.29.12.54.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 29 Oct 2010 12:54:24 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] emerge --buildpkg --unmerge Date: Fri, 29 Oct 2010 21:54:57 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.36-ck; KDE/4.5.2; x86_64; ; ) Cc: Fatih =?iso-8859-1?q?T=FCmen?= References: <201010292018.11232.alan.mckinnon@gmail.com> In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201010292154.57429.alan.mckinnon@gmail.com> X-Archives-Salt: 4d6df0b6-3cfa-4071-8275-ced73a818494 X-Archives-Hash: 0fd8c322e160e3b1b036c578a9023ce5 Apparently, though unproven, at 21:26 on Friday 29 October 2010, Fatih T=FC= men=20 did opine thusly: > On Fri, Oct 29, 2010 at 21:18, Alan McKinnon =20 wrote: > > Apparently, though unproven, at 18:46 on Friday 29 October 2010, Fatih > > T=FCmen > >=20 > > did opine thusly: > >> Hi, > >>=20 > >> Is there a way tell portage to build binary package before removing it > >> from the system? > >>=20 > >> man emerge says: > >> --buildpkg (-b) > >> Tells emerge to build binary packages for all ebuilds > >> processed in addition to actually **merging** the packages. > >> [...] > >> An alternative for already-merged packages is to use > >> quickpkg(1) which creates a tbz2 from the live filesystem. > >>=20 > >> I have about 20 packages to unmerge or remerge with new use flags. But > >> I want to keep binary copies (with old use settings) before unmerging > >> them. Unfortunately I did not have buildpkg in FEATURES at the time of > >> emerging them. Doing this now by hand sounds kinda fatigue unless... > >> the output of --pretend was parsable so I do what I want by.. > >>=20 > >> for pkg in ${PKGS}; do quickpkg --include-config\=3Dy $pkg; done > >>=20 > >> or by something better? > >>=20 > >> Thanks for ideas in advance. > >> -- > >> Fatih > >=20 > > Write a wrapper script around quickpkg and emerge. > >=20 > > And set buildpkg in FEATURES so this doesn't happen again :-) >=20 > 'wrapper' rang the bell. Thanks. >=20 > The only one I recalled was post_src_install from lafilefixer thing. > So I grepped /usr/lib/portage/ for it and found the list of others at > /usr/lib/portage/bin/isolated-functions.sh +521 and wrote this inside > /etc/portage/bashrc >=20 > pkg_prerm() { > echo ">>> Building binary package before unmerging ;)" > if [[ -f /var/db/.pkg.portage_lockfile ]]; then > rm -f /var/db/.pkg.portage_lockfile #2>/dev/null > fi > quickpkg --include-config\=3Dy "=3D$CATEGORY/$P" > touch /var/db/.pkg.portage_lockfile > } It didn't occur to me to do it that way :-) But it's actually a fine idea, and the way you are supposed to do it by=20 design. Maybe next time I'll remember what those hooks are for :-) =2D-=20 alan dot mckinnon at gmail dot com