Bug 506492 - pkg search not returning results
pkg search not returning results
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: John Matthews
wes hayutin
Depends On:
Blocks: 457073 486216
  Show dependency treegraph
Reported: 2009-06-17 10:21 EDT by wes hayutin
Modified: 2009-09-10 14:16 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-10 14:16:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description wes hayutin 2009-06-17 10:21:40 EDT
Description of problem:

6/16 build rhel 5

pkg search for any package

no results
Comment 1 wes hayutin 2009-06-17 11:35:14 EDT
The issue is actually a combination of other problems.  However for the purpose of this bug, we will narrow it down to pkg quick search should by default search *any* / *all* synced channels.
Comment 2 John Matthews 2009-06-17 13:05:24 EDT
Here's the fix

diff --git a/java/code/src/com/redhat/rhn/frontend/action/SearchAction.java b/java/code/src/com/redhat/rhn/frontend/action/SearchAction.java
index 317d68d..1bb28e8 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/SearchAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/SearchAction.java
@@ -17,6 +17,7 @@ package com.redhat.rhn.frontend.action;
 import com.redhat.rhn.common.util.ServletUtils;
 import com.redhat.rhn.domain.org.OrgFactory;
 import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.action.channel.PackageSearchAction;
 import com.redhat.rhn.frontend.action.common.BadParameterException;
 import com.redhat.rhn.frontend.action.systems.SystemSearchSetupAction;
 import com.redhat.rhn.frontend.struts.RequestContext;
@@ -98,6 +99,7 @@ public class SearchAction extends RhnAction {
                 HashMap attributes = new HashMap();
                 attributes.put("view_mode", "search_name_and_summary");
                 attributes.put(SystemSearchSetupAction.SEARCH_STRING, searchString);
+                attributes.put(PackageSearchAction.WHERE_CRITERIA, "architecture");
                 // select all the arches to make a better search
                 List<String> defaultArches = new ArrayList<String>();

 java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml           |   38 ++++++++++
 java/code/src/com/redhat/rhn/frontend/action/SearchAction.java                      |    2 
 java/code/src/com/redhat/rhn/frontend/action/channel/PackageNameOverviewAction.java |   19 ++++-
 java/code/src/com/redhat/rhn/frontend/action/channel/PackageSearchAction.java       |    3 
 java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java                 |   24 ++++++
 java/code/webapp/WEB-INF/pages/channel/packagesearch.jsp                            |    2 
 java/code/webapp/WEB-INF/pages/software/packages/packagenameoverview.jsp            |    1 
 7 files changed, 85 insertions(+), 4 deletions(-)

New commits:
commit cb6d4fb4d55283dc4a38cc9db1d89598cd41113e
Author: John Matthews <jmatthew@redhat.com>
Date:   Wed Jun 17 12:49:12 2009 -0400
Comment 3 wes hayutin 2009-06-22 10:14:30 EDT
verified 6/19
Comment 4 John Sefler 2009-08-20 11:36:59 EDT
Verified on staged iso (Satellite-5.3.0-RHEL5-re20090724.0)

Using the quick search at the top of the satellite GUI:

Packages tzdata Search

the top result listed in the result table was:
Package Name  	Summary
tzdata          Timezone data 

clicking on the package tzdata listed all of the tzdata-* packages for every RHEL channel my satellite was sync'ed to.

Comment 5 Brandon Perkins 2009-09-10 14:16:19 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.