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-12-2011, 05:17 PM
Camaleón
 
Default apt-cache regex question

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
 
Old 03-12-2011, 06:25 PM
Camaleón
 
Default 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
 
Old 03-12-2011, 07:09 PM
Dom
 
Default 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

Archive: 4D7BD2F9.1080900@rpdom.net">http://lists.debian.org/4D7BD2F9.1080900@rpdom.net
 
Old 03-12-2011, 08:06 PM
Camalen
 
Default apt-cache regex question

On Sat, 12 Mar 2011 20:09:29 +0000, Dom wrote:

> On 12/03/11 19:25, Camalen wrote:

(...)

>> 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
 
Old 03-13-2011, 12:58 PM
Camalen
 
Default 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 :-)

Done:

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

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.13.13.58.51@gmail.com">http://lists.debian.org/pan.2011.03.13.13.58.51@gmail.com
 
Old 03-13-2011, 01:55 PM
Dom
 
Default 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 :-)


Done:

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



Thank you,

I should have thought about looking at the buglists when I spotted the
"Provides" entry.


--
Dom


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4D7CDAF4.6030900@rpdom.net">http://lists.debian.org/4D7CDAF4.6030900@rpdom.net
 
Old 03-13-2011, 04:22 PM
Πρεκατές Αλέξανδρος
 
Default apt-cache regex question

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?


eg:
$apt-cache --names-only search '^a'
...
xul-ext-adblock-plus
...

$ 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
 

Thread Tools




All times are GMT. The time now is 04:33 PM.

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