Bug 682926

Summary: Catalog should provide correct error msg for incomplete rpm package
Product: [Retired] Red Hat Hardware Certification Program Reporter: QinXie <xiqin>
Component: Hardware CatalogAssignee: Wei Shen <wshen>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.3CC: hwcert-catalog, hwcert-reviewers, junwang, pxue, rlandry, tfu, wshen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-19 06:15:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 722937    

Description QinXie 2011-03-08 02:32:53 UTC
It's make sense to reject incomplete packages. But wrong error msg is always confusing people.

eg. https://hardware.redhat.com/show.cgi?id=681454#c12
The rpm is incomplete, but catalog reported as unknow v7 version.

Comment 4 Wei Shen 2011-07-19 07:12:07 UTC
Created attachment 513719 [details]
the 1st patch

Comment 5 Wei Shen 2011-07-19 07:13:26 UTC
please review this, I have applied patch on web2

Comment 6 Rob Landry 2011-07-20 15:32:37 UTC
hwcert.pl 

Lines 1032 - change is not related to this bug.

Lines 1230 - can the line be updated for readability?  Eg.  right now is says do c unless a = b; which is harder to read than if a = b do c (the abc ordering is more important than the keyword selection).  Yes they should function the same, but when reviewing code c is least interesting part not the most as the conditional matters more and if possible should be presented 1st.

user-error.html.tmpl - is this a user error?

line 410 - how about "The test suite version not found in INFO test." ; if there are no INFO tests that should be it's own error.

Comment 7 Wei Shen 2011-07-25 11:40:22 UTC
Lines 1032  yes, that is not related, I can drop this change
Lines 1230  I don't think this is a system error, user uploaded a wrong format of package, I think it should be a user error. 
line 410  "The test suite version not found in INFO test." seems not able to cover no info tests case. in the sample cert which xqin reported, it is caused by no info tests in package. it is too vague to say "The test suite version not found in INFO test."

Comment 8 Rob Landry 2011-07-25 15:38:40 UTC
(In reply to comment #7)

> Lines 1230  I don't think this is a system error, user uploaded a wrong format
> of package, I think it should be a user error. 

Ok

> line 410  "The test suite version not found in INFO test." seems not able to
> cover no info tests case. in the sample cert which xqin reported, it is caused
> by no info tests in package. it is too vague to say "The test suite version not
> found in INFO test."

Actually that's my point, there should be two errors.  1) version not found in INFO test and 2) the package appears correctly formed but there is no info test found.

Comment 9 Wei Shen 2011-08-15 08:05:36 UTC
the message has changed to what Rob suggested

Comment 10 Rob Landry 2011-08-15 17:32:38 UTC
Is there a patch/test site?

Comment 12 Pengfei Xue 2011-08-29 06:56:31 UTC
works on web2

test result package:

https://bugzilla.redhat.com/attachment.cgi?id=482711