[Bug 673654] New: package/search finds packages in nonexistant projects
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c0 Summary: package/search finds packages in nonexistant projects Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jw@novell.com QAContact: adrian@novell.com Found By: --- Blocker: --- osc cat 'https://api.opensuse.org/search/package?match=%40name+%3D+%27bird%27' returns <collection> <package project="Ports:DebianBased:Auto" name="bird"> ... but osc ls Ports:DebianBased:Auto fails with 404. package search should not return this bogus result. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c wei wang <wewang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wewang@novell.com AssignedTo|bnc-team-screening@forge.pr |adrian@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c1 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P1 - Urgent Version|unspecified |2.2 Component|BuildService |backend CC| |jansimon.moeller@opensuse.o | |rg, mls@novell.com AssignedTo|adrian@novell.com |mls@novell.com Target Milestone|--- |2.2 Product|openSUSE.org |openSUSE Build Service Severity|Normal |Critical --- Comment #1 from Adrian Schröter <adrian@novell.com> 2011-02-21 08:50:28 UTC --- Actually it does exist, the project is just hidden. One of the cases where the new OBS 2.2 feature of hiding projects is not yet working. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c2 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|backend |api AssignedTo|mls@novell.com |adrian@novell.com --- Comment #2 from Adrian Schröter <adrian@novell.com> 2011-02-21 08:51:34 UTC --- most likely an api issue (not sure yet) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c3 --- Comment #3 from Jan-Simon Möller <jansimon.moeller@opensuse.org> 2011-02-21 10:18:31 UTC --- def search(what, render_all) predicate = predicate_from_match_parameter(params[:match]) logger.debug "searching in #{what}s, predicate: '#{predicate}'" xe = XpathEngine.new begin collection = xe.find("/#{what}[#{predicate}]", params.slice(:sort_by, :order)) rescue XpathEngine::IllegalXpathError => e render_error :status => 400, :message => "illegal xpath %s (#{e.message})" % predicate return end output = String.new output << "<?xml version='1.0' encoding='UTF-8'?>\n" output << "<collection>\n" collection.uniq! collection.each do |item| if item.kind_of? DbPackage or item.kind_of? DbProject # already checked in this case ########## <=== seems not checked, yet elsif item.kind_of? Repository # This returns nil if access is not allowed next unless DbProject.find_by_id item.db_project_id else render_error :status => 400, :message => "unknown object received from collection %s (#{item.inspect})" % predicate return end str = (render_all ? item.to_axml : item.to_axml_id) output << str.split(/\n/).map {|l| " "+l}.join("\n") + "\n" end output << "</collection>\n" render :text => output, :content_type => "text/xml" end -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c4 --- Comment #4 from Adrian Schröter <adrian@novell.com> 2011-02-21 10:38:25 UTC --- Yes, but the problem is that Collection is returing these packages at all (or we have leaks also at other places). also the package check there should not be needed. Sascha is currently looking at this issue. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c5 --- Comment #5 from Juergen Weigert <jw@novell.com> 2011-02-21 11:36:17 UTC --- http://software.opensuse.org/search? seems unaffected, although I had a hard time to verify. Suffering from hundreds of Thunderbird substring matches :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c6 --- Comment #6 from Juergen Weigert <jw@novell.com> 2011-02-22 18:25:55 UTC --- crude workaround: http://gitorious.org/opensuse/osc/commit/d7a1428d69475ad6ce8fcbdccda6cfe7e66... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=673654 https://bugzilla.novell.com/show_bug.cgi?id=673654#c7 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #7 from Adrian Schröter <adrian@novell.com> 2011-02-23 20:48:34 UTC --- fixed now -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com