On 45Tue, Mar 12, 2002 at 02:20:02PM -0800 (%H:) or thereabouts, Bill Wagner wrote:
> 
> Andreas Berglund said:
> > On 42Tue, Mar 12, 2002 at 01:31:27PM -0800 (%H:) or thereabouts, Bill
> > Wagner wrote:
> >>
> >> I'm new to using up2date, but I've got a 7.2 machine with all of the
> >> updates applied, running a custom 2.4.18 kernel.  When I run up2date,
> >> I get the following error:
> >>
> >> ---
> >> # up2date
> >> /usr/sbin/up2date:537: SyntaxWarning: name 'progressCurrent' is used
> >> prior to global declaration
> >>   def rpmCallback(what, amount, total, hdr, path):
> >> /usr/sbin/up2date:537: SyntaxWarning: name 'hashesPrinted' is assigned
> >> to before global declaration
> >>   def rpmCallback(what, amount, total, hdr, path):
> >> /usr/sbin/up2date:537: SyntaxWarning: name 'lastPercent' is assigned
> >> to before global declaration
> >>   def rpmCallback(what, amount, total, hdr, path):
> >> /usr/sbin/up2date:537: SyntaxWarning: name 'progressTotal' is assigned
> >> to before global declaration
> >>   def rpmCallback(what, amount, total, hdr, path):
> >> /usr/sbin/up2date:537: 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
> >> ---
> >>
> >> This is happening with or without any options or packages assigned to
> >> it.
> >
> > The import error probably means you don't have the rpm-python package
> > installed. Do rpm -q rpm-python to check.
> >
> >>
> >> Does anyone know what's going on here and most importantly, how to fix
> >> it?
> >
> > Installing rpm-python will probably fix it.
> >
> > /andreas
> 
> Hi Andreas, thanks for the reply,
> 
> Well, I do have rpm-python installed (rpm-python-4.0.3-1.03), but does it
> have to match the version of python that's installed on the system?  I just

I think that might be part of the problem cause it might affect where
the python interpreter looks for the modules.

Do rpm -ql rpm-python to see if you have an rpmmodule.so in there.
Then do "strace /usr/sbin/up2date 2>trace; grep rpm trace" to see if python
can find this module. My guess is that python is looking for it in the wrong
place. 

If that is the problem, then upgrading rpm-python to match
your new python package might help. 

It might also help to just make a symlink from the place where you have rpmmodule.so to
where python is looking for it, I don't know if the version mismatch
will cause any problems though.


> rebuilt the new rawhide python SRPM so I have the following python packages
> installed:
> 
> python-2.2-7
> python-xmlrpc-1.5.1-7.x.3
> python-devel-2.2-7
> 
> Does the version of python-xmlrpc have to match as well?  That wasn't built
> by default.

As a general rule of thumb I always upgrade all the python packages when
upgrading python-proper, it's been my experience that you get the least
amount of hassle that way.
> 
> 

/andreas
> 
> 
> 



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to