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.60) (envelope-from ) id 1Gm4jC-000196-MI for garchives@archives.gentoo.org; Mon, 20 Nov 2006 08:42:11 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kAK8dfYc021421; Mon, 20 Nov 2006 08:39:41 GMT Received: from shuttle.zlin.dk (port78.ds1-abs.adsl.cybercity.dk [212.242.227.17]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kAK8aoY5022114 for ; Mon, 20 Nov 2006 08:36:50 GMT Received: from BA.zlin.dk (unknown [10.0.0.3]) by shuttle.zlin.dk (Postfix) with ESMTP id 21ACB30037 for ; Mon, 20 Nov 2006 09:36:50 +0100 (CET) From: Bo =?iso-8859-1?q?=D8rsted_Andresen?= To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] In need of script/command that will parse out all the packages from "emerge -avu world" Date: Mon, 20 Nov 2006 09:36:42 +0100 User-Agent: KMail/1.9.5 References: <003801c70c6e$7bb2f4d0$450a0a0a@locutus> In-Reply-To: <003801c70c6e$7bb2f4d0$450a0a0a@locutus> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1702172.q5ZT0Xk25i"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200611200936.48984.bo.andresen@zlin.dk> X-Archives-Salt: dba3fa7c-3cb5-4040-98c7-24ada009f500 X-Archives-Hash: a1e5e4a9c83a92face5bf3f63943afb2 --nextPart1702172.q5ZT0Xk25i Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 20 November 2006 07:37, Daevid Vincent wrote: > Wondering if someone has a script or shell 'one liner' that can take the > output of "emerge -avu world" and make a list of the packages (I assume a= ll > on one line). Then I could pump that back into "emerge -av" again (I don't > mind if it's a simple manual highlight and copy/append). You need to replace --ask with --pretend when you send the output into a pi= pe.=20 Otherwise it will wait for input. Also when you send it back to `emerge -av= `=20 you should add --oneshot in order to avoid that every package on the list=20 gets added to the world file. [SNIP] > For example: > > daevid ~ # emerge -avu world | grep x11- > [ebuild U ] x11-misc/util-macros-1.1.2 [1.1.0] USE=3D"-debug" 45 kB > [ebuild U ] x11-proto/inputproto-1.4 [1.3.2] USE=3D"-debug" 47 kB > [ebuild U ] x11-proto/xproto-7.0.9 [7.0.7] USE=3D"-debug" 138 kB > [ebuild U ] x11-libs/xtrans-1.0.2 [1.0.1] USE=3D"-debug" 97 kB > [ebuild U ] x11-libs/libX11-1.0.3-r1 [1.0.3] USE=3D"ipv6 -debug" 1,41= 5 kB > ... > > I want to run some command that will give me a list like: > > x11-misc/util-macros x11-proto/inputproto x11-proto/xproto ... > > Then I could just select and copy that "string" and append it to "emerge > -av " I believe [1] should help you understand how this works...: # emerge -va1 $(emerge -pvu world |=20 sed -n -r 's,^\[ebuild[^]]*\]\ (x11-[^\ ]*).*$,\1,p' | sed -r 's/-[^-]+(-r[0-9]+)*$//') [1] http://www.grymoire.com/Unix/Sed.html =2D-=20 Bo Andresen --nextPart1702172.q5ZT0Xk25i Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFYWkg8/kKEzmwNNoRAn1xAJ933tEky3oIfEEVu0bduYul7w+LawCgsSFs dOAhOvJOlk1py8aqMI2hOWY= =PQJX -----END PGP SIGNATURE----- --nextPart1702172.q5ZT0Xk25i-- -- gentoo-user@gentoo.org mailing list