Description of problem: On a Proxy 5.4 activated on Red Hat Network Hosted, run rhn_package_manager with the -s (sync) option against a custom channel. The following traceback results: # rhn_package_manager -s -c <channel-label> -vvv Channels: <channel-label> Red Hat Network username: <rhn login> Red Hat Network password: <password> Connecting to https://xmlrpc.rhn.redhat.com/XP Traceback (most recent call last): File "/usr/bin/rhn_package_manager", line 28, in ? rhn_package_manager.main() File "/usr/share/rhn/PackageManager/rhn_package_manager.py", line 100, in main upload.checkSync() File "/usr/share/rhn/PackageManager/rhn_package_manager.py", line 174, in checkSync list = uploadLib.listChannel(self.server, self.username, self.password, AttributeError: 'module' object has no attribute 'listChannel' Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Activate Proxy 5.4 on RHN Hosted. 2. Attempt to run rhn_package_manager in sync mode (same traceback error results regardless of whether the channel or login credentials are valid: # rhn_package_manager -c test-channel -s Red Hat Network username: rhn-login Red Hat Network password: <password> 3. See above traceback error. Actual results: Above traceback error. Expected results: No traceback, diff output of channel on RHN with current directory. Additional info: Error is due to uploadLib.listChannel not being imported by rhn_package_manager.py. After making the following changes to /usr/share/rhn/PackageManager/rhn_package_manager.py, I was able to run the -s / --sync option successfully. *** # diff -pruN rhn_package_manager.py rhn_package_manager_test.py --- rhn_package_manager.py 2011-01-21 17:41:38.000000000 -0500 +++ rhn_package_manager_test.py 2011-01-21 17:40:20.000000000 -0500 @@ -39,6 +39,7 @@ import shutil from types import IntType, StringType from operator import truth from rhnpush.uploadLib import UploadError +from rhnpush.uploadLib import listChannel try: from optparse import Option, OptionParser except ImportError: @@ -171,7 +172,8 @@ class UploadClass(uploadLib.UploadClass) self.setServer() # List the channel's contents - list = uploadLib.listChannel(self.server, self.username, self.password, self.channels) + # list = uploadLib.listChannel(self.server, self.username, self.password, self.channels) + list = listChannel(self.server, self.username, self.password, self.channels) # Convert it to a hash of hashes remotePackages = {} ***
*** This bug has been marked as a duplicate of bug 677775 ***