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 305742 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]
Improve patch:
rhr2.patch (text/plain), 7.16 KB, created by
XINSUN
on 2008-05-16 20:13:44 UTC
(
hide
)
Description:
Improve patch:
Filename:
MIME Type:
Creator:
XINSUN
Created:
2008-05-16 20:13:44 UTC
Size:
7.16 KB
patch
obsolete
>Index: hwcert.pl >=================================================================== >RCS file: /cvs/qa/hwcert/hwcert.pl,v >retrieving revision 1.50 >diff -u -r1.50 hwcert.pl >--- hwcert.pl 14 May 2008 05:45:08 -0000 1.50 >+++ hwcert.pl 16 May 2008 20:08:08 -0000 >@@ -1006,6 +1002,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,14 +1017,26 @@ > return; > } > >+ my $comment; >+ > # 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 "allow") { >+ #Stop accepting RHR2 test result package while the allowrhr2 checkbox is not clicked. >+ $comment = "\n'$filename' appears to be of type rhr2 results package. rhr2 has been >+obsoleted by hts. Please retest using hts and resubmit the results package."; >+ UnlinkPath($rpmlocation); >+ return $comment; >+ } elsif ($rpm_type =~ /rhr2/ && $allowrhr2 eq "allow") { >+ #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; >- > # Verify we haven't already seen this package > SendSQL2("SELECT filename FROM cert_rpms WHERE md5sum = " . SqlQuote($md5sum)); > FetchOneColumn2() && ThrowUserError("duplicate_attachment"); >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 16 May 2008 20:08:08 -0000 >@@ -147,7 +147,8 @@ > validateDescription(); > validateContentType() unless $::FORM{'ispatch'}; > validateObsolete() if $::FORM{'obsolete'}; >- insert($data); >+ my $allowrhr2 = $::FORM{'allowrhr2'}; >+ insert($data,$allowrhr2); > } > elsif ($action eq "edit") > { >@@ -916,7 +917,7 @@ > > sub insert > { >- my ($data) = @_; >+ my ($data,$allowrhr2) = @_; > > # Insert a new attachment into the database. > >@@ -959,7 +960,7 @@ > > # Support hwcert results package parsing > if ( $contenttype =~ /redhat-package-manager|x-rpm|octet-stream|x-pn-realaudio/) { >- $comment .= processResultsRpm($::FORM{'bugid'}, $filename, $attachid, $data); >+ $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.54 >diff -u -r1.54 post.cgi >--- post.cgi 14 May 2008 06:01:26 -0000 1.54 >+++ post.cgi 16 May 2008 20:08:09 -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: attach.cgi >=================================================================== >RCS file: /cvs/qa/hwcert/attach.cgi,v >retrieving revision 1.31 >diff -u -r1.31 attach.cgi >--- attach.cgi 14 May 2008 06:05:30 -0000 1.31 >+++ attach.cgi 16 May 2008 20:08:09 -0000 >@@ -114,6 +114,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); >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 16 May 2008 20:08:09 -0000 >@@ -30,6 +30,15 @@ > <textarea wrap="soft" name="comment" rows="6" cols="80"></textarea> > </td> > </tr> >+ [% IF UserInGroup('hwcert_edit') %] >+ <tr> >+ <td> >+ </td> >+ <td> >+ <input type="checkbox" name="allowrhr2" value="allow"> 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 16 May 2008 20:08:10 -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