[Yum-devel] traceback when running ts run, canceling, and running it again

seth vidal skvidal at linux.duke.edu
Tue Oct 3 05:46:41 UTC 2006


On Tue, 2006-10-03 at 00:45 +0300, Pekka Pietikainen wrote:
> Hiya!
> 
> I keep running into the following every now and then:
> 
> [root at localhost secpelle]# rpm -q yum
> yum-2.9.8-1
> [root at localhost secpelle]# yum shell
> Loading "installonlyn" plugin
> Setting up Yum Shell
> > remove openmotif
> Setting up Remove Process
> > ts run
> --> Populating transaction set with selected packages. Please wait.
> ---> Package openmotif.i386 0:2.3.0-0.2.1 set to be erased
> --> Running transaction check
> 
> =============================================================================
>  Package                 Arch       Version          Repository        Size 
> =============================================================================
> Removing:
>  openmotif               i386       2.3.0-0.2.1      installed         3.4 M
> 
> Transaction Summary
> =============================================================================
> Install      0 Package(s)         
> Update       0 Package(s)         
> Remove       1 Package(s)         
> 
> Is this ok [y/N]: 
> Exiting on user Command
> Transaction did not run.
> > ts run
> --> Populating transaction set with selected packages. Please wait.
> Traceback (most recent call last):
>   File "/usr/bin/yum", line 29, in ?
>     yummain.main(sys.argv[1:])
>   File "/usr/share/yum-cli/yummain.py", line 102, in main
>     result, resultmsgs = do()
>   File "/usr/share/yum-cli/cli.py", line 336, in doShell
>     yumshell.cmdloop()
>   File "/usr/lib/python2.4/cmd.py", line 142, in cmdloop
>     stop = self.onecmd(line)
>   File "/usr/lib/python2.4/cmd.py", line 219, in onecmd
>     return func(arg)
>   File "/usr/share/yum-cli/shell.py", line 146, in do_ts
>     self.do_transaction(line)
>   File "/usr/share/yum-cli/shell.py", line 174, in do_transaction
>     return self.do_run('')
>   File "/usr/share/yum-cli/shell.py", line 309, in do_run
>     (code, msgs) = self.base.buildTransaction()
>   File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 440, in
> buildTransaction
>     (rescode, restring) = self.resolveDeps()
>   File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 190, in
> resolveDeps
>     self.populateTs(test=1)
>   File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 132, in
> populateTs
>     for te in self.ts:
> TypeError: __iter__ returned non-iterator of type 'NoneType'

This one took a little while to find.

doTransaction() closes the ts before we download packages. This is fine.
It needs to be reopened and intialized before we return to the shell
prompt. Either we can do it in populateTs() or inside the shell. I opted
to do it in the shell but I might throw a check into populateTs() that
if self.ts is None then run an initActionTs().

thoughts?

-sv





More information about the Yum-devel mailing list