On Sun, 13 Mar 2011 19:22:38 +0200, *ρεκατ*ς Αλ*ξανδρος wrote:
> apt-cache --names-only search '^a' except from packages name started
> with 'a' (intented) will also give packages that they have a source
> file whos name starts with 'a'. is that an error?
(...)
Hum... from man "apt-cache" page:
search regex [ regex ... ]
search performs a full text search on all available package lists for
the POSIX regex pattern given, see regex(7). *It searches the package
names and the descriptions for an occurrence of the regular expression*
^^^^^^^^^^^^^^^^^^^^
(...)
(bolded text is mine)
So, no, I think you are getting the documented behaviour ;-)
Greetings,
--
Camaleón
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.03.12.18.17.47@gmail.com">http://lists.debian.org/pan.2011.03.12.18.17.47@gmail.com
03-12-2011, 06:25 PM
Camaleón
apt-cache regex question
On Sat, 12 Mar 2011 18:17:47 +0000, Camaleón wrote:
> On Sun, 13 Mar 2011 19:22:38 +0200, *ρεκατ*ς Αλ*ξανδρος wrote:
>
>> apt-cache --names-only search '^a' except from packages name started
>> with 'a' (intented) will also give packages that they have a source
>> file whos name starts with 'a'. is that an error?
>
> (...)
>
> Hum... from man "apt-cache" page:
>
> search regex [ regex ... ]
> search performs a full text search on all available package lists for
> the POSIX regex pattern given, see regex(7). *It searches the package
> names and the descriptions for an occurrence of the regular expression*
> ^^^^^^^^^^^^^^^^^^^^
> (...)
>
> (bolded text is mine)
>
> So, no, I think you are getting the documented behaviour ;-)
No, wait, the above argument has a big hole. Man page continues (I did
not carefully read, my bad...):
***
If --full is given then output identical to show is produced for each
matched package, and if --names-only is given then the long description
is not searched, only the package name is.
***
So indeed, only package name should be queried in the regex which does
not seem to be the case. I also get false positives, for example:
sm01@stt008:~$ apt-cache --names-only search "^a" | grep sleepd
sleepd - puts an inactive or low battery laptop to sleep
But here, even the source package is named "sleepd", why the regex is
catching this? A bug? :-?
Greetings,
--
Camaleón
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.03.12.19.25.05@gmail.com">http://lists.debian.org/pan.2011.03.12.19.25.05@gmail.com
03-12-2011, 07:09 PM
Dom
apt-cache regex question
On 12/03/11 19:25, Camaleón wrote:
On Sat, 12 Mar 2011 18:17:47 +0000, Camaleón wrote:
On Sun, 13 Mar 2011 19:22:38 +0200, *ρεκατ*ς Αλ*ξανδρος wrote:
apt-cache --names-only search '^a' except from packages name started
with 'a' (intented) will also give packages that they have a source
file whos name starts with 'a'. is that an error?
(...)
Hum... from man "apt-cache" page:
search regex [ regex ... ]
search performs a full text search on all available package lists for
the POSIX regex pattern given, see regex(7). *It searches the package
names and the descriptions for an occurrence of the regular expression*
^^^^^^^^^^^^^^^^^^^^
(...)
(bolded text is mine)
So, no, I think you are getting the documented behaviour ;-)
No, wait, the above argument has a big hole. Man page continues (I did
not carefully read, my bad...):
***
If --full is given then output identical to show is produced for each
matched package, and if --names-only is given then the long description
is not searched, only the package name is.
***
So indeed, only package name should be queried in the regex which does
not seem to be the case. I also get false positives, for example:
sm01@stt008:~$ apt-cache --names-only search "^a" | grep sleepd
sleepd - puts an inactive or low battery laptop to sleep
But here, even the source package is named "sleepd", why the regex is
catching this? A bug? :-?
I suspect the man page is a bit ambiguous. It looks like --names-only
searches on things other than package name, but not the long
description. Possibly matching on "Provides: apm-sleep"
--
Dom
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>> So indeed, only package name should be queried in the regex which does
>> not seem to be the case. I also get false positives, for example:
>>
>> sm01@stt008:~$ apt-cache --names-only search "^a" | grep sleepd sleepd
>> - puts an inactive or low battery laptop to sleep
>>
>> But here, even the source package is named "sleepd", why the regex is
>> catching this? A bug? :-?
>
> I suspect the man page is a bit ambiguous. It looks like --names-only
> searches on things other than package name, but not the long
> description. Possibly matching on "Provides: apm-sleep"
That's it!
WISHLIST: apt-cache search and Provides:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=98695
The manual page should be then updated accordingly to reflect the current
status of the "--names-only" argument :-)
Greetings,
--
Camalen
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.03.12.21.06.58@gmail.com">http://lists.debian.org/pan.2011.03.12.21.06.58@gmail.com
03-13-2011, 12:58 PM
Camalen
apt-cache regex question
On Sat, 12 Mar 2011 21:06:58 +0000, Camalen wrote:
(...)
> The manual page should be then updated accordingly to reflect the
> current status of the "--names-only" argument :-)
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.03.13.13.58.51@gmail.com">http://lists.debian.org/pan.2011.03.13.13.58.51@gmail.com
03-13-2011, 01:55 PM
Dom
apt-cache regex question
On 13/03/11 13:58, Camalen wrote:
On Sat, 12 Mar 2011 21:06:58 +0000, Camalen wrote:
(...)
The manual page should be then updated accordingly to reflect the
current status of the "--names-only" argument :-)
Hi
apt-cache --names-only search '^a' except from
packages name started with 'a' (intented) will also give
packages that they have a source file whos name starts with
'a'. is that an error?
$ apt-cache show xul-ext-adblock-pl
ackage: xul-ext-adblock-plus
Priority: optional
Section: web
Installed-Size: 1480
Maintainer: Dmitry E. Oboukhov <unera@debian.org>
Architecture: all
Source: adblock-plus
Version: 1.2.1-1
alexander.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201103131922.38720.aprekates@gmail.com">http://lists.debian.org/201103131922.38720.aprekates@gmail.com