Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 307030 Details for
Bug 444778
FEAT: HwCert catalog will retire and stop accepting rhr2 results
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch Improve:
rhr2_retire.patch (text/plain), 7.25 KB, created by
XINSUN
on 2008-05-29 11:14:11 UTC
(
hide
)
Description:
Patch Improve:
Filename:
MIME Type:
Creator:
XINSUN
Created:
2008-05-29 11:14:11 UTC
Size:
7.25 KB
patch
obsolete
>Index: hwcert.pl >=================================================================== >RCS file: /cvs/qa/hwcert/hwcert.pl,v >retrieving revision 1.52 >diff -u -r1.52 hwcert.pl >--- hwcert.pl 16 May 2008 16:34:27 -0000 1.52 >+++ hwcert.pl 29 May 2008 10:55:40 -0000 >@@ -1006,6 +1006,7 @@ > my $bug_id = shift @_; > my $filename = shift @_; > my $attachid = shift @_; >+ my $allowrhr2 = shift @_; > my ($data) = @_; > > # Process a results rpm inserting test results into the cert database >@@ -1020,10 +1021,21 @@ > return; > } > >+ > # Just attach the file if it's not a results package. >- if (RpmProvides($rpmlocation) !~ /hts|rhr2/ ){ >- UnlinkPath($rpmlocation); >- return; >+ my $rpm_type = RpmProvides($rpmlocation); >+ if ($rpm_type !~ /hts/) { >+ if ($rpm_type =~ /rhr2/ && $allowrhr2 ne "1") { >+ #Stop accepting RHR2 test result package while the allowrhr2 checkbox is not clicked. >+ UnlinkPath($rpmlocation); >+ ThrowUserError("obsolete_rhr2_package",{ filename => $filename }); >+ } elsif ($rpm_type =~ /rhr2/ && $allowrhr2 eq "1") { >+ #When allowrhr2 checkbox is clicked by hwcert_edit,catalog will accept the RHR2 package back. >+ } else { >+ #The attachment is not either HTS or RHR2 result package, return directly. >+ UnlinkPath($rpmlocation); >+ return; >+ } > } > > my $comment; >Index: attachment.cgi >=================================================================== >RCS file: /cvs/qa/hwcert/attachment.cgi,v >retrieving revision 1.12 >diff -u -r1.12 attachment.cgi >--- attachment.cgi 1 May 2008 14:36:43 -0000 1.12 >+++ attachment.cgi 29 May 2008 10:55:41 -0000 >@@ -957,9 +957,13 @@ > my $comment = "Created an attachment (id=$attachid) $filename\n"; > $comment .= ("\n" . $::FORM{'comment'} . "\n") if $::FORM{'comment'}; > >- # Support hwcert results package parsing >- if ( $contenttype =~ /redhat-package-manager|x-rpm|octet-stream|x-pn-realaudio/) { >- $comment .= processResultsRpm($::FORM{'bugid'}, $filename, $attachid, $data); >+ my $attachasfile= $::FORM{'attachasfile'}; >+ my $allowrhr2 = $::FORM{'allowrhr2'}; >+ >+ # Support hwcert results package parsing when mimetype is right and checkbox "attachasfile" isn't checked. >+ if ( $contenttype =~ /redhat-package-manager|x-rpm|octet-stream|x-pn-realaudio/ && $attachasfile ne "1") >+ { >+ $comment .= processResultsRpm($::FORM{'bugid'}, $filename, $attachid, $allowrhr2, $data ); > } > > use Text::Wrap; >Index: post.cgi >=================================================================== >RCS file: /cvs/qa/hwcert/post.cgi,v >retrieving revision 1.56 >diff -u -r1.56 post.cgi >--- post.cgi 16 May 2008 16:51:26 -0000 1.56 >+++ post.cgi 29 May 2008 10:55:41 -0000 >@@ -155,6 +155,20 @@ > # Move file to final resting place > $rpmlocation = CreateRpm($md5sum, $filename, $data); > >+ # Judge the rpm result package's type. >+ my @cmdargs = qq(/bin/rpm -qp $rpmlocation --qf "%{PROVIDES}"); >+ my $rpm_type = `@cmdargs`; >+ >+ if ($rpm_type !~ /hts/) { >+ UnlinkPath($rpmlocation); >+ if ($rpm_type =~ /rhr2/) { >+ #Stop accepting rhr2 result packages. >+ ThrowUserError("obsolete_rhr2_package",{ filename => $filename }); >+ } else { >+ ThrowUserError("hts_package_required"); >+ } >+ } >+ > # Check to make sure log files do not exceed maximum size limit > my $result = CheckMaxFileSize($rpmlocation); > if ($result) { >Index: template/en/default/bug/upload_packages.html.tmpl >=================================================================== >RCS file: /cvs/qa/hwcert/template/en/default/bug/upload_packages.html.tmpl,v >retrieving revision 1.2 >diff -u -r1.2 upload_packages.html.tmpl >--- template/en/default/bug/upload_packages.html.tmpl 15 Feb 2008 22:27:38 -0000 1.2 >+++ template/en/default/bug/upload_packages.html.tmpl 29 May 2008 10:55:41 -0000 >@@ -1,4 +1,16 @@ > [% IF canedit && !isduplicate && bug.bug_status!='CLOSED' %] >+ <script> >+ function rhr2infilename(){ >+ var filename= document.getElementById("data").value; >+ var rpm_pattern = /.+\.rpm$/; >+ var rhr2_pattern = /rhr2/; >+ if(rpm_pattern.test(filename) && rhr2_pattern.test(filename)){ >+ document.getElementById("attachasfile").checked=1; >+ } else { >+ document.getElementById("attachasfile").checked=0; >+ } >+ } >+ </script> > <hr/> > > <h3>Upload Results Package or Specification Document</h3> >@@ -13,7 +25,7 @@ > <input type="hidden" name="action" value="insert"> > <input type="hidden" name="contenttypemethod" value="autodetect"> > <em>Enter the path to the results package or spec file on your computer.</em><br/> >- <input type="file" name="data" size="50"> >+ <input type="file" name="data" id="data" size="50" onchange="rhr2infilename()" > > </td> > </tr> > <tr> >@@ -30,6 +42,22 @@ > <textarea wrap="soft" name="comment" rows="6" cols="80"></textarea> > </td> > </tr> >+ <tr> >+ <td> >+ </td> >+ <td> >+ <input type="checkbox" name="attachasfile" id="attachasfile" value="1" [% IF UserInGroup('hwcert_edit') %] onclick="if(this.checked){document.getElementById('allowrhr2').disabled=1;}else{document.getElementById('allowrhr2').disabled=0;}"[% END %]> Attach AS A Common File.<br> >+ </td> >+ </tr> >+ [% IF UserInGroup('hwcert_edit') %] >+ <tr> >+ <td> >+ </td> >+ <td> >+ <input type="checkbox" name="allowrhr2" id="allowrhr2" value="1" onclick="if(this.checked){document.getElementById('attachasfile').disabled=1;}else{document.getElementById('attachasfile').disabled=0;}" > Allow RHR2 Results Package.<br> >+ </td> >+ </tr> >+ [% END %] > </table> > <p> > <input type="submit" name="Attach" value="Attach File"> >Index: template/en/default/global/user-error.html.tmpl >=================================================================== >RCS file: /cvs/qa/hwcert/template/en/default/global/user-error.html.tmpl,v >retrieving revision 1.13 >diff -u -r1.13 user-error.html.tmpl >--- template/en/default/global/user-error.html.tmpl 29 Feb 2008 12:17:12 -0000 1.13 >+++ template/en/default/global/user-error.html.tmpl 29 May 2008 10:55:41 -0000 >@@ -445,6 +445,10 @@ > Sorry, you aren't a member of the 'editkeywords' group, and so > you aren't allowed to add, modify or delete keywords. > >+ [% ELSIF error == "hts_package_required" %] >+ [% title = "HTS Package Required" %] >+ You must upload the HTS test result package as the Certification Package. >+ > [% ELSIF error == "hwcert_group_access_denied" %] > [% title = "Access Denied" %] > Only member of hwcert_edit group can do "[% action FILTER html %]". >@@ -647,6 +651,10 @@ > Either no products have been defined to enter [% terms.bugs %] against or you have not > been given access to any. > >+ [% ELSIF error == "obsolete_rhr2_package" %] >+ [% title = "Obsolete RHR2 Package" %] >+ [% filename FILTER html %] appears to be of type <i>RHR2 Results Package</i>. RHR2 has been obsoleted by HTS. Please retest using HTS and resubmit the results package. >+ > [% ELSIF error == "old_password_incorrect" %] > [% title = "Incorrect Old Password" %] > You did not enter your old password correctly.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 444778
:
305340
|
305742
|
307030
|
307171
|
310015