Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239443 - www-client/surfraw - genpkg elvi converts slashes to %2F, packages.g.o returns 404
Summary: www-client/surfraw - genpkg elvi converts slashes to %2F, packages.g.o return...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Jeroen Roovers (RETIRED)
URL: http://packages.gentoo.org/package/ww...
Whiteboard:
Keywords:
Depends on:
Blocks: 323385
  Show dependency tree
 
Reported: 2008-10-03 15:35 UTC by Jeroen Roovers (RETIRED)
Modified: 2010-07-08 04:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
surfraw-2.2.2-remove_genpkg_quoting.patch (surfraw-2.2.2-remove_genpkg_quoting.patch,497 bytes, patch)
2008-11-29 05:07 UTC, James Rowe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2008-10-03 15:35:45 UTC
jeroen@elmer ~ $ sr -browser=echo genpkg www-client/surfraw
The requested URL /package/www-client/surfraw was not found on this
   server.

jeroen@elmer ~ $ sr -browser=echo genpkg www-client/surfraw
http://packages.gentoo.org/package/www-client%2Fsurfraw

The genpkg elvi converts slashes to %2F by default.

jeroen@elmer ~ $ sr -escape-url-args=no -browser=echo genpkg www-client/surfraw
http://packages.gentoo.org/package/www-client/surfraw

I wonder whether this used to work on packages.g.o and stopped working after the rewrite. In the latter case, the elvi should be adapted to the new allowed URL scheme.
Comment 1 James Rowe 2008-11-29 05:04:52 UTC
  [Sorry for not replying earlier, but the bugmail landed in my spam folder
and I only check that at the end of the month.]

* Jeroen Roovers (jer@gentoo.org) wrote:
> I wonder whether this used to work on packages.g.o and stopped working
> after the rewrite. In the latter case, the elvi should be adapted to the
> new allowed URL scheme.

  I hadn't noticed this since I didn't even realise the service was back
online, I've been using something else since about a week after it was
taking down for the security problems.

  Anyhow, there are three choices and the first two are quick fixes:

  1. Just dump it, genportage exists in the newest version in the tree
     (looks like basically a sed of genpkg that opens gentoo-portage.com)
  2. Apply the attached fix as a simple workaround, pending new upstream
     release
  3. Hope that the search functionality mentioned in the FAQ[1] is coming
     soon, or is implemented and just not documented, and update the
     elvi to use that then.

  The reason I'm offering up this here before taking a fix upstream is
to see if you think it is valuable enough to fix *properly* when there
is the gentoo-portage.com elvi already available.  I can't really see
a use case and would probably suggest removal, but I'll make and
attempt to upstream a proper fix if you think it adds value.

Thanks,

James

1. http://packages.gentoo.org/faq/
Comment 2 James Rowe 2008-11-29 05:07:06 UTC
Created attachment 173724 [details, diff]
surfraw-2.2.2-remove_genpkg_quoting.patch

This patch just removes *all* URL encoding for genpkg, as packages can't
include any of the other encoded characters in their name it shouldn't
reduce functionality.

The patch applies clean to both versions in the tree, or a simple
`sed -i 16iSURFRAW_escape_url_args=0 elvi/genpkg` does the same trick(it
is how I did the edit for the patch ;) ).
Comment 3 James Rowe 2010-02-17 11:44:17 UTC
(In reply to comment #1)
>   3. Hope that the search functionality mentioned in the FAQ[1] is coming
>      soon, or is implemented and just not documented, and update the
>      elvi to use that then.

  It has been two years, so I think option 3 is off the table.

  I'm leaning heavily toward the "just dump the genpkg elvi" option still, any
extra input before I push the change?
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-02-17 19:18:17 UTC
Remove your quoting in generating that argument. I'm pretty sure it's not valid like that. (Alternatively, if you can prove per HTTP specs that I should treat the URLs that same, I'll see about the packages.g.o end).
Comment 5 James Rowe 2010-02-17 20:13:12 UTC
(In reply to comment #4)
> Remove your quoting in generating that argument. I'm pretty sure it's not valid
> like that.

  My bad.  That wasn't really what I referring to, I should have been more 
clear. 

  Removing the quoting never really seemed like a worthwhile long term change.  
Every other search tool in the surfraw package hits a search page, as a user 
I'd expect genpkg to show me search results with "genpkg nvidia" not just 
redirect me to the front page.  And, this is the reason I came back to this bug 
today as I received a bug report about just that behaviour.

  I should have referenced the final paragraph of comment #1 when I phrased my
question.  I'll try again: am I missing a compelling reason to keep the 
packages.gentoo.org elvi when an alternative with search exists(genportage 
which uses gentoo-portage.com).
Comment 6 James Rowe 2010-05-08 07:59:11 UTC
Bug #318947 contains a bump request for the v2.2.7 release, which has removed 
the genpkg evli.