apt aptitude inconsistent search results (regex)
March 26th, 2012 - 12:50 am ET by Ano Nymous | Report spam
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 t
p gstreamer0.10-plugins-bad-multi - GStreamer plugins from the "bad" set
(Mult
p gstreamer0.10-plugins-bad-multi - GStreamer plugins from the "bad" set
(Mult
i gstreamer0.10-plugins-ugly - GStreamer plugins from the "ugly"
set
p gstreamer0.10-plugins-ugly-dbg - GStreamer plugins from the "ugly" set
(deb
p 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 GStreamer
gstreamer0.10-plugins-bad - GStreamer plugins from the "bad" set
gstreamer0.10-plugins-ugly - GStreamer plugins from the "ugly" set
gstreamer0.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 "^mp\w*r$"
mp3blaster - Full-screen console mp3 and Ogg Vorbis player
mp3roaster - A Perl hack for burning audio CDs out of MP3/OGG/FLAC/WAV files
mplayer2 - next generation movie player for Unix-like systems
mplayer - movie player for Unix-like systems
"mplayer2" should have been excluded.
$ aptitude search "~n^mp\w*r$"
p mp3blaster - Full-screen console mp3 and Ogg
Vorbis pla
p mp3roaster - A Perl hack for burning audio CDs out
of M
i 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?
apt 0.8.16<br>aptitude 0.6.4<br><br>If I search for a package name (~n) then using '$' should prevent -dbg -doc -multi.<br>So I would consider the following results wrong:<br><span style="font-family:courier new,monospace">$ aptitude search "~ngstreamer(.+)-(ffmpeg|plugins-(ugly|bad))$"</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">i gstreamer0.10-ffmpeg - FFmpeg plugin for GStreamer </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">p gstreamer0.10-ffmpeg-dbg - FFmpeg plugin for GStreamer (debug symbols</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">i gstreamer0.10-plugins-bad - GStreamer plugins from the "bad" set </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">p gstreamer0.10-plugins-bad-dbg - GStreamer plugins from the "bad" set (debu</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">p gstreamer0.10-plugins-bad-doc - GStreamer documentation for plugins from t</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">p gstreamer0.10-plugins-bad-multi - GStreamer plugins from the "bad" set (Mult</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">p gstreamer0.10-plugins-bad-multi - GStreamer plugins from the "bad" set (Mult</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">i gstreamer0.10-plugins-ugly - GStreamer plugins from the "ugly" set </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">p gstreamer0.10-plugins-ugly-dbg - GStreamer plugins from the "ugly" set (deb</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">p gstreamer0.10-plugins-ugly-doc - GStreamer documentation for plugins from t</span><br>
<br>However, using the same regex with apt-cache yields the correct result:<br><span style="font-family:courier new,monospace">$ apt-cache search "^gstreamer(.+)-(ffmpeg|plugins-(ugly|bad|good))$"</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">gstreamer0.10-ffmpeg - FFmpeg plugin for GStreamer</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">gstreamer0.10-plugins-bad - GStreamer plugins from the "bad" set</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">gstreamer0.10-plugins-ugly - GStreamer plugins from the "ugly" set</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">gstreamer0.10-plugins-good - GStreamer plugins from the "good" set</span><br>
<br>The only way I can get aptitude to perform properly is by using the following regex:<br><span style="font-family:courier new,monospace">$ aptitude search "~ngstreamer(.+)-(ffmpeg$|plugins-(ugly$|bad$|good$))"</span><br>
<br>Which I would consider as wrong.<br>Another example, where aptitude is right and apt-cache is wrong:<br><span style="font-family:courier new,monospace">$ apt-cache search "^mp\w*r$"</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">mp3blaster - Full-screen console mp3 and Ogg Vorbis player</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">mp3roaster - A Perl hack for burning audio CDs out of MP3/OGG/FLAC/WAV files</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">mplayer2 - next generation movie player for Unix-like systems</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">mplayer - movie player for Unix-like systems</span><br>
<br>"mplayer2" should have been excluded. <br><br><span style="font-family:courier new,monospace">$ aptitude search "~n^mp\w*r$"</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">p mp3blaster - Full-screen console mp3 and Ogg Vorbis pla</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">p mp3roaster - A Perl hack for burning audio CDs out of M</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">i mplayer - movie player for Unix-like systems </span><br>
<br>For package names, ~n or ?name with aptitude is unnecessary, I used it in the previous examples for clarification.<br>I've read man 7 regex and I'm fairly sure those regexes are fine but many instances give wrong results.<br>
An application that gives expected results is grep, in particular grep -E.<br>Is this a known issue, or where am I going wrong?<br><br>
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CA+MSfsKVKz...mPMaNiWBfQ@mail.gmail.com
Similar topics
- Bug#692017: aptitude: package "hold" consistency between apt - aptitude - dpkg - synaptic
- apt / aptitude question
- Bug#701664: Aptitude 0.6.3-3.2+squeeze1 still ignores /etc/apt/preferences.d/*
- Bug#696411: aptitude: Missing dependency on apt?
- Bug#685310: aptitude: Apt::AutoRemove::SuggestsImportant defaults to true
- Bug#686016: aptitude: Mistake in Russian translation when using Apt::Get::AllowUnauthenticate "true";
- Bug#683859: aptitude: APT::Get::Build-Dep-Automatic is not honored
- Bug#685192: apt: redirection handling changes in 0.9.4 may break aptitude
- aptitude versus apt-get
- Bug#699191: aptitude don't depend on apt, but don't work correctly without apt
Make your own search :
Tags
Create a new topic
Follow the discussion
1 reply
Make a reply
May 23rd, 2013 - 6:25 AM ET
Join now


Replies