The webpage, http://packages.gentoo.org/ doesn't have a "Search" function for locating an individual package. Is this expected? This is the first time in over a year, that I've visited this page, but I remember it used to have that capability.
It's a totally new codebase, this was discussed previously. Use google to search it for now: "site:packages.gentoo.org FOO", this is done via OpenSearch as well.
This is not a satisfying answer. How hard is it to put a search field right on the web page? The search engine can still be Google if you think that's best.
Created attachment 162768 [details, diff] This is a patch that adds a search feature to the package.g.o website Features: - searches changelog, description and package name - also support for atomic search style (like "sys-apps/portage" or "=>sys-apps/portage-1.0") BUT: the two tables must be altered like this: alter table metadata add fulltext (changelog, description); alter table packages add fulltext (pn);
(In reply to comment #3) > - also support for atomic search style (like "sys-apps/portage" or > "=>sys-apps/portage-1.0") Sorry, the last line must be: ">=sys-apps/portage-1.0")
1. Are you sure your version comparator code is right? It looks like you are just trying string comparisons on the pv column, which isn't how Portage does it. 2. Please patch dbgenerator/database.py with your schema changes. 3, Some of the code I need to look at more closely to ensure it's not possible to perform SQL injection.
"alter table metadata add fulltext (changelog, description);" That's not valid postgres at all...
(In reply to comment #5) > 1. Are you sure your version comparator code is right? It looks like you are > just trying string comparisons on the pv column, which isn't how Portage does > it. Nope, you're right. I can "steal" this code from portage. > 2. Please patch dbgenerator/database.py with your schema changes. >"alter table metadata add fulltext (changelog, description);" >That's not valid postgres at all... That's mysql.
Sorry, my keyboard fucked up. That's mysql. I glaced over and there doesn't exist a proper full text search syntax standard. > 3, Some of the code I need to look at more closely to ensure it's not possible > to perform SQL injection. Do so and tell me if you find anything.
Is it possible to add support for regular expressions to the searchfunction?
Can we add a Google search box on packages.g.o? As it stands it really sucks that it doesn't have a search capability (drives the site's utility way down) and most users won't know that the official policy is "use Google to search the site".
Why not make http://packages.larrythecow.org/ -> packages.gentoo.org ?
Geez this is ridiculous. Everyone agrees it's possible and it's still not done after a year and a half of waiting.
Created attachment 222389 [details, diff] Adds a search box that will redirect to a site:p.g.o google search Why not something a lot simpler gents? How bout a javascript based redirect to a google site:packages.gentoo.org style search? Tested in IE8 and FF but should work fine just bout any browser.
John: thanks for the nice start. I'm not sure that redirect you're generating is correct however. Can you ensure it's correctly URL-encoded? Also, jQuery has some better handling of the element issue there, maybe nick a bit of that?
Ok, if you want to use Google, please don't use javascript because Gentoo users are likely to use a non-js browser. <form method="get" action="http://www.google.com/custom"> <input type="submit" name="sa" value="Search" /> <input type="text" name="q" size="20" maxlength="255" value="" /> <input type="hidden" name="sitesearch" value="packages.gentoo.org" /> </form>
(In reply to comment #15) > Ok, if you want to use Google, please don't use javascript because Gentoo users > are likely to use a non-js browser. > > <form method="get" action="http://www.google.com/custom"> > <input type="submit" name="sa" value="Search" /> > <input type="text" name="q" size="20" maxlength="255" value="" /> > <input type="hidden" name="sitesearch" value="packages.gentoo.org" /> > </form> > Ooo even simpler, I like it. :) You going to patchify that? I can if you don't want too but I woudln't want to steal credit.
Created attachment 222497 [details, diff] Manuel Schoelling's form based google site search box Hopefully if we give Robin enough options he'll have to commit one of them just to get us to leave him alone. :)
(In reply to comment #16) > Ooo even simpler, I like it. :) You going to patchify that? I can if you don't > want too but I woudln't want to steal credit. Sorry, I'm stuck in another project. Thanks for patchifying.
Live now, thanks for the commits.