FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-26-2012, 04:40 AM
Ano Nymous
 
Default apt aptitude inconsistent search results (regex)

apt 0.8.16
aptitude 0.6.4

If I search for a package name (~n) then using '$' should prevent -dbg -doc -multi.
So I would consider the following results wrong:
$ aptitude search "~ngstreamer(.+)-(ffmpeg|plugins-(ugly|bad))$"
i** gstreamer0.10-ffmpeg*********** - FFmpeg plugin for GStreamer************** p** gstreamer0.10-ffmpeg-dbg******* - FFmpeg plugin for GStreamer (debug symbols
i** gstreamer0.10-plugins-bad****** - GStreamer plugins from the "bad" set***** p** gstreamer0.10-plugins-bad-dbg** - GStreamer plugins from the "bad" set (debu
p** gstreamer0.10-plugins-bad-doc** - GStreamer documentation for plugins from tp** gstreamer0.10-plugins-bad-multi - GStreamer plugins from the "bad" set (Mult
p** gstreamer0.10-plugins-bad-multi - GStreamer plugins from the "bad" set (Multi** gstreamer0.10-plugins-ugly***** - GStreamer plugins from the "ugly" set****
p** gstreamer0.10-plugins-ugly-dbg* - GStreamer plugins from the "ugly" set (debp** gstreamer0.10-plugins-ugly-doc* - GStreamer documentation for plugins from t


However, using the same regex with apt-cache yields the correct result:
$ apt-cache search "^gstreamer(.+)-(ffmpeg|plugins-(ugly|bad|good))$"
gstreamer0.10-ffmpeg - FFmpeg plugin for GStreamergstreamer0.10-plugins-bad - GStreamer plugins from the "bad" set
gstreamer0.10-plugins-ugly - GStreamer plugins from the "ugly" setgstreamer0.10-plugins-good - GStreamer plugins from the "good" set


The only way I can get aptitude to perform properly is by using the following regex:
$ aptitude search "~ngstreamer(.+)-(ffmpeg$|plugins-(ugly$|bad$|good$))"


Which I would consider as wrong.
Another example, where aptitude is right and apt-cache is wrong:
$* apt-cache search "^mpw*r$"
mp3blaster - Full-screen console mp3 and Ogg Vorbis playermp3roaster - A Perl hack for burning audio CDs out of MP3/OGG/FLAC/WAV files
mplayer2 - next generation movie player for Unix-like systemsmplayer - movie player for Unix-like systems


"mplayer2" should have been excluded.*

$* aptitude search "~n^mpw*r$"p** mp3blaster********************* - Full-screen console mp3 and Ogg Vorbis pla
p** mp3roaster********************* - A Perl hack for burning audio CDs out of Mi** mplayer************************ - movie player for Unix-like systems*


For package names, ~n or ?name with aptitude is unnecessary, I used it in the previous examples for clarification.
I've read man 7 regex and I'm fairly sure those regexes are fine but many instances give wrong results.

An application that gives expected results is grep, in particular grep -E.
Is this a known issue, or where am I going wrong?
 
Old 03-26-2012, 11:54 AM
"Christofer C. Bell"
 
Default apt aptitude inconsistent search results (regex)

On Sun, Mar 25, 2012 at 11:40 PM, Ano Nymous <qubital@gmail.com> wrote:
>
> I've read man 7 regex and I'm fairly sure those regexes are fine but many
> instances give wrong results.
> An application that gives expected results is grep, in particular grep -E.
> Is this a known issue, or where am I going wrong?

The closest bug I could find in aptitude having to do with regex was this one:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403631

This is a wishlist bug and has nothing to do with what you've found.
I'd guess no bug has been submitted for this issue so you might
consider opening one.

--
Chris


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOEVnYuKnBUcKeegdrY3ehGtXj=mw4Pjp5ZEMLwKvx1_WG4-KA@mail.gmail.com">http://lists.debian.org/CAOEVnYuKnBUcKeegdrY3ehGtXj=mw4Pjp5ZEMLwKvx1_WG4-KA@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 10:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org