Re: Announcing pkg_search

2007-12-04 Thread Matthew Dillon
:Hi guys,
:
:I wrote a small script called pkg_search to help me searching my local  
:pkgsrc tree for a package without using bmake search key=.  Its not  
:a big deal, but it eases my daily pkg_add life a bit :)
:
:Example:
:
:# pkg_search fvwm
:fvwm-2.4.20Newer version of X11 Virtual window manager
:fvwm-2.5.24Development version of X11 Virtual window manager
:fvwm-themes-0.6.2nb8   Configuration framework for fvwm2 with samples
:fvwm-wharf-1.0nb1  Copy of AfterStep's Wharf compatible with fvwm2
:fvwm1-1.24rnb1 Virtual window manager for X

Oooh, nice, I've always wanted a little program to do that.

While it may not be the correct place, I don't want to lose this little
tidbit so I am going to import it directly into our /usr/bin.  We can
always clean it up later but being a nice simple little script I don't
think we need to create a contrib infrastructure for it.

-Matt
Matthew Dillon 
[EMAIL PROTECTED]


Re: Announcing pkg_search

2007-12-04 Thread Justin C. Sherrill
On Tue, December 4, 2007 1:18 pm, Matthew Dillon wrote:
 :# pkg_search fvwm
 :fvwm-2.4.20  Newer version of X11 Virtual window manager
 :fvwm-2.5.24  Development version of X11 Virtual window manager
 :fvwm-themes-0.6.2nb8 Configuration framework for fvwm2 with samples
 :fvwm-wharf-1.0nb1Copy of AfterStep's Wharf compatible with fvwm2
 :fvwm1-1.24rnb1   Virtual window manager for X

If Matthias or someone wants to add this feature suggestion (I won't have
any spare time in the next few days): it'd be nice if pkg_search returned
the detailed description for something when there was only one match for
the search term.  i.e. default to the -i results when the only match is
the explicit package.

This is similar to the search on pkgsrc.se, where if the package name you
search for is an exact match, you go right to the page for it instead of
having to click through a search results page with only one result.




Re: Announcing pkg_search

2007-12-04 Thread Matthias Schmidt

Hi,

On 04.12.2007, at 19:34, Justin C. Sherrill wrote:


On Tue, December 4, 2007 1:18 pm, Matthew Dillon wrote:

:# pkg_search fvwm
:fvwm-2.4.20Newer version of X11 Virtual window manager
:fvwm-2.5.24 	Development version of X11 Virtual window  
manager

:fvwm-themes-0.6.2nb8   Configuration framework for fvwm2 with samples
:fvwm-wharf-1.0nb1  Copy of AfterStep's Wharf compatible with fvwm2
:fvwm1-1.24rnb1 Virtual window manager for X


If Matthias or someone wants to add this feature suggestion (I won't  
have
any spare time in the next few days): it'd be nice if pkg_search  
returned
the detailed description for something when there was only one match  
for
the search term.  i.e. default to the -i results when the only match  
is

the explicit package.


Sure, sounds nice.  I'll have a look after it and report back.

Regards,

Matthias



Re: Announcing pkg_search

2007-12-04 Thread Magnus Eriksson
On Tue, 4 Dec 2007, Matthias Schmidt wrote:

 it'd be nice if pkg_search returned the detailed description for 
 something when there was only one match for the search term.

 Sure, sounds nice.  I'll have a look after it and report back.

   That'd be bad if you ever want to use it in a script though.

   And a program that changes its output in unexpected ways?  Yuck. 
(Imagine if ls did that...)


MAgnus



Re: Announcing pkg_search

2007-12-04 Thread Justin C. Sherrill
On Tue, December 4, 2007 7:05 pm, Magnus Eriksson wrote:
 On Tue, 4 Dec 2007, Matthias Schmidt wrote:

That'd be bad if you ever want to use it in a script though.

And a program that changes its output in unexpected ways?  Yuck.
 (Imagine if ls did that...)

It'd be relatively easy to add a switch to force always list behavior,
which is less common than the need to get detailed info.  Plus, it's
pretty easy to tell which behavior you would get depending on if a version
number is included.



Announcing pkg_search

2007-12-03 Thread Matthias Schmidt

Hi guys,

I wrote a small script called pkg_search to help me searching my local  
pkgsrc tree for a package without using bmake search key=.  Its not  
a big deal, but it eases my daily pkg_add life a bit :)


Example:

# pkg_search fvwm
fvwm-2.4.20 Newer version of X11 Virtual window manager
fvwm-2.5.24 Development version of X11 Virtual window manager
fvwm-themes-0.6.2nb8Configuration framework for fvwm2 with samples
fvwm-wharf-1.0nb1   Copy of AfterStep's Wharf compatible with fvwm2
fvwm1-1.24rnb1  Virtual window manager for X

# pkg_search -i fvwm-2.5.24
Name: fvwm-2.5.24-50
Dir : wm/fvwm-devel
Desc: Development version of X11 Virtual window manager
URL : any
Deps: perl=5.0
[...]

You can find it and a man page here:

http://www.mathematik.uni-marburg.de/~schmidtm/pkg_search/

BTW:  It works under FreeBSD as well.  {Net,Open}BSD might work as  
well (with possible adoption), but I don't have machines here to test.


Regards,

Matthias


--
Dipl.-Inf. Matthias Schmidt [EMAIL PROTECTED]
Dept. of Mathematics and Computer Science, Distributed Systems Group
Philipps-University of Marburg, Hans-Meerwein-Strasse, 35032 Marburg
Tel: +49-6421-2821591, Fax: +49-6421-2821573, Office C4347