Bug 54687

Summary: syntax warnings and import error
Product: [Retired] Red Hat Public Beta Reporter: John Killian O'Brien <jkobrien>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED NOTABUG QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: roswellCC: gafton, mihai.ibanescu, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-10-24 21:02:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description John Killian O'Brien 2001-10-16 11:30:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-0.18 i686)

Description of problem:
up2date reports five syntax warnings and an import error and then exits
without connecting to the redhat server

Version-Release number of selected component (if applicable):
2.6.0-7.x.38

How reproducible:
Always

Steps to Reproduce:
1. Upgrade to roswell (from 7.1)
2. Log on as root
3. type /usr/sbin/up2date --nox -p (or any other switch)
 

Actual Results:  I get the following error messages...

/usr/sbin/up2date:533: SyntaxWarning: name 'progressCurrent' is used prior
to global declaration
  def rpmCallback(what, amount, total, hdr, path):
/usr/sbin/up2date:533: SyntaxWarning: name 'hashesPrinted' is assigned to
before global declaration
  def rpmCallback(what, amount, total, hdr, path):
/usr/sbin/up2date:533: SyntaxWarning: name 'lastPercent' is assigned to
before global declaration
  def rpmCallback(what, amount, total, hdr, path):
/usr/sbin/up2date:533: SyntaxWarning: name 'progressTotal' is assigned to
before global declaration
  def rpmCallback(what, amount, total, hdr, path):
/usr/sbin/up2date:533: SyntaxWarning: name 'progressCurrent' is assigned to
before global declaration
  def rpmCallback(what, amount, total, hdr, path):
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 9, in ?
    import rpm
ImportError: No module named rpm



Expected Results:  up2date should connect to the redhat server and, in this
case, synchronise my profile with my actual list of installed rpms.

Additional info:

This is also the case with up2date --nox -l, or up2date --config or
anything else that I have tried.

rhn_register gives me...
Traceback (most recent call last):
  File "/usr/sbin/rhn_register", line 14, in ?
    import rhnreg
  File "/usr/share/rhn/register/rhnreg.py", line 8, in ?
    import xmlrpclib, cgiwrap
ImportError: No module named cgiwrap

I'll file this as a separate bug report if you feel it's unrelated.

rpm -q up2date rhn_register rpm rpm-python python-xmlrpc

up2date-2.6.0-7.x.38
rhn_register-1.4.1-5
rpm-4.0.3-1.04
rpm-python-4.0.3-1.04
python-xmlrpc-1.5.0-1

Comment 1 Adrian Likins 2001-10-24 21:02:43 UTC
These should be fixed in the current version of the code (7.2 final)

Comment 2 John Killian O'Brien 2001-10-31 17:01:13 UTC
No, an upgrade to 7.2 (Enigma) didn't take care of the problem. 
At least not directly. However when I compared the version numbers
of the rpms in Enigma with the versions I had installed, I noticed that
I had python-2.2-0.4a4, where Enigma used 1.5.something (going
from memory). Not sure where this python rpm came from but 
going back to 1.5 took care of the problem.

Recommend closing.