Bug 447387

Summary: Searching for exact package name only works for carefully selected definitions of "exact"
Product: [Retired] Red Hat Network Reporter: Stephen Herr <sherr>
Component: RHN/Web SiteAssignee: Sebastian Skracic <sskracic>
Status: CLOSED CURRENTRELEASE QA Contact: Amy Owens <aowens>
Severity: low Docs Contact:
Priority: low    
Version: rhn505CC: rhn-bugs, sskracic
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-25 13:03:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 457802    

Description Stephen Herr 2008-05-19 19:04:44 UTC
Description of problem:
Searching for an exact package name only works if you happen to guess right at
how exact the search wants you to be. Searching for just package name works.
Searching for name/version/epoch works. Searching for either name/version or
name/version/epoch/arch does not.

Version-Release number of selected component (if applicable):
Current

How reproducible:
Always

Steps to Reproduce:
1. Log into RHN and navigate to /rhn/channels/software/Search.do
2. Search for gnome-user
3. Search for gnome-user-docs
4. Search for gnome-user-docs-2.16.0-2
5. Search for gnome-user-docs-2.16.0-2.fc6
6. Search for gnome-user-docs-2.16.0-2.fc6.noarch
7. Search for gnome-user-docs-2.16.0-2.fc6.noarch.rpm
  
Actual results:
Steps 4, 6, and 7 fail to return any results.

Expected results:
All methods (except possibly the last one) should return results that include
that package. 

Additional info:
This appears to be more fuel for the fire in getting us to redo the search
mechanism. Ggainey's opinion is that this is not worth fixing (or maybe
impossible to fix) until then.

Comment 1 Sebastian Skracic 2008-08-14 08:52:32 UTC
Implemented in r118933.

Please note that (4) is probably mistyped - you meant "Search for gnome-user-docs-2.16.0", right?

Anyway, the way the current package search works is:

1. if .rpm is found at the end of the search string, it's simply discarded
2. the end of the resulting string is then checked for optional package arch specification, like .i386, .i686, .noarch etc.
3. after those transformations, it tries to extract name-version-release combo from the search string
4. if 3. can't be done, it tries name-version
5. if 4. can't be done, the remainder of the search string is treated as a package name

In any case, searches involving version and optional release tags perform an exact match on version/release, so eg. "gnome-user-docs-2.16.0-2" won't find any packages, since the release number "2" does not match.

Comment 2 Sebastian Skracic 2008-08-14 08:54:09 UTC
So, to summarize, all of the following now actually works:

1. Log into RHN and navigate to /rhn/channels/software/Search.do
2. Search for gnome-user
3. Search for gnome-user-docs
4. Search for gnome-user-docs-2.16.0
5. Search for gnome-user-docs-2.16.0-2.fc6
6. Search for gnome-user-docs-2.16.0-2.fc6.noarch
7. Search for gnome-user-docs-2.16.0-2.fc6.noarch.rpm

Comment 4 Stephen Herr 2008-09-03 18:27:42 UTC
verified in qa