Bug 1256918

Summary: rhn-push fails when rpm has a package group specified as None (PATCH)
Product: [Community] Spacewalk Reporter: Grant Gainey <ggainey>
Component: ServerAssignee: Grant Gainey <ggainey>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.3CC: ggainey, jdobes, mmello, satqe-list, shughes, xdmoon
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-2.4.16-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1218762 Environment:
Last Closed: 2015-10-08 13:27:05 UTC Type: Bug
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: 1218762    
Bug Blocks: 465198, 1127217, 1267654    

Description Grant Gainey 2015-08-25 18:14:46 UTC
+++ This bug was initially created as a clone of Bug #1218762 +++

Description of problem:

rhn push fails to upload a rpm when the package group is None. the following stack trace occurs and 500 is thrown: 

Exception Handler Information
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheUploadServer.py", line 100, in _wrapper
    ret = function(req)
  File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 124, in handler
    relative_path=self.rel_package_path, org_id=self.org_id)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnPackageUpload.py", line 129, in push_package
    header_end=a_pkg.header_end, channels=channels)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/mpmSource.py", line 225, in create_package
    header_end=header_end, channels=channels)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/headerSource.py", line 451, in createPackage
    channels)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/headerSource.py", line 152, in populate
    self['package_group'] = self['package_group'].rstrip()
AttributeError: 'NoneType' object has no attribute 'rstrip'

will be adding a patch to the bz. 

--- Additional comment from Shannon Hughes on 2015-05-05 15:36:08 EDT ---

patch to handle package groups that are not set in the rpm meta data. I believe this might have to do with the rpm build version. When I build a rpm with no Group then it shows up as Unspecified so modified to the import lib code to handle in the same way.

Comment 1 Grant Gainey 2015-08-25 20:07:17 UTC
spacewalk.github fcd7882388ef62c6272922daa6966e3733d4a4fb

Comment 2 Jan Dobes 2015-10-08 13:27:05 UTC
Spacewalk 2.4 has been released.