Bug 151187 - 'cpan:' shortcut broken, gives wrong search results - (PATCH ATTACHED)
Summary: 'cpan:' shortcut broken, gives wrong search results - (PATCH ATTACHED)
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 3.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-22 17:53 UTC by Richard Hartmann
Modified: 2012-01-06 22:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1


Attachments
The patch from the initial bug report (485 bytes, patch)
2009-02-08 15:22 UTC, Christoph Burger-Scheidlin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Hartmann 2007-10-22 17:53:14 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Debian testing/unstable Packages

When you do not supply a second parameter, cpan: will default to dist. This makes searching for modules that do not have their own namespace impossible.

Test case:
http://search.cpan.org/search?mode=dist&query=POE%3A%3AWheel%3A%3ARun
http://search.cpan.org/search?query=POE%3A%3AWheel%3A%3ARun

As you can see, only the second query gives the expected result.

Fix:
Do not default to dist, default to empty

Patch:
--- /home/richih/.kde/share/services/searchproviders/cpan2.desktop      2007-10-22 17:51:30.169619342 +0200
+++ /home/richih/.kde/share/services/searchproviders/cpan3.desktop      2007-10-22 17:44:31.645768978 +0200
@@ -1,8 +1,8 @@
 [Desktop Entry]
 Charset=
 Hidden=false
-Query[en_US]=http://search.cpan.org/search?mode=\\{mode,2,"dist"}&query=\\{query,q,1}
+Query[en_US]=http://search.cpan.org/search?mode=\\{mode,2,""}&query=\\{query,q,1}
 ServiceTypes=SearchProvider
 Type=Service
Comment 1 Richard Hartmann 2007-12-18 18:55:35 UTC
In light of the impeding KDE4 release, I am going through all bug reports I am involved in. To the best of my knowledge, this issue is still open.
Comment 2 Christoph Burger-Scheidlin 2009-02-08 15:22:45 UTC
Created attachment 31125 [details]
The patch from the initial bug report

Credit to the original reporter, not my own work.
Attached solely so that bugzilla knows that there is a patch
Comment 3 Richard Hartmann 2009-02-08 16:06:21 UTC
Thanks for the housekeeping :)
Comment 4 Dawit Alemayehu 2012-01-03 21:01:15 UTC
This makes sense. I will see if I can commit this one for 4.8.0. Otherwise, it will have to wait for 4.8.1.
Comment 5 Dawit Alemayehu 2012-01-06 22:05:26 UTC
Git commit b70933b23e8d205957d6df99a3672ebec54d0c4e by Dawit Alemayehu.
Committed on 03/01/2012 at 21:59.
Pushed by adawit into branch 'KDE/4.8'.

When the second parameter is not specified default to empty not "dist".
FIXED-IN: 4.8.1

M  +90   -90   kurifilter-plugins/ikws/searchproviders/cpan.desktop

http://commits.kde.org/kde-runtime/b70933b23e8d205957d6df99a3672ebec54d0c4e
Comment 6 Dawit Alemayehu 2012-01-06 22:07:15 UTC
Git commit 3d78686e2592fca34ccfe068635d7c4c1fbfbed2 by Dawit Alemayehu.
Committed on 03/01/2012 at 21:59.
Pushed by adawit into branch 'master'.

When the second parameter is missing default to empty not "dist".
FIXED-IN: 4.8.1
(cherry picked from commit b0efe1cbe84b4eb2e78d28896a5c450c314ce2bc)

M  +90   -90   kurifilter-plugins/ikws/searchproviders/cpan.desktop

http://commits.kde.org/kde-runtime/3d78686e2592fca34ccfe068635d7c4c1fbfbed2