[Slapt-get-user] Regex problem and exit codes

Jason Woodward woodwardj at jaos.org
Fri Feb 14 20:07:29 EST 2014


Hi George,

> > This should take care of slapt-src as well
> since it uses
> > the slapt-get library interface.
> 
> It works for
> slapt-get, but not
for slapt-src.

Oh right... apologies late night response and I mixed
gslapt/slapt-src.  I just pushed up the fix for slapt-src.

> And now I
also wonder about partial
> matches. Should
> slapt-src --search c++-gtk
>
find the c++-gtk-utils
> slackbuild?
> or
> slapt-get --search tk+3
> find
the gtk+3 package? Maybe when +
> is part of the search string it 
> should
be interpreted both as a regex and
> a literal character? I'm just 
>
throwing ideas...

Possibly.  It might make sense to try an escaped version
version of the name string.

> Yes, Rick's reply is indeed reasonable and I
was having thoughts about 
> --search too, but I thought I'd post about it
anyway. On the other hand 
> there are other tools that return non-0 even
when the program exits with 
> no problems but it finds nothing, for
example grep. Maybe having different 
> exit codes for different issues is
the answer? Like
> 0 - no problems at all
> 1 - unexpected exit, something
bad happened
> 2 - no match when trying to
> install a package
> 3 - no
match when searching
> 4 - error during --update
> etc... Maybe it's too
complex?

Seems needlessly complex.  Do you need something for wrapping
utilities?  It seems parsing empty search output is reasonable and non-zero
return for a more specific operation like show is correct.


take care,
jason
--
Jason Woodward


More information about the Slapt-get-user mailing list