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 1Gmeeo-0006aI-CM for garchives@archives.gentoo.org; Tue, 21 Nov 2006 23:04:02 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kALN1uYS007191; Tue, 21 Nov 2006 23:01:56 GMT Received: from outbound.mailhop.org (outbound.mailhop.org [63.208.196.171]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kALMxkWM015028 for ; Tue, 21 Nov 2006 22:59:46 GMT Message-Id: <200611212259.kALMxkWM015028@robin.gentoo.org> Received: from c-24-17-252-74.hsd1.wa.comcast.net ([24.17.252.74] helo=daevid.com) by outbound.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.51) id 1Gmeac-0000Jk-LZ for gentoo-user@lists.gentoo.org; Tue, 21 Nov 2006 17:59:42 -0500 Received: from red.lockdownnetworks.com ([67.105.193.226] helo=gabriel) by daevid.com with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.54) id 1Gmeab-0000rE-22 for gentoo-user@lists.gentoo.org; Tue, 21 Nov 2006 14:59:41 -0800 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 24.17.252.74 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: DAE51D From: "Daevid Vincent" To: Subject: RE: [gentoo-user] In need of script/command that will parse out all the packages from "emerge -avu world" Date: Tue, 21 Nov 2006 14:59:35 -0800 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: text/plain; charset="iso-8859-1" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AccMgXlgYg3IZYf2T2WTMJfQ0hPDmwBPutzw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 In-Reply-To: <200611200936.48984.bo.andresen@zlin.dk> X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id kALMxkWM015028 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id kALN1uYu007191 X-Archives-Salt: 8c0ee4eb-e600-44a8-8929-7e657f311d83 X-Archives-Hash: 71161b930995a259f76b671ad0d58afc Thank you for the 'one liner'... I think it is exactly what I need. I'm trying it out lately and let you know... I did tweak it a smidge to be a little more flexible and robust: locutus ~ # cat /usr/local/bin/emerge_select #!/bin/sh if test -z $1; then echo "required search argument is missing." echo "For example, use 'x11' for all the X11 ebuilds." exit else emerge -va1 $(emerge -pvu world | \ sed -n -r 's,^\[ebuild[^]]*\]\ ('$1'[^\ ]*).*$,\1,p' | \ sed -r 's/-[^-]+(-r[0-9]+)*$//') \ || until emerge --resume --skipfirst; do :; done fi D=C6VID =20 > -----Original Message----- > From: Bo =D8rsted Andresen [mailto:bo.andresen@zlin.dk]=20 > Sent: Monday, November 20, 2006 12:37 AM > To: gentoo-user@lists.gentoo.org > Subject: Re: [gentoo-user] In need of script/command that=20 > will parse out all the packages from "emerge -avu world" >=20 > On Monday 20 November 2006 07:37, Daevid Vincent wrote: > > Wondering if someone has a script or shell 'one liner' that=20 > can take the > > output of "emerge -avu world" and make a list of the=20 > packages (I assume all > > on one line). Then I could pump that back into "emerge -av"=20 > again (I don't > > mind if it's a simple manual highlight and copy/append). >=20 > You need to replace --ask with --pretend when you send the=20 > output into a pipe.=20 > Otherwise it will wait for input. Also when you send it back=20 > to `emerge -av`=20 > you should add --oneshot in order to avoid that every package=20 > on the list=20 > gets added to the world file. >=20 > [SNIP] > > For example: > > > > daevid ~ # emerge -avu world | grep x11- > > [ebuild U ] x11-misc/util-macros-1.1.2 [1.1.0]=20 > 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=20 > -debug" 1,415 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=20 > it to "emerge > > -av " >=20 > I believe [1] should help you understand how this works...: >=20 > # emerge -va1 $(emerge -pvu world |=20 > sed -n -r 's,^\[ebuild[^]]*\]\ (x11-[^\ ]*).*$,\1,p' | > sed -r 's/-[^-]+(-r[0-9]+)*$//') >=20 > [1] http://www.grymoire.com/Unix/Sed.html >=20 > --=20 > Bo Andresen >=20 --=20 gentoo-user@gentoo.org mailing list