public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] which ebuilds use a specific eclass?
@ 2015-02-19 20:38 James
  2015-02-19 21:25 ` Neil Bothwick
  0 siblings, 1 reply; 4+ messages in thread
From: James @ 2015-02-19 20:38 UTC (permalink / raw
  To: gentoo-user

Ok, so googling found lots of interesting things to read; some deprecated
some new.

So looking more deeply into some of the eclasses [1], it helps me to examine
different ebuilds an eclass is inherited into; then specifically how
those eclass constructs are used, by subsequently looking into a specific
ebuild.


Evidently, I'm not alone in this adventure as I have read lots of stuff
about folks not choosing the best eclass to use for a specific task, not
using a given eclass correctly and new (eclass) features that should be used
which have been added to an existing eclass or as part of a new eclass.
Surely this can be very dynamic, but, I'm mostly hacking at relatively
straightforward ebuilds, so the existing semantics are probably fine for me
in most cases, no bleeding edges here.


So for a given eclass, how to I find the list of all ebuilds that use
that eclass I'm interested in? Is my only option a brute force search
of the "inherit" inside every ebuild?  What if I only want to look at
an eclass, like systemd, limited to a specific category of ebuilds, for
example sys-cluster; what is the best tool/script to search for a specific
eclass limited to a single category?


James


[1] https://devmanual.gentoo.org/eclass-reference/index.html






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

* Re: [gentoo-user] which ebuilds use a specific eclass?
  2015-02-19 20:38 [gentoo-user] which ebuilds use a specific eclass? James
@ 2015-02-19 21:25 ` Neil Bothwick
  2015-02-19 22:56   ` [gentoo-user] " James
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Bothwick @ 2015-02-19 21:25 UTC (permalink / raw
  To: gentoo-user

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

On Thu, 19 Feb 2015 20:38:18 +0000 (UTC), James wrote:

> So for a given eclass, how to I find the list of all ebuilds that use
> that eclass I'm interested in? Is my only option a brute force search
> of the "inherit" inside every ebuild?

Well, brute force works

grep -Er 'inherit.*systemd' /var/portage

That shows every ebuild, you may want to reduce it to a list of packages
with something like:

for i in $(grep -Erl 'inherit.*systemd' /var/portage)
do
	dirname $i
done | sort -u


> What if I only want to look at
> an eclass, like systemd, limited to a specific category of ebuilds, for
> example sys-cluster; what is the best tool/script to search for a
> specific eclass limited to a single category?

grep works again, just search the category directory(s).


-- 
Neil Bothwick

Why marry a virgin? If she wasn't good enough for the rest of them, then
she isn't good enough for you.

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

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

* [gentoo-user] Re: which ebuilds use a specific eclass?
  2015-02-19 21:25 ` Neil Bothwick
@ 2015-02-19 22:56   ` James
  2015-02-19 23:54     ` Neil Bothwick
  0 siblings, 1 reply; 4+ messages in thread
From: James @ 2015-02-19 22:56 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick <neil <at> digimed.co.uk> writes:


> > So for a given eclass, how to I find the list of all ebuilds 
> Well, brute force works

> grep -Er 'inherit.*systemd' /var/portage

'/usr/portage/' works for me, when bruting.

> That shows every ebuild, you may want to reduce it to a list of packages

> for i in $(grep -Erl 'inherit.*systemd' /var/portage)
> do
> 	dirname $i
> done | sort -u


Yea, sure, cool.  (THANKS). However, I was looking for (wink wink nudge
nudge) something sexy, using VDB (/var/db/pkg/) along the lines of 
a Directed Acyclic Graph  (DAG) [1] solution in haskell/charm or python.

Sure shell works, and works well, but, surely GLEP 64 will bring us
something new and cool? Anthony, is one of the devs that continues to
'surprise' and insprire this old hack......

I figured Rich already has code, he has not put out, just yet.
(only teasing about haskell/charm, but, not really).... 


thx,
James

[1] http://ericsink.com/vcbe/html/directed_acyclic_graphs.html




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

* Re: [gentoo-user] Re: which ebuilds use a specific eclass?
  2015-02-19 22:56   ` [gentoo-user] " James
@ 2015-02-19 23:54     ` Neil Bothwick
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Bothwick @ 2015-02-19 23:54 UTC (permalink / raw
  To: gentoo-user

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

On Thu, 19 Feb 2015 22:56:20 +0000 (UTC), James wrote:

> Neil Bothwick <neil <at> digimed.co.uk> writes:

> > > So for a given eclass, how to I find the list of all ebuilds 
> > Well, brute force works
> 
> > grep -Er 'inherit.*systemd' /var/portage
> 
> '/usr/portage/' works for me, when bruting.

Yes, I'd forgot to adjust for my moving the portage tree to a more
logical location :)
 
> > That shows every ebuild, you may want to reduce it to a list of
> > packages
> 
> > for i in $(grep -Erl 'inherit.*systemd' /var/portage)
> > do
> > 	dirname $i
> > done | sort -u
> 
> 
> Yea, sure, cool.  (THANKS). However, I was looking for (wink wink nudge
> nudge) something sexy, using VDB (/var/db/pkg/)

That only shows installed packages. If you want something a little more
portagey, you could use qgrep.


-- 
Neil Bothwick

Disinformation is not as good as datinformation.

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

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

end of thread, other threads:[~2015-02-21  1:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 20:38 [gentoo-user] which ebuilds use a specific eclass? James
2015-02-19 21:25 ` Neil Bothwick
2015-02-19 22:56   ` [gentoo-user] " James
2015-02-19 23:54     ` Neil Bothwick

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