PATCH: plague-0.5.0: PackageJob.py: NameError _and_ YumBaseError (unable to kill its job)

Dan Williams dcbw at redhat.com
Mon Nov 13 20:26:58 UTC 2006


On Sun, 2006-11-05 at 23:48 -0500, Joe Todaro wrote:
> 
> ---- PROBLEM # 1 ----  Depsolve step keeps crashing due to a typo in
> the script:  
> 
> 364 (fuse-sshfs): Starting depsolve for arches: ['x86_64', 'i386']. 
> Exception in thread PackageJob: 364/fuse-sshfs: 
> [...snip...] 
> >   File "/usr/share/plague/server/PackageJob.py", line 513, in 
> > _arch_deps_solved 
> >     base.log = logger.Logger(threshold=threshold,
> file_object=sys.stdout) 
> > NameError: global name 'logger' is not defined  

Fixed, thanks!

> 
> ---- PROBLEM # 2 ---- Unable to kill any job that fails due to a
> missing package/s in the yum repos: 
> 
> >   File "/usr/share/plague/server/PackageJob.py", line 548, in
> _arch_deps_solved 
> >    pkg = base.returnPackageByDep(dep) 
> >   File "__init__.py", line 1342, in returnPackageByDep 
> > YumBaseError: No Package found for fuse-devel  

What version of yum do you have on this machine?  The versions of the
yum python libraries are a bit confusing here; and that's probably where
the error is coming from.  It appears that an unexpected error is
getting thrown, and we need to catch that error.  However, I'm not sure
where exactly it's coming from to catch it.  Can you try to get this
error again and then paste in about 10 lines of code from around the
Line # in PackageJob.py that this backtrace comes from? (ie, line 548
here), and mark the line numbers too?

The fix you posted for this hunk isn't the "correct" fix; that would be
to catch the exception and to re-throw it as a DepSolveError as is done
for the other 'execpt' blocks around there.

Cheers,
Dan

> 
> ---- PATCH ----    
> 
> Here's the patch that resolved the above 2 problems for us:  
>   
> 
> 
> ----- REQUEST ---- 
> 
> Can someone please review it... especially the fix to PROBLEM # 2,
> that could potentially be masking a bigger problem..   
> 
> Here's the code for your convenience (...these are the updates we made
> to the _latest_ version of PackageJob.py): 
> 
> $ cd /usr/share/plague/server 
> $ diff PackageJob.py PackageJob.py.working 
> 513c513 
> <                 base.log = logger.Logger(threshold=threshold,
> file_object=sys.stdout) 
> --- 
> >                 base.log = Logger(threshold=threshold,
> file_object=sys.stdout) 
> 698c698 
> <         if self._curstage == 'waiting': 
> --- 
> >         if self._curstage in ['waiting', 'depsolve']: 
> 
> 
> Thanks, 
>   Joe
> --
> Fedora-buildsys-list mailing list
> Fedora-buildsys-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-buildsys-list




More information about the buildsys mailing list