public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] I want to steal your tools
@ 2008-02-03  6:54 Alec Warner
  2008-02-03  7:10 ` Hans de Graaff
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: Alec Warner @ 2008-02-03  6:54 UTC (permalink / raw
  To: gentoo-dev

So it seems to me that we have tons of tools out there that people
have writtten and we need to aggregrate and document them.

I don't care necessarily how shitty they are, how old they are, what
language they are in, or even who wrote them.  I care that they are
open source or public domain; that they are useful etc...

So reply with a URL pointing at your tool*.  Please don't attach your
tool to the email as that would make our mail server sad.  If you need
space; e-mail your tool to me (not the list) and I will host it
somewhere.

-Alec

* Tool being a tool useful for gentoo development, dealing with
profiles, ebuilds, configs, etc.  Tool does not include your penis or
other genitellia.
-- 
gentoo-dev@lists.gentoo.org mailing list



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

* Re: [gentoo-dev] I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
@ 2008-02-03  7:10 ` Hans de Graaff
  2008-02-03 12:48   ` [gentoo-dev] " Dirk Tilger
  2008-02-03 18:01   ` [gentoo-dev] " Mart Raudsepp
  2008-02-03  7:34 ` [gentoo-dev] " Christian Faulhammer
                   ` (7 subsequent siblings)
  8 siblings, 2 replies; 23+ messages in thread
From: Hans de Graaff @ 2008-02-03  7:10 UTC (permalink / raw
  To: gentoo-dev

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

On Sat, 2008-02-02 at 22:54 -0800, Alec Warner wrote:

> So reply with a URL pointing at your tool*. 

For XEmacs there is the pebuild script which tracks upstreams packages
and automatically bumps ebuilds for them when newer versions are
available: http://www.gentoo.org/proj/en/lisp/emacs/pebuild.gz

For Ruby Richard just wrote a similar tool to track which upstream gems
have a newer version available:
http://dev.gentoo.org/~rbrown/ruby_scripts/

Kind regards,

Hans

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

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

* [gentoo-dev] Re: I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
  2008-02-03  7:10 ` Hans de Graaff
@ 2008-02-03  7:34 ` Christian Faulhammer
  2008-02-03  7:56 ` [gentoo-dev] " Josh Saddler
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 23+ messages in thread
From: Christian Faulhammer @ 2008-02-03  7:34 UTC (permalink / raw
  To: gentoo-dev

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

Hi,

"Alec Warner" <antarus@gentoo.org>:
> So reply with a URL pointing at your tool*.  Please don't attach your
> tool to the email as that would make our mail server sad.  If you need
> space; e-mail your tool to me (not the list) and I will host it
> somewhere.

 <URL:http://gatt.sourceforge.net/> is definitely worth a try for all
arch workers (testers and developers).  It is a collaboration of
Matthias Langer (x86 AT), some random other people and myself (mostly
the manual).  I use it everyday and I think it saved me some hours of
my life I could spend with useless other things.

V-Li

-- 
Christian Faulhammer, Gentoo Lisp project
<URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

<URL:http://www.faulhammer.org/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
  2008-02-03  7:10 ` Hans de Graaff
  2008-02-03  7:34 ` [gentoo-dev] " Christian Faulhammer
@ 2008-02-03  7:56 ` Josh Saddler
  2008-02-03 11:53   ` Drake Wyrm
  2008-02-03 12:24 ` Fabian Groffen
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 23+ messages in thread
From: Josh Saddler @ 2008-02-03  7:56 UTC (permalink / raw
  To: gentoo-dev

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

Alec Warner wrote:
s/writtten/written

s/aggregrate/aggregate

s/genitellia/genitalia

app-doc/nightmorph, your spellchecking tool.


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

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

* Re: [gentoo-dev] I want to steal your tools
  2008-02-03  7:56 ` [gentoo-dev] " Josh Saddler
@ 2008-02-03 11:53   ` Drake Wyrm
  0 siblings, 0 replies; 23+ messages in thread
From: Drake Wyrm @ 2008-02-03 11:53 UTC (permalink / raw
  To: gentoo-dev

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

Josh Saddler <nightmorph@gentoo.org> wrote:
> s/writtten/written
> 
> s/aggregrate/aggregate
> 
> s/genitellia/genitalia
> 
> app-doc/nightmorph, your spellchecking tool.

line 1: unterminated `s' command

s/$/\//

sys-apps/sed, your stream editing tool.

-- 
There are problems in today's world that cannot be
solved by the level of thinking that created them.
  -- Albert Einstein

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [gentoo-dev] I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
                   ` (2 preceding siblings ...)
  2008-02-03  7:56 ` [gentoo-dev] " Josh Saddler
@ 2008-02-03 12:24 ` Fabian Groffen
  2008-02-03 16:05 ` Duncan Coutts
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 23+ messages in thread
From: Fabian Groffen @ 2008-02-03 12:24 UTC (permalink / raw
  To: gentoo-dev

On 02-02-2008 22:54:48 -0800, Alec Warner wrote:
> So it seems to me that we have tons of tools out there that people
> have writtten and we need to aggregrate and document them.

Questionable.

> I don't care necessarily how shitty they are, how old they are, what
> language they are in, or even who wrote them.  I care that they are
> open source or public domain; that they are useful etc...

Probably not that useful to loads of people, but anyway:
http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/scripts

eapify   - "smartly" inject EAPI="prefix" and do an automated conversion
           based on heuristics of the given ebuild to prefix gen 3
           format, "upgrades" from gen 1 and 2 to 3
deapify  - the reverse of eapify, but only for gen 3
ecleankw - apply an intersection between the ebuild's keywords and those
           allowed as per the script, drop all keywords back to
           unstable and convert them to prefix-style keywording
ecommit  - seems like an obsolete hack, don't use it
ecopy    - a webcvs-based script to import an ebuild from gentoo-x86
           into the prefix tree
eupdate  - a cvs-based script to import and update ebuilds in(to) the
           prefix tree, it fetches required patches and retrieves deltas
           over cvs to apply them to the local ebuild copy, as well as
           updating to new ebuild versions by applying the diff with the
           previous version as to retain local changes -- a horrible
           huge beast including an ebuild version comparator to determine
           version updates
portdupe - no idea

The directory treesync contains the scripts that are responsible for
what some people refer to as "commit spam".

 walker    - a script that walks over all packages and runs eupdate on
             them
 doupdates - helper to approve/commit updates in the correct order
 approve   - script that does the actual user input and repoman commit


-- 
Fabian Groffen
Gentoo on a different level
-- 
gentoo-dev@lists.gentoo.org mailing list



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

* [gentoo-dev]  Re: I want to steal your tools
  2008-02-03  7:10 ` Hans de Graaff
@ 2008-02-03 12:48   ` Dirk Tilger
  2008-02-03 18:01   ` [gentoo-dev] " Mart Raudsepp
  1 sibling, 0 replies; 23+ messages in thread
From: Dirk Tilger @ 2008-02-03 12:48 UTC (permalink / raw
  To: gentoo-dev

On 2008-02-03, Hans de Graaff <graaff@gentoo.org> wrote:
> For XEmacs there is the pebuild script which tracks upstreams packages
> and automatically bumps ebuilds for them when newer versions are
> available: http://www.gentoo.org/proj/en/lisp/emacs/pebuild.gz
>
> For Ruby Richard just wrote a similar tool to track which upstream gems
> have a newer version available:
> http://dev.gentoo.org/~rbrown/ruby_scripts/

It would be really really nice to have something like this operating on
big chunks of the tree (didn't want to use "entire").

Dirk.

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



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

* Re: [gentoo-dev] I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
                   ` (3 preceding siblings ...)
  2008-02-03 12:24 ` Fabian Groffen
@ 2008-02-03 16:05 ` Duncan Coutts
  2008-02-03 16:56 ` Ciaran McCreesh
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 23+ messages in thread
From: Duncan Coutts @ 2008-02-03 16:05 UTC (permalink / raw
  To: gentoo-dev; +Cc: haskell


On Sat, 2008-02-02 at 22:54 -0800, Alec Warner wrote:
> So it seems to me that we have tons of tools out there that people
> have writtten and we need to aggregrate and document them.
> 
> I don't care necessarily how shitty they are, how old they are, what
> language they are in, or even who wrote them.  I care that they are
> open source or public domain; that they are useful etc...
> 
> So reply with a URL pointing at your tool*.  Please don't attach your
> tool to the email as that would make our mail server sad.  If you need
> space; e-mail your tool to me (not the list) and I will host it
> somewhere.

The Haskell team wrote and use 'hackport', a tool for converting Haskell
Cabal packages into ebuilds:

emerge app-portage/hackport-darcs from the haskell overlay
or darcs get --partial http://haskell.org/~gentoo/hackport/

Usage:

# gets the package list from the hackage server
hackport update

# add a new ebuild into the local overlay
hackport merge xmonad

-- 
Duncan Coutts : Gentoo Developer (Haskell team)

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



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

* Re: [gentoo-dev] I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
                   ` (4 preceding siblings ...)
  2008-02-03 16:05 ` Duncan Coutts
@ 2008-02-03 16:56 ` Ciaran McCreesh
  2008-02-03 20:21 ` [gentoo-dev] " Ryan Hill
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 23+ messages in thread
From: Ciaran McCreesh @ 2008-02-03 16:56 UTC (permalink / raw
  To: gentoo-dev

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

On Sat, 2 Feb 2008 22:54:48 -0800
"Alec Warner" <antarus@gentoo.org> wrote:
> So reply with a URL pointing at your tool*.  Please don't attach your
> tool to the email as that would make our mail server sad.  If you need
> space; e-mail your tool to me (not the list) and I will host it
> somewhere.

adjutrix is a bunch of tools for repo and arch maintenance. Currently
distributed as part of paludis, http://paludis.pioto.org/, but doesn't
require a paludis configuration (or indeed a portage configuration) on
the system to run. Current actions are:

find-stable-candidates
  Search for stable package candidates

find-dropped-keywords
  Search for packages where keywords have been dropped

find-insecure-packages
  Search for packages marked as insecure by a GLSA

find-unused-packages
  Search package versions that can probably safely be removed

keyword-graph
  Display keywords graphically

reverse-deps
  Find all package that depend on a given dep spec

what-needs-keywording
  Display what needs to be done to keyword a target

display-default-system-resolution
  Display package names and versions that are included in the
  default resolution of the system set

build-downgrade-check-list
  Build the downgrade check lists

downgrade-check
  Perform the dowgrade check

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] I want to steal your tools
  2008-02-03  7:10 ` Hans de Graaff
  2008-02-03 12:48   ` [gentoo-dev] " Dirk Tilger
@ 2008-02-03 18:01   ` Mart Raudsepp
  1 sibling, 0 replies; 23+ messages in thread
From: Mart Raudsepp @ 2008-02-03 18:01 UTC (permalink / raw
  To: gentoo-dev

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


On P, 2008-02-03 at 08:10 +0100, Hans de Graaff wrote:
> On Sat, 2008-02-02 at 22:54 -0800, Alec Warner wrote:
> 
> > So reply with a URL pointing at your tool*. 
> 
> For XEmacs there is the pebuild script which tracks upstreams packages
> and automatically bumps ebuilds for them when newer versions are
> available: http://www.gentoo.org/proj/en/lisp/emacs/pebuild.gz
> 
> For Ruby Richard just wrote a similar tool to track which upstream gems
> have a newer version available:
> http://dev.gentoo.org/~rbrown/ruby_scripts/

The GNOME team uses a similar purpose tool for packages released to
GNOME mirrors.
It's currently maintained by dang on a git repository of his, located
here:
git://apollo.fprintf.net/depchecker

It produces a result like this:
http://dev.gentoo.org/~leio/gnome/gnome2.20.html

Which visualizes what version bumps we are missing for a given GNOME
release series.
There have been blue sky ideas how to improve something like this to a
lot more packages, including all hosted on GNOME mirrors and available
from gnomefiles.org lists (we have parse-able data available from them)
and more, but nothing has materialized as of yet.

-- 
Mart Raudsepp
Gentoo Developer
Mail: leio@gentoo.org
Weblog: http://planet.gentoo.org/developers/leio

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

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

* [gentoo-dev]  Re: I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
                   ` (5 preceding siblings ...)
  2008-02-03 16:56 ` Ciaran McCreesh
@ 2008-02-03 20:21 ` Ryan Hill
  2008-02-03 23:35 ` [gentoo-dev] " Petteri Räty
  2008-02-04 20:51 ` [gentoo-dev] " Ryan Hill
  8 siblings, 0 replies; 23+ messages in thread
From: Ryan Hill @ 2008-02-03 20:21 UTC (permalink / raw
  To: gentoo-dev

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

Alec Warner wrote:
> So it seems to me that we have tons of tools out there that people
> have writtten and we need to aggregrate and document them.

See pythonhead's script repo?  http://forums.gentoo.org/viewtopic-t-67849.html
I think it's been down for a while now though.


-- 
fonts,                                            by design, by neglect
gcc-porting,                              for a fact or just for effect
wxwindows @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662


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

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

* Re: [gentoo-dev] I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
                   ` (6 preceding siblings ...)
  2008-02-03 20:21 ` [gentoo-dev] " Ryan Hill
@ 2008-02-03 23:35 ` Petteri Räty
  2008-02-04 20:51 ` [gentoo-dev] " Ryan Hill
  8 siblings, 0 replies; 23+ messages in thread
From: Petteri Räty @ 2008-02-03 23:35 UTC (permalink / raw
  To: gentoo-dev

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

Alec Warner kirjoitti:
> So it seems to me that we have tons of tools out there that people
> have writtten and we need to aggregrate and document them.
 >

https://overlays.gentoo.org/svn/proj/java/scripts


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

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

* [gentoo-dev]  Re: I want to steal your tools
  2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
                   ` (7 preceding siblings ...)
  2008-02-03 23:35 ` [gentoo-dev] " Petteri Räty
@ 2008-02-04 20:51 ` Ryan Hill
  2008-02-04 21:59   ` Ryan Hill
                     ` (2 more replies)
  8 siblings, 3 replies; 23+ messages in thread
From: Ryan Hill @ 2008-02-04 20:51 UTC (permalink / raw
  To: gentoo-dev

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

Alec Warner wrote:

> * Tool being a tool useful for gentoo development, dealing with
> profiles, ebuilds, configs, etc.  Tool does not include your penis or
> other genitellia.

defeature: http://dev.gentoo.org/~dirtyepic/bin/defeature

   [requires app-portage/udept]
   disables FEATURES per-package, most common usage being
     defeature test coreutils

mklastrites: http://dev.gentoo.org/~dirtyepic/bin/mklastrites

   how i do the last rites mails.  was also an exercise in learning awk
   so don't make too much fun of me.

http://dev.gentoo.org/~dirtyepic/bin/cp2overlay

   yet another portage -> overlay copier
   [also requires app-portage/udept]


Can someone provide a tool that given a package name simply prints the category 
or cat/pkg, or if ambiguous, prints the multiple cat/pkgs or returns an error 
code?  I don't care what it's written in as long as it's relatively quick.  I'm 
sick of depending on udept (which is an incredible tool but a lot heavy for a 
simple shell script) just to get a simple category.

-- 
fonts,                                            by design, by neglect
gcc-porting,                              for a fact or just for effect
wxwindows @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662


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

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

* [gentoo-dev]  Re: I want to steal your tools
  2008-02-04 20:51 ` [gentoo-dev] " Ryan Hill
@ 2008-02-04 21:59   ` Ryan Hill
  2008-02-04 22:05     ` Ciaran McCreesh
  2008-02-04 22:53   ` Thomas de Grenier de Latour
  2008-02-05  1:50   ` Heath N. Caldwell
  2 siblings, 1 reply; 23+ messages in thread
From: Ryan Hill @ 2008-02-04 21:59 UTC (permalink / raw
  To: gentoo-dev

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

Ryan Hill wrote:

> Can someone provide a tool that given a package name simply prints the 
> category or cat/pkg, or if ambiguous, prints the multiple cat/pkgs or 
> returns an error code?  I don't care what it's written in as long as 
> it's relatively quick.  I'm sick of depending on udept (which is an 
> incredible tool but a lot heavy for a simple shell script) just to get a 
> simple category.

After getting a couple suggestions, I guess I forgot some requirements.

a) package-manager agnostic
b) using only tools in the system set + maybe gentoolkit and portage-utils

I want something that anybody can use in their scripts without having to install 
paludis, or eix, or udept, or etc.  Bonus points for actually integrating this 
feature into gentoolkit or portage-utils. ;)


-- 
fonts,                                            by design, by neglect
gcc-porting,                              for a fact or just for effect
wxwindows @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662


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

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

* Re: [gentoo-dev]  Re: I want to steal your tools
  2008-02-04 21:59   ` Ryan Hill
@ 2008-02-04 22:05     ` Ciaran McCreesh
  2008-02-04 22:29       ` Vlastimil Babka
  2008-02-04 22:42       ` Ryan Hill
  0 siblings, 2 replies; 23+ messages in thread
From: Ciaran McCreesh @ 2008-02-04 22:05 UTC (permalink / raw
  To: gentoo-dev

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

On Mon, 04 Feb 2008 15:59:26 -0600
Ryan Hill <dirtyepic@gentoo.org> wrote:
> I want something that anybody can use in their scripts without having
> to install paludis

What's the difference between installing Paludis and installing Perl in
order to use a tool?

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev]  Re: I want to steal your tools
  2008-02-04 22:05     ` Ciaran McCreesh
@ 2008-02-04 22:29       ` Vlastimil Babka
  2008-02-04 22:42       ` Ryan Hill
  1 sibling, 0 replies; 23+ messages in thread
From: Vlastimil Babka @ 2008-02-04 22:29 UTC (permalink / raw
  To: gentoo-dev

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

Ciaran McCreesh wrote:
> On Mon, 04 Feb 2008 15:59:26 -0600
> Ryan Hill <dirtyepic@gentoo.org> wrote:
>> I want something that anybody can use in their scripts without having
>> to install paludis
> 
> What's the difference between installing Paludis and installing Perl in
> order to use a tool?

About 10 minutes (YMMV)

      Mon Nov 19 22:26:38 2007 >>> dev-lang/perl-5.8.8-r4
        merge time: 6 minutes and 10 seconds.

      Wed Nov  7 12:46:01 2007 >>> sys-apps/paludis-0.24.6
        merge time: 16 minutes and 25 seconds.

-- 
Vlastimil Babka (Caster)
Gentoo/Java


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

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

* [gentoo-dev]  Re: I want to steal your tools
  2008-02-04 22:05     ` Ciaran McCreesh
  2008-02-04 22:29       ` Vlastimil Babka
@ 2008-02-04 22:42       ` Ryan Hill
  1 sibling, 0 replies; 23+ messages in thread
From: Ryan Hill @ 2008-02-04 22:42 UTC (permalink / raw
  To: gentoo-dev

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

Ciaran McCreesh wrote:
> On Mon, 04 Feb 2008 15:59:26 -0600 Ryan Hill <dirtyepic@gentoo.org> wrote:
>> I want something that anybody can use in their scripts without having to
>> install paludis
> 
> What's the difference between installing Paludis and installing Perl in order
> to use a tool?

Ha.  Nice edit.  What I actually said was:

> I want something that anybody can use in their scripts without having to
> install paludis, or eix, or udept, or etc.

Well, perl is already installed on my and everyone else's system.  Paludis was 
one example, but I would like it to work without having to install anything 
extra at all.  Otherwise I'd continue to use udept.

So, do you have such a solution or did you just pop up because someone said Paludis?


-- 
fonts,                                            by design, by neglect
gcc-porting,                              for a fact or just for effect
wxwindows @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662


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

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

* Re: [gentoo-dev]  Re: I want to steal your tools
  2008-02-04 20:51 ` [gentoo-dev] " Ryan Hill
  2008-02-04 21:59   ` Ryan Hill
@ 2008-02-04 22:53   ` Thomas de Grenier de Latour
  2008-02-04 23:03     ` Ryan Hill
  2008-02-05  1:50   ` Heath N. Caldwell
  2 siblings, 1 reply; 23+ messages in thread
From: Thomas de Grenier de Latour @ 2008-02-04 22:53 UTC (permalink / raw
  To: gentoo-dev

On 2008/02/04, Ryan Hill <dirtyepic@gentoo.org> wrote:
> 
> Can someone provide a tool that given a package name simply prints
> the category or cat/pkg, or if ambiguous, prints the multiple
> cat/pkgs or returns an error code?  I don't care what it's written in
> as long as it's relatively quick.

As long as you're only interrested in stuffs from the Portage tree,
and not overlays, and you have portage-utils installed along with its
post-sync hook, you can use one of this function:

find_cat1() {
   qsearch -CsN "^${1}$"
}

find_cat2() {
   sed -n "\\|/${1}/|s:/[^/]*\$::p" "${PORTDIR}"/.ebuild.x \
      | uniq
}

Note that find_cat1() is case-insensitive, probably not what you want.

And without portage-utils' ebuilds cache, this works too:

find_cat3() {
   pushd "${PORTDIR}" >/dev/null
   ls -1d $(sed "s:\$:/${1}:" profiles/categories) 2>/dev/null
   popd >/dev/null
}

Here are some benchs (real time, with 1 run from cold I/O cache, and
then 100 runs also from cold I/O cache, with "fuse" as argument): 

 * find_cat1:
   - 0m0.972s
   - 0m25.967s
(No real advantage... that's not the primary target of this applet.)

 * find_cat2:
   - 0m0.237s
   - 0m3.746s
(Acceptable in both cases.)

 * find_cat3:
   - 0m2.319s
   - 0m2.607s
(Really slow on first run, but really fast once the tree as been
walked.  May be a good choice in some contexts.)

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



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

* [gentoo-dev]  Re: I want to steal your tools
  2008-02-04 22:53   ` Thomas de Grenier de Latour
@ 2008-02-04 23:03     ` Ryan Hill
  0 siblings, 0 replies; 23+ messages in thread
From: Ryan Hill @ 2008-02-04 23:03 UTC (permalink / raw
  To: gentoo-dev

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

Thomas de Grenier de Latour wrote:
> On 2008/02/04, Ryan Hill <dirtyepic@gentoo.org> wrote:
>> Can someone provide a tool that given a package name simply prints
>> the category or cat/pkg, or if ambiguous, prints the multiple
>> cat/pkgs or returns an error code?  I don't care what it's written in
>> as long as it's relatively quick.
> 
> As long as you're only interrested in stuffs from the Portage tree,
> and not overlays, and you have portage-utils installed along with its
> post-sync hook, you can use one of this function:
> 
> find_cat1() {
>    qsearch -CsN "^${1}$"
> }
> 
> find_cat2() {
>    sed -n "\\|/${1}/|s:/[^/]*\$::p" "${PORTDIR}"/.ebuild.x \
>       | uniq
> }
> 
> Note that find_cat1() is case-insensitive, probably not what you want.
> 
> And without portage-utils' ebuilds cache, this works too:
> 
> find_cat3() {
>    pushd "${PORTDIR}" >/dev/null
>    ls -1d $(sed "s:\$:/${1}:" profiles/categories) 2>/dev/null
>    popd >/dev/null
> }
> 
> Here are some benchs (real time, with 1 run from cold I/O cache, and
> then 100 runs also from cold I/O cache, with "fuse" as argument): 
> 
>  * find_cat1:
>    - 0m0.972s
>    - 0m25.967s
> (No real advantage... that's not the primary target of this applet.)
> 
>  * find_cat2:
>    - 0m0.237s
>    - 0m3.746s
> (Acceptable in both cases.)
> 
>  * find_cat3:
>    - 0m2.319s
>    - 0m2.607s
> (Really slow on first run, but really fast once the tree as been
> walked.  May be a good choice in some contexts.)

Perfect!  I'll tinker with these and see what I come up with.

Thanks.


-- 
fonts,                                            by design, by neglect
gcc-porting,                              for a fact or just for effect
wxwindows @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662


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

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

* Re: [gentoo-dev]  Re: I want to steal your tools
  2008-02-04 20:51 ` [gentoo-dev] " Ryan Hill
  2008-02-04 21:59   ` Ryan Hill
  2008-02-04 22:53   ` Thomas de Grenier de Latour
@ 2008-02-05  1:50   ` Heath N. Caldwell
  2008-02-05  3:21     ` Ryan Hill
  2 siblings, 1 reply; 23+ messages in thread
From: Heath N. Caldwell @ 2008-02-05  1:50 UTC (permalink / raw
  To: gentoo-dev

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

On 2008-02-04 14:51, Ryan Hill wrote:
> Can someone provide a tool that given a package name simply prints the 
> category or cat/pkg, or if ambiguous, prints the multiple cat/pkgs or 
> returns an error code?  I don't care what it's written in as long as it's 
> relatively quick.  I'm sick of depending on udept (which is an incredible 
> tool but a lot heavy for a simple shell script) just to get a simple 
> category.

What about something like this:

--
#!/bin/bash

source /etc/make.globals
source /etc/make.conf

for i in ${PORTDIR} ${PORTDIR_OVERLAY}; do
	(cd $i; a=(*/$1); [ -e ${a[0]} ] && ls -1 -d */$1)
done | sort | uniq
--

It's really fast, at least.

-- 
Heath Caldwell - hncaldwell@csupomona.edu
Operating Systems Analyst - California State Polytechnic University, Pomona

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* [gentoo-dev]  Re: I want to steal your tools
  2008-02-05  1:50   ` Heath N. Caldwell
@ 2008-02-05  3:21     ` Ryan Hill
  2008-02-05  5:06       ` Jeroen Roovers
  2008-02-05 13:28       ` Santiago M. Mola
  0 siblings, 2 replies; 23+ messages in thread
From: Ryan Hill @ 2008-02-05  3:21 UTC (permalink / raw
  To: gentoo-dev

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

Heath N. Caldwell wrote:
> On 2008-02-04 14:51, Ryan Hill wrote:
>> Can someone provide a tool that given a package name simply prints the 
>> category or cat/pkg, or if ambiguous, prints the multiple cat/pkgs or 
>> returns an error code?  I don't care what it's written in as long as it's 
>> relatively quick.  I'm sick of depending on udept (which is an incredible 
>> tool but a lot heavy for a simple shell script) just to get a simple 
>> category.
> 
> What about something like this:
> 
> --
> #!/bin/bash
> 
> source /etc/make.globals
> source /etc/make.conf
> 
> for i in ${PORTDIR} ${PORTDIR_OVERLAY}; do
> 	(cd $i; a=(*/$1); [ -e ${a[0]} ] && ls -1 -d */$1)
> done | sort | uniq
> --
> 
> It's really fast, at least.

Also very good, thanks.  Instead of sourcing, we can instead use

$ portageq envvar PORTDIR
$ portageq portdir_overlay

How do paludis and pkgcore make this info available?


-- 
fonts,                                            by design, by neglect
gcc-porting,                              for a fact or just for effect
wxwindows @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662


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

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

* Re: [gentoo-dev]  Re: I want to steal your tools
  2008-02-05  3:21     ` Ryan Hill
@ 2008-02-05  5:06       ` Jeroen Roovers
  2008-02-05 13:28       ` Santiago M. Mola
  1 sibling, 0 replies; 23+ messages in thread
From: Jeroen Roovers @ 2008-02-05  5:06 UTC (permalink / raw
  To: gentoo-dev

On Mon, 04 Feb 2008 21:21:14 -0600
Ryan Hill <dirtyepic@gentoo.org> wrote:

> Also very good, thanks.  Instead of sourcing, we can instead use
> 
> $ portageq envvar PORTDIR

Or simply `portageq portdir'...

> $ portageq portdir_overlay

I remember reading you wanted a program that did the job *fast*.

Calling portageq takes around 2 (VIA EPIA M10000) to 3 (HP
Visualize C3650) or more seconds to return on (some|older) systems.


Kind regards,
      JeR
-- 
gentoo-dev@lists.gentoo.org mailing list



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

* Re: [gentoo-dev] Re: I want to steal your tools
  2008-02-05  3:21     ` Ryan Hill
  2008-02-05  5:06       ` Jeroen Roovers
@ 2008-02-05 13:28       ` Santiago M. Mola
  1 sibling, 0 replies; 23+ messages in thread
From: Santiago M. Mola @ 2008-02-05 13:28 UTC (permalink / raw
  To: gentoo-dev

On Feb 5, 2008 4:21 AM, Ryan Hill <dirtyepic@gentoo.org> wrote:
> Heath N. Caldwell wrote:
> > On 2008-02-04 14:51, Ryan Hill wrote:
> >> Can someone provide a tool that given a package name simply prints the
> >> category or cat/pkg, or if ambiguous, prints the multiple cat/pkgs or
> >> returns an error code?  I don't care what it's written in as long as it's
> >> relatively quick.  I'm sick of depending on udept (which is an incredible
> >> tool but a lot heavy for a simple shell script) just to get a simple
> >> category.
> >
> > What about something like this:
> >
> > --
> > #!/bin/bash
> >
> > source /etc/make.globals
> > source /etc/make.conf
> >
> > for i in ${PORTDIR} ${PORTDIR_OVERLAY}; do
> >       (cd $i; a=(*/$1); [ -e ${a[0]} ] && ls -1 -d */$1)
> > done | sort | uniq
> > --
> >
> > It's really fast, at least.
>
> Also very good, thanks.  Instead of sourcing, we can instead use
>
> $ portageq envvar PORTDIR
> $ portageq portdir_overlay
>
> How do paludis and pkgcore make this info available?

You can get PORTDIR with:
paludis --configuration-variable gentoo location

AFAIK, PORTDIR_OVERLAY is more tricky:
for r in $(paludis --list-repositories | sed -e "s/^*\ //g") ; do
    if [[ $(paludis --configuration-variable ${r} format) = "ebuild" ]] ; then
        paludis --configuration-variable ${r} location
    fi
done


-- 
Santiago M. Mola
Jabber ID: cooldwind@gmail.com
-- 
gentoo-dev@lists.gentoo.org mailing list



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

end of thread, other threads:[~2008-02-05 13:29 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-03  6:54 [gentoo-dev] I want to steal your tools Alec Warner
2008-02-03  7:10 ` Hans de Graaff
2008-02-03 12:48   ` [gentoo-dev] " Dirk Tilger
2008-02-03 18:01   ` [gentoo-dev] " Mart Raudsepp
2008-02-03  7:34 ` [gentoo-dev] " Christian Faulhammer
2008-02-03  7:56 ` [gentoo-dev] " Josh Saddler
2008-02-03 11:53   ` Drake Wyrm
2008-02-03 12:24 ` Fabian Groffen
2008-02-03 16:05 ` Duncan Coutts
2008-02-03 16:56 ` Ciaran McCreesh
2008-02-03 20:21 ` [gentoo-dev] " Ryan Hill
2008-02-03 23:35 ` [gentoo-dev] " Petteri Räty
2008-02-04 20:51 ` [gentoo-dev] " Ryan Hill
2008-02-04 21:59   ` Ryan Hill
2008-02-04 22:05     ` Ciaran McCreesh
2008-02-04 22:29       ` Vlastimil Babka
2008-02-04 22:42       ` Ryan Hill
2008-02-04 22:53   ` Thomas de Grenier de Latour
2008-02-04 23:03     ` Ryan Hill
2008-02-05  1:50   ` Heath N. Caldwell
2008-02-05  3:21     ` Ryan Hill
2008-02-05  5:06       ` Jeroen Roovers
2008-02-05 13:28       ` Santiago M. Mola

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