Gentoo Archives: gentoo-dev

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
Date: Mon, 17 Mar 2008 23:43:22
Message-Id: 1205797322.15535.6.camel@su.perronet.esiee.net
In Reply to: Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses by "Rémi Cardona"
1 Le lundi 17 mars 2008 à 17:32 +0100, Rémi Cardona a écrit :
2 [snip]
3 > Now, basically, if the portage metadata or QA people could tell me a way
4 > to figure *all* the ebuilds that inherit gnome2 *and* have a
5 > pkg_preinst() function somewhere (either in the ebuild or in an eclass
6 > somewhere) I'd really appreciate it, as I really don't want to read
7 > through thousands of ebuilds to figure it out.
8
9 Here is my brute force method:
10
11 $ # extract the list of package defining custom pkg_preinst()
12 $ egrep -r "^.*?_pkg_preinst" /usr/portage/eclass/* |cut -f1 -d: |sed \
13 "s:/usr/portage/eclass/::g;s:.eclass::g" |sort|uniq| tee \
14 export-preinst.list
15
16 $ # extract the list of ebuilds inheriting gnome2 eclass
17 $ find /usr/portage/ -name "*.ebuild" -exec egrep -H "gnome2" {} \; | \
18 cut -f1 -d: |uniq| tee gnome-inherit.list
19
20 $ # wheeeeeeee
21 $ for x in $(cat gnome-inherit.list); do for y in \
22 $(cat export-preinst.list); do egrep --color -H "inherit.*${y}" $x; \
23 done; egrep --color -H "^pkg_preinst" $x; done | \
24 tee output-unformated.list
25
26 $ cat output-unformated.list |cut -f1 -d:|sort|uniq
27
28 of course YMMV and there might be simpler/faster solutions but oh
29 well... it gave me an output of 62 packages.
30
31 --
32 Gilles Dartiguelongue <eva@g.o>
33 Gentoo

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses "Bo Ørsted Andresen" <zlin@g.o>