public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Opportunities to use slot operators
@ 2013-04-14 13:09 Rich Freeman
  2013-04-14 13:23 ` [gentoo-dev] " Michael Palimaka
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Rich Freeman @ 2013-04-14 13:09 UTC (permalink / raw
  To: gentoo-dev

For whoever is interested I tossed together a script to identify
packages that would immediately benefit from slot operator
dependencies but which are not doing so.

The list can be found at:
http://dev.gentoo.org/~rich0/missedslotops.txt

This was generated by:
https://github.com/rich0/finddepslotops

Feel free to make use of either as you see fit, make improvements,
submit improvements, fork, whatever.  If one of your packages is on
the list feel free to update it!  (And yes, I realize that in many
cases this may have been done with newer versions of the packages not
on the list - I didn't make any attempts to filter that out.)

Also, I'm sure I've used the portage API in less-than-ideal ways.
Having not really used it before this was half a learning exercise.
Feel free to send me suggestions/pointers.  If somebody knows of an
easy way to process metadata in python (short of just parsing the xml
myself) let me know - I didn't see any kind of API for that.

Rich


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

* [gentoo-dev] Re: Opportunities to use slot operators
  2013-04-14 13:09 [gentoo-dev] Opportunities to use slot operators Rich Freeman
@ 2013-04-14 13:23 ` Michael Palimaka
  2013-04-14 17:11 ` [gentoo-dev] " Andreas K. Huettel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Michael Palimaka @ 2013-04-14 13:23 UTC (permalink / raw
  To: gentoo-dev

On 14/04/2013 23:09, Rich Freeman wrote:
> For whoever is interested I tossed together a script to identify
> packages that would immediately benefit from slot operator
> dependencies but which are not doing so.
>
> The list can be found at:
> http://dev.gentoo.org/~rich0/missedslotops.txt
>
> This was generated by:
> https://github.com/rich0/finddepslotops
>
> Feel free to make use of either as you see fit, make improvements,
> submit improvements, fork, whatever.  If one of your packages is on
> the list feel free to update it!  (And yes, I realize that in many
> cases this may have been done with newer versions of the packages not
> on the list - I didn't make any attempts to filter that out.)
>
> Also, I'm sure I've used the portage API in less-than-ideal ways.
> Having not really used it before this was half a learning exercise.
> Feel free to send me suggestions/pointers.  If somebody knows of an
> easy way to process metadata in python (short of just parsing the xml
> myself) let me know - I didn't see any kind of API for that.
>
> Rich
>
>

That's a very useful tool, thanks for making it.



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

* Re: [gentoo-dev] Opportunities to use slot operators
  2013-04-14 13:09 [gentoo-dev] Opportunities to use slot operators Rich Freeman
  2013-04-14 13:23 ` [gentoo-dev] " Michael Palimaka
@ 2013-04-14 17:11 ` Andreas K. Huettel
  2013-04-14 20:59 ` Zac Medico
  2013-04-15  9:39 ` Christopher Schwan
  3 siblings, 0 replies; 6+ messages in thread
From: Andreas K. Huettel @ 2013-04-14 17:11 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 1652 bytes --]

Am Sonntag, 14. April 2013, 15:09:13 schrieb Rich Freeman:
> For whoever is interested I tossed together a script to identify
> packages that would immediately benefit from slot operator
> dependencies but which are not doing so.
> 
> The list can be found at:
> http://dev.gentoo.org/~rich0/missedslotops.txt
> 

Please be careful with this... and think before you add the subslot 
dependency. Whether it makes sense depends a lot on the handling and on the 
maintainer of the package that you depend on.

Examples (yes I learned...):

1) Perl stuff
I *suspect* all KDE ebuilds depend on perl by default because the packages 
have to be able to run perl scripts. However, unless they install perl modules 
or link to libperl, there is absolutely no need to add a subslot dependency. 

2) Poppler
Poppler provides several libraries, and I set the subslot equal the major 
soversion of the one that is varied most frequently (libpoppler). 
If your application links to that, you should use a subslot dep.
If your application links to another library, you can use a subslot dep, but 
it will lead to some unneeded rebuilds.
If your application only uses the commandline tools installed by app-
text/poppler[utils], then there's no need to rebuild.

Actually I would like to recommend that we document the reason and recommended 
handling for the subslot somewhere for each package (unless it's trivial). For 
example, we could place something like the above text into dev-lang/perl or 
app-text/poppler metadata.xml.

-- 

Andreas K. Huettel
Gentoo Linux developer 
dilfridge@gentoo.org
http://www.akhuettel.de/


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

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

* Re: [gentoo-dev] Opportunities to use slot operators
  2013-04-14 13:09 [gentoo-dev] Opportunities to use slot operators Rich Freeman
  2013-04-14 13:23 ` [gentoo-dev] " Michael Palimaka
  2013-04-14 17:11 ` [gentoo-dev] " Andreas K. Huettel
@ 2013-04-14 20:59 ` Zac Medico
  2013-04-15  9:39 ` Christopher Schwan
  3 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2013-04-14 20:59 UTC (permalink / raw
  To: gentoo-dev

On 04/14/2013 06:09 AM, Rich Freeman wrote:
> Also, I'm sure I've used the portage API in less-than-ideal ways.
> Having not really used it before this was half a learning exercise.
> Feel free to send me suggestions/pointers.  If somebody knows of an
> easy way to process metadata in python (short of just parsing the xml
> myself) let me know - I didn't see any kind of API for that.

See the MetaDataXML class, in /usr/lib/portage/pym/portage/xml/metadata.py.
-- 
Thanks,
Zac


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

* Re: [gentoo-dev] Opportunities to use slot operators
  2013-04-14 13:09 [gentoo-dev] Opportunities to use slot operators Rich Freeman
                   ` (2 preceding siblings ...)
  2013-04-14 20:59 ` Zac Medico
@ 2013-04-15  9:39 ` Christopher Schwan
  2013-04-15 11:30   ` Rich Freeman
  3 siblings, 1 reply; 6+ messages in thread
From: Christopher Schwan @ 2013-04-15  9:39 UTC (permalink / raw
  To: gentoo-dev

On Sunday 14 April 2013 09:09:13 Rich Freeman wrote:
> For whoever is interested I tossed together a script to identify
> packages that would immediately benefit from slot operator
> dependencies but which are not doing so.
> 
> The list can be found at:
> http://dev.gentoo.org/~rich0/missedslotops.txt
> 
> This was generated by:
> https://github.com/rich0/finddepslotops
> 
> Feel free to make use of either as you see fit, make improvements,
> submit improvements, fork, whatever.  If one of your packages is on
> the list feel free to update it!  (And yes, I realize that in many
> cases this may have been done with newer versions of the packages not
> on the list - I didn't make any attempts to filter that out.)
> 
> Also, I'm sure I've used the portage API in less-than-ideal ways.
> Having not really used it before this was half a learning exercise.
> Feel free to send me suggestions/pointers.  If somebody knows of an
> easy way to process metadata in python (short of just parsing the xml
> myself) let me know - I didn't see any kind of API for that.
> 
> Rich

Is it possible to check a local overlay? Specifying CPV for a single ebuild 
works, but I wonder if its possible to parse an entire overlay at once.

Christopher



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

* Re: [gentoo-dev] Opportunities to use slot operators
  2013-04-15  9:39 ` Christopher Schwan
@ 2013-04-15 11:30   ` Rich Freeman
  0 siblings, 0 replies; 6+ messages in thread
From: Rich Freeman @ 2013-04-15 11:30 UTC (permalink / raw
  To: gentoo-dev

On Mon, Apr 15, 2013 at 5:39 AM, Christopher Schwan
<cschwan@students.uni-mainz.de> wrote:
> Is it possible to check a local overlay? Specifying CPV for a single ebuild
> works, but I wonder if its possible to parse an entire overlay at once.

The script already checks all configured overlays as well as the main
tree if you invoke it with no parameters.  However, I just added
metadata.xml parsing last night and it lacks error handling in the
event the file is not present.  So, you'll have to add this, wait
until I get a chance to add it, or use the older version of the script
if you want to process most overlays.

If you want to only process the overlay I suspect you could modify the
source to point to it (likely by changing the porttree
initialization).  Pointing PORTDIR in your environment to some copy of
portage minus the packages would likely work as well (I suspect it may
still need access to eclasses/etc).

Rich


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

end of thread, other threads:[~2013-04-15 11:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14 13:09 [gentoo-dev] Opportunities to use slot operators Rich Freeman
2013-04-14 13:23 ` [gentoo-dev] " Michael Palimaka
2013-04-14 17:11 ` [gentoo-dev] " Andreas K. Huettel
2013-04-14 20:59 ` Zac Medico
2013-04-15  9:39 ` Christopher Schwan
2013-04-15 11:30   ` Rich Freeman

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