public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
@ 2008-03-14  7:14 Rémi Cardona
  2008-03-14  9:09 ` Denis Dupeyron
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Rémi Cardona @ 2008-03-14  7:14 UTC (permalink / raw
  To: gentoo-dev

Hi folks,

During the past few weeks, I've been working on fixing and improving the 
Gnome2 eclasses wrt bug #155993. We plan on pushing these eclasses to 
portage before the Great Gnome 2.22 Unmask so that users can start 
benefiting from the improvements during the upgrade to 2.22.

URL : 
http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=tree;f=eclass;hb=HEAD

The 2 major changes :
  - the list of GConf schemas to be installed is saved in an env 
variable at pkg_preinst instead of grepping through VDB.
  - the gtk icon cache is now updated in a less brutal way. Again, the 
list of themes to be recached is saved in an env var. The current 
portage version updates _all_ the themes in /usr/share/icons in order 
not to use VDB.

As can be seen, this new eclass relies heavily on the the environment 
variable saving that was recently added to portage, mostly to be PM 
independent and to improve performance.

This is where I kindly request the help of fellow Gentoo devs and PM 
developers :
  - the gnome2 eclass now has a pkg_preinst, if you do multiple 
inherits, make sure that gnome2_pkg_preinst is called too. The 
_games_eclass_ is one of those.
  - if you use functions from the gnome2-utils.eclass, things may not 
work as expected. The _xfce_eclasses_ are on that list.
  - can bash gurus kindly review the eclasses?
  - can PM people tell us about other issues that I may have overlooked?

For info, these eclasses have been in the gnome overlay for 2 months now 
and the current versions prove to be very stable.

*Please* review these eclasses because with a simple grep, I could find 
over _1000_packages_ that inherited gnome2.eclass. But many more use 
other eclasses that depend on gnome2-utils.

Thanks

Rémi
-- 
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14  7:14 [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses Rémi Cardona
@ 2008-03-14  9:09 ` Denis Dupeyron
  2008-03-14 10:21   ` Rémi Cardona
  2008-03-14 11:52 ` David Leverton
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 22+ messages in thread
From: Denis Dupeyron @ 2008-03-14  9:09 UTC (permalink / raw
  To: gentoo-dev

On Fri, Mar 14, 2008 at 8:14 AM, Rémi Cardona <remi@gentoo.org> wrote:
>   - the gnome2 eclass now has a pkg_preinst, if you do multiple
>  inherits, make sure that gnome2_pkg_preinst is called too. The
>  _games_eclass_ is one of those.
[...]
>  *Please* review these eclasses because with a simple grep, I could find
>  over _1000_packages_ that inherited gnome2.eclass. But many more use
>  other eclasses that depend on gnome2-utils.

In case that's of any help, the ugly thing below should lists all
eclasses that export pkg_preinst:

trillian ~ # for ECLASS_ECLASS in /usr/portage/eclass/*.eclass; do
echo "${ECLASS_ECLASS}:$(sed -e :a -e '/\\$/N; s/\\\n//; ta'
${ECLASS_ECLASS} | grep EXPORT_FUNCTIONS)"; done | grep pkg_preinst |
cut -d . -f 1 | cut -d / -f 5
common-lisp
games
kde
kernel-2
kernel
linux-mod
mount-boot
myspell
mysql
perl-module
subversion
tetex-3
toolchain
vmware
x-modular

And the even uglier thing below should list all ebuilds that inherit a
gnome2* eclass and any of the above:

trillian ~ # for ECLASS in $(for ECLASS_ECLASS in
/usr/portage/eclass/*.eclass; do echo "${ECLASS_ECLASS}:$(sed -e :a -e
'/\\$/N; s/\\\n//; ta' ${ECLASS_ECLASS} | grep EXPORT_FUNCTIONS)";
done | grep pkg_preinst | cut -d . -f 1 | cut -d / -f 5); do qgrep -H
"inherit " | grep " ${ECLASS}" | grep " gnome2"; done | sort | uniq
games-arcade/blobwars/blobwars-1.07.ebuild:inherit eutils gnome2-utils games
games-arcade/blobwars/blobwars-1.08.ebuild:inherit eutils gnome2-utils games
games-board/gnome-mastermind/gnome-mastermind-0.3.ebuild:inherit
eutils games gnome2
games-board/gnono/gnono-1.9.1.ebuild:inherit autotools eutils gnome2-utils games
media-video/vlc/vlc-0.8.6e.ebuild:inherit eutils wxwidgets multilib
autotools toolchain-funcs gnome2 nsplugins
media-video/vlc/vlc-0.9.0_alpha20080117.ebuild:inherit eutils
wxwidgets multilib autotools toolchain-funcs gnome2 nsplugins qt4
flag-o-matic
media-video/vlc/vlc-0.9.0_alpha20080228.ebuild:inherit eutils
wxwidgets multilib autotools toolchain-funcs gnome2 nsplugins qt4
flag-o-matic
media-video/vlc/vlc-0.9.0_alpha20080309.ebuild:inherit eutils
wxwidgets multilib autotools toolchain-funcs gnome2 nsplugins qt4
flag-o-matic
net-im/pidgin/pidgin-2.3.1.ebuild:inherit flag-o-matic eutils
toolchain-funcs multilib perl-app gnome2
net-im/pidgin/pidgin-2.4.0.ebuild:inherit flag-o-matic eutils
toolchain-funcs multilib perl-app gnome2
sci-astronomy/celestia/celestia-1.4.1-r2.ebuild:inherit eutils
flag-o-matic gnome2 kde-functions autotools
sci-astronomy/celestia/celestia-1.5.0.ebuild:inherit eutils
flag-o-matic gnome2 kde-functions autotools

If you remove from that list vlc, pidgin and celestia which are false
positives, that leaves us:

games-arcade/blobwars/blobwars-1.07.ebuild
games-arcade/blobwars/blobwars-1.08.ebuild
games-board/gnome-mastermind/gnome-mastermind-0.3.ebuild
games-board/gnono/gnono-1.9.1.ebuild

If I didn't screw up that shouldn't take long to check.

Denis.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14  9:09 ` Denis Dupeyron
@ 2008-03-14 10:21   ` Rémi Cardona
  2008-03-14 11:34     ` Denis Dupeyron
  0 siblings, 1 reply; 22+ messages in thread
From: Rémi Cardona @ 2008-03-14 10:21 UTC (permalink / raw
  To: gentoo-dev

Denis Dupeyron a écrit :
> On Fri, Mar 14, 2008 at 8:14 AM, Rémi Cardona <remi@gentoo.org> wrote:
>>   - the gnome2 eclass now has a pkg_preinst, if you do multiple
>>  inherits, make sure that gnome2_pkg_preinst is called too. The
>>  _games_eclass_ is one of those.
> [...]
>>  *Please* review these eclasses because with a simple grep, I could find
>>  over _1000_packages_ that inherited gnome2.eclass. But many more use
>>  other eclasses that depend on gnome2-utils.
> 
> In case that's of any help, the ugly thing below should lists all
> eclasses that export pkg_preinst:

/me bows to Calchan's mad oneliner skillz.

> And the even uglier thing below should list all ebuilds that inherit a
> gnome2* eclass and any of the above:

[snip]

> If you remove from that list vlc, pidgin and celestia which are false
> positives, that leaves us:

Why are they false positives? They include the gnome2 eclass and other 
stuff, I guess they'll be affected too.

> games-arcade/blobwars/blobwars-1.07.ebuild
> games-arcade/blobwars/blobwars-1.08.ebuild
> games-board/gnome-mastermind/gnome-mastermind-0.3.ebuild
> games-board/gnono/gnono-1.9.1.ebuild

/me wonders why gnome-games didn't appear in your list, which was the 
one ebuild I found out broke with the new eclass.

> If I didn't screw up that shouldn't take long to check.

Probably some more stuff than just 4 ebuilds, but thanks for checking :)

-- 
Rémi Cardona
LRI, INRIA
remi.cardona@lri.fr
remi@gentoo.org
-- 
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14 10:21   ` Rémi Cardona
@ 2008-03-14 11:34     ` Denis Dupeyron
  0 siblings, 0 replies; 22+ messages in thread
From: Denis Dupeyron @ 2008-03-14 11:34 UTC (permalink / raw
  To: gentoo-dev

On Fri, Mar 14, 2008 at 11:21 AM, Rémi Cardona <remi@gentoo.org> wrote:
>  > If you remove from that list vlc, pidgin and celestia which are false
>  > positives, that leaves us:
>
>  Why are they false positives? They include the gnome2 eclass and other
>  stuff, I guess they'll be affected too.

Because, for example celestia is found by a grep on the inherited kde
eclass that's triggered by inheriting kde-functions. And the latter
doesn't export pkg_preinst.

>  /me wonders why gnome-games didn't appear in your list, which was the
>  one ebuild I found out broke with the new eclass.

The answer is easy: I screwed up. I warned you. ;o) This is due to a
combination of the quoting I used in order to remove some of the false
positives and apparently something else. Here's the raw output without
quoting:

trillian ~ # for ECLASS in $(for ECLASS_ECLASS in
/usr/portage/eclass/*.eclass; do echo "${ECLASS_ECLASS}:$(sed -e :a -e
'/\\$/N; s/\\\n//; ta' ${ECLASS_ECLASS} | grep EXPORT_FUNCTIONS)";
done | grep pkg_preinst | cut -d . -f 1 | cut -d / -f 5); do qgrep -H
inherit | grep gnome2 | grep ${ECLASS} ; done | sort | uniq
app-i18n/scim-pinyin/scim-pinyin-0.5.91.ebuild:inherit kde-functions gnome2
dev-db/mysql-gui-tools/mysql-gui-tools-5.0_p12-r2.ebuild:inherit
gnome2 eutils flag-o-matic
dev-perl/gnome2-canvas/gnome2-canvas-1.002.ebuild:inherit perl-module
dev-perl/gnome2-gconf/gnome2-gconf-1.000.ebuild:inherit perl-module
dev-perl/gnome2-gconf/gnome2-gconf-1.031.ebuild:inherit perl-module
dev-perl/gnome2-gconf/gnome2-gconf-1.032.ebuild:inherit perl-module
dev-perl/gnome2-gconf/gnome2-gconf-1.040.ebuild:inherit perl-module
dev-perl/gnome2-gconf/gnome2-gconf-1.043.ebuild:inherit perl-module
dev-perl/gnome2-perl/gnome2-perl-1.023.ebuild:inherit perl-module
dev-perl/gnome2-perl/gnome2-perl-1.040.ebuild:inherit perl-module
dev-perl/gnome2-perl/gnome2-perl-1.041.ebuild:inherit perl-module
dev-perl/gnome2-print/gnome2-print-0.94.ebuild:inherit perl-module
dev-perl/gnome2-print/gnome2-print-1.000.ebuild:inherit perl-module
dev-perl/gnome2-vfs-perl/gnome2-vfs-perl-1.041.ebuild:inherit perl-module
dev-perl/gnome2-vfs-perl/gnome2-vfs-perl-1.060.ebuild:inherit perl-module
dev-perl/gnome2-vfs-perl/gnome2-vfs-perl-1.061.ebuild:inherit perl-module
dev-perl/gnome2-wnck/gnome2-wnck-0.11.ebuild:inherit perl-module eutils
dev-perl/gnome2-wnck/gnome2-wnck-0.12.ebuild:inherit perl-module eutils
dev-perl/gnome2-wnck/gnome2-wnck-0.13.ebuild:inherit perl-module eutils
dev-perl/gnome2-wnck/gnome2-wnck-0.14.ebuild:inherit perl-module eutils
dev-util/devhelp/devhelp-0.16.1.ebuild:inherit toolchain-funcs gnome2
dev-util/devhelp/devhelp-0.17.ebuild:inherit toolchain-funcs gnome2 python
dev-util/devhelp/devhelp-0.18.ebuild:inherit toolchain-funcs gnome2 python
dev-util/devhelp/devhelp-0.19.ebuild:inherit toolchain-funcs gnome2 python
games-arcade/blobwars/blobwars-1.07.ebuild:inherit eutils gnome2-utils games
games-arcade/blobwars/blobwars-1.08.ebuild:inherit eutils gnome2-utils games
games-arcade/monkey-bubble/monkey-bubble-0.4.0.ebuild:inherit
autotools eutils gnome2
games-board/gamazons/gamazons-0.83.ebuild:inherit gnome2
games-board/gnome-mastermind/gnome-mastermind-0.3.ebuild:inherit
eutils games gnome2
games-board/gnono/gnono-1.9.1.ebuild:inherit autotools eutils gnome2-utils games
games-board/pioneers/pioneers-0.11.3-r1.ebuild:inherit eutils gnome2
games-board/teg/teg-0.11.2.ebuild:inherit gnome2
games-kids/gmult/gmult-4.2.ebuild:inherit gnome2
games-kids/gmult/gmult-5.3.ebuild:inherit gnome2
games-mud/gnome-mud/gnome-mud-0.10.7.ebuild:inherit gnome2 games
games-puzzle/atomix/atomix-2.14.0.ebuild:inherit gnome2
games-puzzle/glightoff/glightoff-1.0.0.ebuild:inherit gnome2
games-puzzle/gtetrinet/gtetrinet-0.7.11.ebuild:inherit gnome2 games
games-puzzle/skoosh/skoosh-2.5.0.ebuild:inherit gnome2
games-strategy/gwp/gwp-0.4.0-r2.ebuild:inherit eutils gnome2
gnome-extra/drwright/drwright-0.17.ebuild:inherit gnome2 flag-o-matic
toolchain-funcs
gnome-extra/gnome-games-extra-data/gnome-games-extra-data-2.12.0.ebuild:inherit
gnome2
gnome-extra/gnome-games-extra-data/gnome-games-extra-data-2.14.0.ebuild:inherit
gnome2
gnome-extra/gnome-games-extra-data/gnome-games-extra-data-2.20.0.ebuild:inherit
gnome2
gnome-extra/gnome-games/gnome-games-2.18.2.1.ebuild:inherit games
eutils gnome2 autotools
gnome-extra/gnome-games/gnome-games-2.18.2.1.ebuild:# make sure games
is inherited first so that the gnome2
gnome-extra/gnome-games/gnome-games-2.20.3.ebuild:inherit games eutils
gnome2 python autotools virtualx
gnome-extra/gnome-games/gnome-games-2.20.3.ebuild:# make sure games is
inherited first so that the gnome2
media-gfx/comix/comix-3.6.3.ebuild:inherit toolchain-funcs gnome2
media-gfx/comix/comix-3.6.4.ebuild:inherit toolchain-funcs gnome2
media-video/jubler/jubler-3.4.0.ebuild:inherit gnome2 eutils
java-pkg-2 java-utils-2 java-ant-2 toolchain-funcs
media-video/jubler/jubler-3.4.1.ebuild:inherit gnome2 eutils
java-pkg-2 java-ant-2 toolchain-funcs
media-video/vlc/vlc-0.8.6e.ebuild:inherit eutils wxwidgets multilib
autotools toolchain-funcs gnome2 nsplugins
media-video/vlc/vlc-0.9.0_alpha20080117.ebuild:inherit eutils
wxwidgets multilib autotools toolchain-funcs gnome2 nsplugins qt4
flag-o-matic
media-video/vlc/vlc-0.9.0_alpha20080228.ebuild:inherit eutils
wxwidgets multilib autotools toolchain-funcs gnome2 nsplugins qt4
flag-o-matic
media-video/vlc/vlc-0.9.0_alpha20080309.ebuild:inherit eutils
wxwidgets multilib autotools toolchain-funcs gnome2 nsplugins qt4
flag-o-matic
net-im/pidgin/pidgin-2.3.1.ebuild:inherit flag-o-matic eutils
toolchain-funcs multilib perl-app gnome2
net-im/pidgin/pidgin-2.4.0.ebuild:inherit flag-o-matic eutils
toolchain-funcs multilib perl-app gnome2
sci-astronomy/celestia/celestia-1.4.1-r2.ebuild:inherit eutils
flag-o-matic gnome2 kde-functions autotools
sci-astronomy/celestia/celestia-1.5.0.ebuild:inherit eutils
flag-o-matic gnome2 kde-functions autotools

So there you have more false positives. For example some are listed
because they have gnome2 in their name or category. There may be
others, but at least this narrows it down something that can be
handled manually.

Denis.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14  7:14 [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses Rémi Cardona
  2008-03-14  9:09 ` Denis Dupeyron
@ 2008-03-14 11:52 ` David Leverton
  2008-03-14 12:14   ` Petteri Räty
  2008-03-14 12:20   ` Rémi Cardona
  2008-03-14 12:22 ` Petteri Räty
  2008-03-17 16:32 ` Rémi Cardona
  3 siblings, 2 replies; 22+ messages in thread
From: David Leverton @ 2008-03-14 11:52 UTC (permalink / raw
  To: gentoo-dev

On Friday 14 March 2008 07:14:23 Rémi Cardona wrote:
>   - the gnome2 eclass now has a pkg_preinst, if you do multiple
> inherits, make sure that gnome2_pkg_preinst is called too. The
> _games_eclass_ is one of those.

Maybe worth adding a dummy to the current version of the eclass so that 
ebuilds can be updated now, instead of suddenly all at once as soon as the 
new eclass is committed?

>   - if you use functions from the gnome2-utils.eclass, things may not
> work as expected. The _xfce_eclasses_ are on that list.

Are you referring to the need to call gnome2_gconf_savelist in pkg_preinst if 
the ebuild/eclass wants to use the gconf functions?  What I said above goes 
here as well.

A couple of things that aren't specific to the new eclass, but I noticed them 
while checking:

> #gnome2_pkg_prerm() {
> #       gnome2_gconf_uninstall
> #}

Should this really be commented out?  If so, might be worth adding a comment 
explaining why - it's not clear whether it's disabled because it's broken, or 
not necessary, or whether ebuilds are expected to call gnome2_gconf_uninstall 
explicitly if they need to.

> # Path to gconftool-2
> GCONFTOOL_BIN=${GCONFTOOL_BIN:="${ROOT}usr/bin/gconftool-2"}

> # Path to scrollkeeper-update
> 
SCROLLKEEPER_UPDATE_BIN=${SCROLLKEEPER_UPDATE_BIN:="${ROOT}usr/bin/scrollkeeper-update"}

Those aren't going to work with cross-compilation (which isn't well-supported 
by the current ebuild format, but best to be future-proof), since the 
executables in ${ROOT} won't be able to run on the build machine.

>         export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)

I confess I don't know much about gconf, but that looks as though it'll always 
return a path in /, not ${ROOT}, so it'll install the schemas in the / 
database.
--
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14 11:52 ` David Leverton
@ 2008-03-14 12:14   ` Petteri Räty
  2008-03-14 12:26     ` David Leverton
  2008-03-14 12:20   ` Rémi Cardona
  1 sibling, 1 reply; 22+ messages in thread
From: Petteri Räty @ 2008-03-14 12:14 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

David Leverton kirjoitti:
> On Friday 14 March 2008 07:14:23 Rémi Cardona wrote:
>>   - the gnome2 eclass now has a pkg_preinst, if you do multiple
>> inherits, make sure that gnome2_pkg_preinst is called too. The
>> _games_eclass_ is one of those.
> 
> Maybe worth adding a dummy to the current version of the eclass so that 
> ebuilds can be updated now, instead of suddenly all at once as soon as the 
> new eclass is committed?
> 

And break a bunch of ebuilds to stable users. No thanks.

Regards,
Petteri


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14 11:52 ` David Leverton
  2008-03-14 12:14   ` Petteri Räty
@ 2008-03-14 12:20   ` Rémi Cardona
  2008-03-14 12:58     ` David Leverton
  1 sibling, 1 reply; 22+ messages in thread
From: Rémi Cardona @ 2008-03-14 12:20 UTC (permalink / raw
  To: gentoo-dev

David Leverton a écrit :
> On Friday 14 March 2008 07:14:23 Rémi Cardona wrote:
>>   - the gnome2 eclass now has a pkg_preinst, if you do multiple
>> inherits, make sure that gnome2_pkg_preinst is called too. The
>> _games_eclass_ is one of those.
> 
> Maybe worth adding a dummy to the current version of the eclass so that 
> ebuilds can be updated now, instead of suddenly all at once as soon as the 
> new eclass is committed?

Good idea, I'll see what I can do there.

> Are you referring to the need to call gnome2_gconf_savelist in pkg_preinst if 
> the ebuild/eclass wants to use the gconf functions?  What I said above goes 
> here as well.

That's basically it, along with gnome2_icons_savelist.

>> #gnome2_pkg_prerm() {
>> #       gnome2_gconf_uninstall
>> #}
> 
> Should this really be commented out?  If so, might be worth adding a comment 
> explaining why - it's not clear whether it's disabled because it's broken, or 
> not necessary, or whether ebuilds are expected to call gnome2_gconf_uninstall 
> explicitly if they need to.

Yes, I'll add a comment, this functionality is broken, but we want to 
keep the code for future use.

> SCROLLKEEPER_UPDATE_BIN=${SCROLLKEEPER_UPDATE_BIN:="${ROOT}usr/bin/scrollkeeper-update"}
> 
> Those aren't going to work with cross-compilation (which isn't well-supported 
> by the current ebuild format, but best to be future-proof), since the 
> executables in ${ROOT} won't be able to run on the build machine.

With Gnome 2.22 (app-text/rarian specifically), scrollkeeper-update is 
just a script (that's even just a no-op if I'm not mistaken). So all 
this scrollkeeper cruft will just become irrelevant as time goes on.

>>         export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
> 
> I confess I don't know much about gconf, but that looks as though it'll always 
> return a path in /, not ${ROOT}, so it'll install the schemas in the / 
> database.

IIRC, the path returned in --get-default-source should contain $ROOT 
because gconf was installed using $ROOT. So it should be safe. So far, 
no one has complained :)

Thanks a lot for your review.

-- 
Rémi Cardona
LRI, INRIA
remi.cardona@lri.fr
remi@gentoo.org
-- 
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14  7:14 [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses Rémi Cardona
  2008-03-14  9:09 ` Denis Dupeyron
  2008-03-14 11:52 ` David Leverton
@ 2008-03-14 12:22 ` Petteri Räty
  2008-03-17 16:32 ` Rémi Cardona
  3 siblings, 0 replies; 22+ messages in thread
From: Petteri Räty @ 2008-03-14 12:22 UTC (permalink / raw
  To: gentoo-dev; +Cc: games, net-im

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

Rémi Cardona kirjoitti:
> 
> This is where I kindly request the help of fellow Gentoo devs and PM 
> developers :
>  - the gnome2 eclass now has a pkg_preinst, if you do multiple inherits, 
> make sure that gnome2_pkg_preinst is called too. The _games_eclass_ is 
> one of those.

I only found two ebuilds to fix:

betelgeuse@pena /mnt/checkouts/java/scripts $ 
./find-function-usage-in-inheriting-ebuilds.sh --can-add --no-default 
gnome2 pkg_preinst
games.eclass: games-board/gnome-mastermind/gnome-mastermind-0.3.ebuild
perl-module.eclass: net-im/pidgin/pidgin-2.3.1.ebuild

Regards,
Petteri


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14 12:14   ` Petteri Räty
@ 2008-03-14 12:26     ` David Leverton
  2008-03-14 12:56       ` Petteri Räty
  0 siblings, 1 reply; 22+ messages in thread
From: David Leverton @ 2008-03-14 12:26 UTC (permalink / raw
  To: gentoo-dev

On Friday 14 March 2008 12:14:39 Petteri Räty wrote:
> David Leverton kirjoitti:
> > Maybe worth adding a dummy to the current version of the eclass so that
> > ebuilds can be updated now, instead of suddenly all at once as soon as
> > the new eclass is committed?
>
> And break a bunch of ebuilds to stable users. No thanks.

Hmm?  I don't see how this would break anything... unless you mean that 
exporting the dummy function would overwrite one that actually does something 
important, but that's easily worked around by not exporting it until the 
ebuilds are fixed, as far as I can tell.  In any case, not doing anything 
until the new eclass is committed is going to break ebuilds until they're 
updated to call the new function, whether stable or ~arch.
--
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14 12:26     ` David Leverton
@ 2008-03-14 12:56       ` Petteri Räty
  0 siblings, 0 replies; 22+ messages in thread
From: Petteri Räty @ 2008-03-14 12:56 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

David Leverton kirjoitti:
> On Friday 14 March 2008 12:14:39 Petteri Räty wrote:
>> David Leverton kirjoitti:
>>> Maybe worth adding a dummy to the current version of the eclass so that
>>> ebuilds can be updated now, instead of suddenly all at once as soon as
>>> the new eclass is committed?
>> And break a bunch of ebuilds to stable users. No thanks.
> 
> Hmm?  I don't see how this would break anything... unless you mean that 
> exporting the dummy function would overwrite one that actually does something 
> important, but that's easily worked around by not exporting it until the 
> ebuilds are fixed, as far as I can tell.  In any case, not doing anything 
> until the new eclass is committed is going to break ebuilds until they're 
> updated to call the new function, whether stable or ~arch.

Adding new eclass functions can shadow things but yeah this only happens 
when you export them. I found out that only a couple of ebuilds need 
modification so I would have just committed everything at once.

Regards,
Petteri


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14 12:20   ` Rémi Cardona
@ 2008-03-14 12:58     ` David Leverton
  0 siblings, 0 replies; 22+ messages in thread
From: David Leverton @ 2008-03-14 12:58 UTC (permalink / raw
  To: gentoo-dev

On Friday 14 March 2008 12:20:15 Rémi Cardona wrote:
> David Leverton a écrit :
> > Maybe worth adding a dummy to the current version of the eclass so that 
> > ebuilds can be updated now, instead of suddenly all at once as soon as the 
> > new eclass is committed?
>
> Good idea, I'll see what I can do there.

Just to be sure you saw my other message, be careful not to overwrite a useful 
pkg_preinst function defined in some other eclass, until the ebuilds are 
updated to call both.  It should be OK to not export it for now, until 
everything is fixed.

> > SCROLLKEEPER_UPDATE_BIN=${SCROLLKEEPER_UPDATE_BIN:="${ROOT}usr/bin/scroll
> >keeper-update"}
> >
> > Those aren't going to work with cross-compilation (which isn't
> > well-supported by the current ebuild format, but best to be
> > future-proof), since the executables in ${ROOT} won't be able to run on
> > the build machine.
>
> With Gnome 2.22 (app-text/rarian specifically), scrollkeeper-update is
> just a script (that's even just a no-op if I'm not mistaken). So all
> this scrollkeeper cruft will just become irrelevant as time goes on.

OK, but it's still an issue for gconftool-2 (I /think/ it should be OK to call 
the one in /, as long as you can persuade it to operate on the data in 
${ROOT}.

> >>         export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN}
> >> --get-default-source)
> >
> > I confess I don't know much about gconf, but that looks as though it'll
> > always return a path in /, not ${ROOT}, so it'll install the schemas in
> > the / database.
>
> IIRC, the path returned in --get-default-source should contain $ROOT
> because gconf was installed using $ROOT. So it should be safe.

Again, maybe my lack of gconf knowledge is showing and I'm misunderstanding 
you, but using ${ROOT} to install a package shouldn't affect how it behaves 
at runtime (since you can build a binpkg and install it multiple times to 
different ${ROOT}s).  What happens if you enter the chroot and run 
gconftool-2 --get-default-source there?  It should return just /etc, 
not /chroot/etc.

> So far, no one has complained :)

Well, it seems like the sort of thing that could easily go unnoticed.  Not 
many people are going to know or care if they have schemas installed for an 
application that they don't have in /, and I would think most applications 
would react gracefully if their schema is missing.

> Thanks a lot for your review.

No problem.
--
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-14  7:14 [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses Rémi Cardona
                   ` (2 preceding siblings ...)
  2008-03-14 12:22 ` Petteri Räty
@ 2008-03-17 16:32 ` Rémi Cardona
  2008-03-17 17:51   ` Nirbheek Chauhan
                     ` (3 more replies)
  3 siblings, 4 replies; 22+ messages in thread
From: Rémi Cardona @ 2008-03-17 16:32 UTC (permalink / raw
  To: gentoo-dev

Hi again,

I've just come up with a plan for the new eclass based on previous 
feedback. Basically, I want to commit this patch [1] ASAP.

If I commit this right now here's what's going to happen :

  - ebuilds that use the gnome2 eclass and other eclasses that don't 
export pkg_preinst() will be fine. Most Gnome packages are thus fine.

  - ebuilds that have "inherit gnome2 $eclass_foo" [*] will still work 
for now, but won't work once I commit the rest of the eclass changes

  - ebuilds that have "inherit $eclass_foo gnome2" [*] won't work as 
they  used to.

[*] if $eclass_foo has indeed a pkg_preinst somewhere, like the games 
eclass.

Now, basically, if the portage metadata or QA people could tell me a way 
to figure *all* the ebuilds that inherit gnome2 *and* have a 
pkg_preinst() function somewhere (either in the ebuild or in an eclass 
somewhere) I'd really appreciate it, as I really don't want to read 
through thousands of ebuilds to figure it out.

Thanks

Rémi


[1] The Patch (tm)

--- gnome2.eclass       10 Feb 2008 14:47:14 -0000      1.83
+++ gnome2.eclass       17 Mar 2008 16:30:31 -0000
@@ -106,6 +106,9 @@
         rm -fr "${D}/usr/share/applications/mimeinfo.cache"
  }

+gnome2_pkg_preinst() {
+}
+
  gnome2_pkg_postinst() {
         gnome2_gconf_install
         fdo-mime_desktop_database_update
@@ -131,4 +134,4 @@
         fi
  }

-EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
+EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst 
pkg_postinst pkg_postrm


-- 
Rémi Cardona
LRI, INRIA
remi.cardona@lri.fr
remi@gentoo.org
-- 
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-17 16:32 ` Rémi Cardona
@ 2008-03-17 17:51   ` Nirbheek Chauhan
  2008-03-17 19:57     ` Rémi Cardona
  2008-03-17 23:42   ` Gilles Dartiguelongue
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 22+ messages in thread
From: Nirbheek Chauhan @ 2008-03-17 17:51 UTC (permalink / raw
  To: gentoo-dev

On Mon, Mar 17, 2008 at 10:02 PM, Rémi Cardona <remi@gentoo.org> wrote:
[snip]
>  [1] The Patch (tm)
>
>  --- gnome2.eclass       10 Feb 2008 14:47:14 -0000      1.83
>  +++ gnome2.eclass       17 Mar 2008 16:30:31 -0000
>  @@ -106,6 +106,9 @@
>          rm -fr "${D}/usr/share/applications/mimeinfo.cache"
>   }
>
>  +gnome2_pkg_preinst() {
>  +}
>  +

Shouldn't this function be

gnome2_pkg_preinst() {
       :
}

? Because bash chokes on empty functions..

[snip]


-- 
~Nirbheek Chauhan
--
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-17 17:51   ` Nirbheek Chauhan
@ 2008-03-17 19:57     ` Rémi Cardona
  0 siblings, 0 replies; 22+ messages in thread
From: Rémi Cardona @ 2008-03-17 19:57 UTC (permalink / raw
  To: gentoo-dev

Nirbheek Chauhan a écrit :

> Shouldn't this function be
> 
> gnome2_pkg_preinst() {
>        :
> }
> 
> ? Because bash chokes on empty functions..

I was actually planning on using a bogus debug-print statement :) but 
thanks for letting me know.

Rémi
-- 
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-17 16:32 ` Rémi Cardona
  2008-03-17 17:51   ` Nirbheek Chauhan
@ 2008-03-17 23:42   ` Gilles Dartiguelongue
  2008-03-18  1:06     ` Bo Ørsted Andresen
  2008-03-18  0:35   ` Petteri Räty
  2008-03-20  8:23   ` [gentoo-dev] " Steve Long
  3 siblings, 1 reply; 22+ messages in thread
From: Gilles Dartiguelongue @ 2008-03-17 23:42 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]


Le lundi 17 mars 2008 à 17:32 +0100, Rémi Cardona a écrit :
[snip]
> Now, basically, if the portage metadata or QA people could tell me a way 
> to figure *all* the ebuilds that inherit gnome2 *and* have a 
> pkg_preinst() function somewhere (either in the ebuild or in an eclass 
> somewhere) I'd really appreciate it, as I really don't want to read 
> through thousands of ebuilds to figure it out.

Here is my brute force method:

$ # extract the list of package defining custom pkg_preinst()
$ egrep -r "^.*?_pkg_preinst" /usr/portage/eclass/* |cut -f1 -d: |sed \
 "s:/usr/portage/eclass/::g;s:.eclass::g" |sort|uniq| tee \
 export-preinst.list

$ # extract the list of ebuilds inheriting gnome2 eclass
$ find /usr/portage/ -name "*.ebuild" -exec egrep -H "gnome2" {} \; | \
cut -f1 -d: |uniq| tee gnome-inherit.list

$ # wheeeeeeee
$ for x in $(cat gnome-inherit.list); do for y in \
$(cat export-preinst.list); do egrep --color -H "inherit.*${y}" $x; \
 done; egrep --color -H "^pkg_preinst" $x; done | \
 tee output-unformated.list

$ cat output-unformated.list |cut -f1 -d:|sort|uniq

of course YMMV and there might be simpler/faster solutions but oh
well... it gave me an output of 62 packages.

-- 
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo

[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-17 16:32 ` Rémi Cardona
  2008-03-17 17:51   ` Nirbheek Chauhan
  2008-03-17 23:42   ` Gilles Dartiguelongue
@ 2008-03-18  0:35   ` Petteri Räty
  2008-03-18  6:37     ` Rémi Cardona
  2008-03-20  8:23   ` [gentoo-dev] " Steve Long
  3 siblings, 1 reply; 22+ messages in thread
From: Petteri Räty @ 2008-03-18  0:35 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

Rémi Cardona kirjoitti:
> 
> Now, basically, if the portage metadata or QA people could tell me a way 
> to figure *all* the ebuilds that inherit gnome2 *and* have a 
> pkg_preinst() function somewhere (either in the ebuild or in an eclass 
> somewhere) I'd really appreciate it, as I really don't want to read 
> through thousands of ebuilds to figure it out.
> 
> Thanks
> 

http://archives.gentoo.org/gentoo-dev/msg_a57bf5f459324975bae8843fe7cdf469.xml




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-17 23:42   ` Gilles Dartiguelongue
@ 2008-03-18  1:06     ` Bo Ørsted Andresen
  2008-03-18  6:43       ` Rémi Cardona
  0 siblings, 1 reply; 22+ messages in thread
From: Bo Ørsted Andresen @ 2008-03-18  1:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

On Tuesday 18 March 2008 00:42:02 Gilles Dartiguelongue wrote:
> > Now, basically, if the portage metadata or QA people could tell me a way
> > to figure *all* the ebuilds that inherit gnome2 *and* have a
> > pkg_preinst() function somewhere (either in the ebuild or in an eclass
> > somewhere) I'd really appreciate it, as I really don't want to read
> > through thousands of ebuilds to figure it out.
>
> Here is my brute force method:

Wow.. :p

> $ # extract the list of package defining custom pkg_preinst()
> $ egrep -r "^.*?_pkg_preinst" /usr/portage/eclass/* |cut -f1 -d: |sed \
>  "s:/usr/portage/eclass/::g;s:.eclass::g" |sort|uniq| tee \
>  export-preinst.list

$ grep -l 'EXPORT_FUNCTIONS.*pkg_preinst' $(portageq portdir)/eclass/*.eclass | \
    while read eclass; do
        basename "$eclass" .eclass
    done | tee export-preinst.list

> $ # extract the list of ebuilds inheriting gnome2 eclass
> $ find /usr/portage/ -name "*.ebuild" -exec egrep -H "gnome2" {} \; | \
> cut -f1 -d: |uniq| tee gnome-inherit.list

$ inquisitio --repository gentoo --all-versions --compact --keys INHERITED \
    --matcher exact gnome2 | cut -d' ' -f2 | tee gnome2-inherited.list

[...]
> of course YMMV and there might be simpler/faster solutions but oh
> well... it gave me an output of 62 packages.

While inquisitio may not be faster it is certainly more reliable. Another option
is to rely on the metadata cache in an rsync tree where INHERITED is the tenth
line in each entry.

-- 
Bo Andresen
Gentoo KDE Dev

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-18  0:35   ` Petteri Räty
@ 2008-03-18  6:37     ` Rémi Cardona
  2008-03-18 11:33       ` Petteri Räty
  0 siblings, 1 reply; 22+ messages in thread
From: Rémi Cardona @ 2008-03-18  6:37 UTC (permalink / raw
  To: gentoo-dev

Petteri Räty a écrit :

> http://archives.gentoo.org/gentoo-dev/msg_a57bf5f459324975bae8843fe7cdf469.xml 

Sorry I didn't respond to you Petteri, but this is clearly missing 
packages. For sure, it's missing gnome-games which inherits both the 
gnome2 and the games eclasses. So I made the assumption that it'd be 
missing other packages as well.

Could you send me a copy of that script? Maybe it's not checking for the 
stuff I really need.

Thanks

Rémi
-- 
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-18  1:06     ` Bo Ørsted Andresen
@ 2008-03-18  6:43       ` Rémi Cardona
  2008-03-18  7:06         ` Dawid Węgliński
  0 siblings, 1 reply; 22+ messages in thread
From: Rémi Cardona @ 2008-03-18  6:43 UTC (permalink / raw
  To: gentoo-dev

Bo Ørsted Andresen a écrit :
> On Tuesday 18 March 2008 00:42:02 Gilles Dartiguelongue wrote:
>>> Now, basically, if the portage metadata or QA people could tell me a way
>>> to figure *all* the ebuilds that inherit gnome2 *and* have a
>>> pkg_preinst() function somewhere (either in the ebuild or in an eclass
>>> somewhere) I'd really appreciate it, as I really don't want to read
>>> through thousands of ebuilds to figure it out.
>> Here is my brute force method:
> 
> Wow.. :p

+1 :)

Gilles, I'll ping you later so that maybe we can come up with a good 
list based on your silly oneliners ;)

> $ inquisitio --repository gentoo --all-versions --compact --keys INHERITED \
>     --matcher exact gnome2 | cut -d' ' -f2 | tee gnome2-inherited.list

[...]

> While inquisitio may not be faster it is certainly more reliable. Another option
> is to rely on the metadata cache in an rsync tree where INHERITED is the tenth
> line in each entry.

Bo, what is inquisitio, who wrote it? Where can I get it?

/me mumbles that Gentoo needs better QA tools, or at least to publicize 
the ones we already have :)

Thanks

Rémi
-- 
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-18  6:43       ` Rémi Cardona
@ 2008-03-18  7:06         ` Dawid Węgliński
  0 siblings, 0 replies; 22+ messages in thread
From: Dawid Węgliński @ 2008-03-18  7:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

Tuesday, 18 of March 2008 07:43:35 Rémi Cardona wrote:
> Bo Ørsted Andresen a écrit :
> > On Tuesday 18 March 2008 00:42:02 Gilles Dartiguelongue wrote:
> >>> Now, basically, if the portage metadata or QA people could tell me a
> >>> way to figure *all* the ebuilds that inherit gnome2 *and* have a
> >>> pkg_preinst() function somewhere (either in the ebuild or in an eclass
> >>> somewhere) I'd really appreciate it, as I really don't want to read
> >>> through thousands of ebuilds to figure it out.
> >>
> >> Here is my brute force method:
> >
> > Wow.. :p
>
> +1 :)
>
> Gilles, I'll ping you later so that maybe we can come up with a good
> list based on your silly oneliners ;)
>
> > $ inquisitio --repository gentoo --all-versions --compact --keys
> > INHERITED \ --matcher exact gnome2 | cut -d' ' -f2 | tee
> > gnome2-inherited.list
>
> [...]
>
> > While inquisitio may not be faster it is certainly more reliable. Another
> > option is to rely on the metadata cache in an rsync tree where INHERITED
> > is the tenth line in each entry.
>
> Bo, what is inquisitio, who wrote it? Where can I get it?
USE="inquisitio" emerge -va paludis
>
> /me mumbles that Gentoo needs better QA tools, or at least to publicize
> the ones we already have :)
>
> Thanks
>
> Rémi



-- 
Cheers
Dawid Węgliński

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses
  2008-03-18  6:37     ` Rémi Cardona
@ 2008-03-18 11:33       ` Petteri Räty
  0 siblings, 0 replies; 22+ messages in thread
From: Petteri Räty @ 2008-03-18 11:33 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

Rémi Cardona kirjoitti:
> Petteri Räty a écrit :
> 
>> http://archives.gentoo.org/gentoo-dev/msg_a57bf5f459324975bae8843fe7cdf469.xml 
> 
> 
> Sorry I didn't respond to you Petteri, but this is clearly missing 
> packages. For sure, it's missing gnome-games which inherits both the 
> gnome2 and the games eclasses. So I made the assumption that it'd be 
> missing other packages as well.
> 
> Could you send me a copy of that script? Maybe it's not checking for the 
> stuff I really need.
> 
> Thanks
> 
> Rémi

gnome_games has it's own pkg_preinst so adding something to the gnome2 
eclass has no affect.

http://overlays.gentoo.org/proj/java/browser/scripts

If you want to make sure that gnome_pkg_preinst is called by every 
ebuild you can use this script after adding the dummy:

http://overlays.gentoo.org/proj/java/browser/scripts/check-that-eclass-function-is-called.sh

Regards,
Petteri


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [gentoo-dev]  Re: [RFC] Major changes to the Gnome2 Eclasses
  2008-03-17 16:32 ` Rémi Cardona
                     ` (2 preceding siblings ...)
  2008-03-18  0:35   ` Petteri Räty
@ 2008-03-20  8:23   ` Steve Long
  3 siblings, 0 replies; 22+ messages in thread
From: Steve Long @ 2008-03-20  8:23 UTC (permalink / raw
  To: gentoo-dev

Rémi Cardona wrote:

> Now, basically, if the portage metadata or QA people could tell me a way
> to figure *all* the ebuilds that inherit gnome2 *and* have a
> pkg_preinst() function somewhere (either in the ebuild or in an eclass
> somewhere) I'd really appreciate it, as I really don't want to read
> through thousands of ebuilds to figure it out.
> 
PORTDIR=$(portageq envvar PORTDIR)
# Get eclasses which export pkg_preinst()
preEclass=($(qgrep -EeCl 'EXPORT_FUNCTIONS.*pkg_preinst'))
# We don't want the eclass/ prefix
preEclass=("${preEclass[@]/#eclass\/}")
# or the .eclass suffix
preEclass=("${preEclass[@]/%.eclass}")
# make a regex for an ebuild with a pkg_preinst, or inheriting one
# of the eclasses
IFS='|'
search="^[[:space:]]*(pkg_preinst\(\)|inherit .*(${preEclass[*]}))"
unset IFS
# find matching ebuilds
while read ebuild; do grep -El "$search" "$PORTDIR/$ebuild"
done< <(qgrep -Cel 'inherit .*gnome2')
# just the packages (would need to count dirs in PORTDIR and amend awk
# accordingly to use the env var)
while read ebuild; do grep -El "$search" "/usr/portage/$ebuild"
done< <(qgrep -Cel 'inherit .*gnome2') | \
  awk -F/ '!s[$4"/"$5]++ { print $4"/"$5 }'

If you wanted to do something with the files, you'd use:
grep -Eq "$search" "$PORTDIR/$ebuild" && files+=("$PORTDIR/$ebuild")
in the loop, and then access the "${files[@]}" array after. You can't do
that with a pipe, see http://wooledge.org/mywiki/BashFAQ/024


-- 
gentoo-dev@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2008-03-20  8:16 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14  7:14 [gentoo-dev] [RFC] Major changes to the Gnome2 Eclasses Rémi Cardona
2008-03-14  9:09 ` Denis Dupeyron
2008-03-14 10:21   ` Rémi Cardona
2008-03-14 11:34     ` Denis Dupeyron
2008-03-14 11:52 ` David Leverton
2008-03-14 12:14   ` Petteri Räty
2008-03-14 12:26     ` David Leverton
2008-03-14 12:56       ` Petteri Räty
2008-03-14 12:20   ` Rémi Cardona
2008-03-14 12:58     ` David Leverton
2008-03-14 12:22 ` Petteri Räty
2008-03-17 16:32 ` Rémi Cardona
2008-03-17 17:51   ` Nirbheek Chauhan
2008-03-17 19:57     ` Rémi Cardona
2008-03-17 23:42   ` Gilles Dartiguelongue
2008-03-18  1:06     ` Bo Ørsted Andresen
2008-03-18  6:43       ` Rémi Cardona
2008-03-18  7:06         ` Dawid Węgliński
2008-03-18  0:35   ` Petteri Räty
2008-03-18  6:37     ` Rémi Cardona
2008-03-18 11:33       ` Petteri Räty
2008-03-20  8:23   ` [gentoo-dev] " Steve Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox