Description of problem: --- snipp --- [root@devel root]# yum update Setting up Update Process Setting up Repo: base repomd.xml 100% |=========================| 903 B 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 251 kB 00:00 base : ################################################## 804/804 Excluding Packages Excluding Incompatible Archs Finished Excluding Packages from Development (i386/base) Resolving Dependencies Traceback (most recent call last): File "/usr/share/yum-cli/yummain.py", line 139, in ? main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 94, in main (result, resultmsgs) = base.buildTransaction() File "__init__.py", line 131, in buildTransaction File "depsolve.py", line 151, in resolveDeps File "depsolve.py", line 97, in populateTs TypeError: iteration over non-sequence [root@devel root]# --- snapp --- Version-Release number of selected component (if applicable): yum-2.1.3-1 How reproducible: Everytime, see below. Steps to Reproduce: 1. "yum update" 2. Get the error. Actual results: Yum isn't working. Expected results: Yum should work.
Yes, this is currently being addressed on the yum-devel mailing list. We're all having a little trouble figuring out how this could occur unless the ts is not being created at all, which seems a bit unlikely.
if you can recreate it - add: print dir(self.ts) as the first line of the populateTs function in /usr/lib/python-2.3/site-packages/yum/depsolve.py and send me the output. thanks
Okay, here's the new output - with this print: --- snipp --- [root@devel root]# yum update Setting up Update Process Setting up Repo: base repomd.xml 100% |=========================| 903 B 00:00 Reading repository metadata in from local files base : ################################################## 804/804 Excluding Packages Excluding Incompatible Archs Finished Excluding Packages from Development (i386/base) Resolving Dependencies ['__doc__', '__getattr__', '__init__', '__module__', '_methods', 'getMethod', 'popVSFlags', 'pushVSFlags', 'returnLeafNodes', 'test', 'ts', 'tsflags'] Traceback (most recent call last): File "/usr/share/yum-cli/yummain.py", line 139, in ? main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 94, in main (result, resultmsgs) = base.buildTransaction() File "__init__.py", line 131, in buildTransaction File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 152, in resolveDeps self.populateTs(test=1) File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 98, in populateTs for te in self.ts: TypeError: iteration over non-sequence [root@devel root]# --- snapp ---
well ain't that just a pain in the arse. okay. Thanks
Can you modify the print statement to be: print "self.ts: %s %s self.ts.ts: %s %s" % ( type(self.ts), dir(self.ts), type(self.ts.ts), dir(self.ts.ts)" And paste that output here please. Thanks
Yes, I did this, here is the result: --- snipp --- [root@devel root]# yum update Setting up Update Process Setting up Repo: base repomd.xml 100% |=========================| 903 B 00:00 Reading repository metadata in from local files base : ################################################## 804/804 Excluding Packages Excluding Incompatible Archs Finished Excluding Packages from Development (i386/base) Resolving Dependencies self.ts: <type 'instance'> ['__doc__', '__getattr__', '__init__', '__module__', '_methods', 'getMethod', 'popVSFlags', 'pushVSFlags', 'returnLeafNodes', 'test', 'ts', 'tsflags'] self.ts.ts: <type 'rpm.ts'> ['Debug', 'IDTXglob', 'IDTXload', 'addErase', 'addInstall', 'check', 'clean', 'closeDB', 'dbMatch', 'getKeys', 'hdrCheck', 'hdrFromFdno', 'initDB', 'next', 'openDB', 'order', 'pgpImportPubkey', 'pgpPrtPkts', 'rebuildDB', 'rollback', 'run', 'setColor', 'setFlags', 'setProbFilter', 'setVSFlags', 'verifyDB'] Traceback (most recent call last): File "/usr/share/yum-cli/yummain.py", line 139, in ? main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 94, in main (result, resultmsgs) = base.buildTransaction() File "__init__.py", line 131, in buildTransaction File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 152, in resolveDeps self.populateTs(test=1) File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 98, in populateTs for te in self.ts: TypeError: iteration over non-sequence [root@devel root]# --- snapp --- Prod me, if you need further information and tests.
looks like we should be iterating over self.ts.ts or maybe TransactionWrapper should implement __iter__().
Here's the result for your suggested change: --- snipp --- [root@devel root]# yum update Setting up Update Process Setting up Repo: base repomd.xml 100% |=========================| 903 B 00:00 Reading repository metadata in from local files base : ################################################## 804/804 Excluding Packages Excluding Incompatible Archs Finished Excluding Packages from Development (i386/base) Resolving Dependencies self.ts: <type 'instance'> ['__doc__', '__getattr__', '__init__', '__module__', '_methods', 'getMethod', 'popVSFlags', 'pushVSFlags', 'returnLeafNodes', 'test', 'ts', 'tsflags'] self.ts.ts: <type 'rpm.ts'> ['Debug', 'IDTXglob', 'IDTXload', 'addErase', 'addInstall', 'check', 'clean', 'closeDB', 'dbMatch', 'getKeys', 'hdrCheck', 'hdrFromFdno', 'initDB', 'next', 'openDB', 'order', 'pgpImportPubkey', 'pgpPrtPkts', 'rebuildDB', 'rollback', 'run', 'setColor', 'setFlags', 'setProbFilter', 'setVSFlags', 'verifyDB'] ncurses-5.4-13.i386.rpm 100% |=========================| 273 kB 00:00 modutils-2.4.27-2.i386.rp 100% |=========================| 19 kB 00:00 libxslt-python-1.1.10-1.i 100% |=========================| 5.0 kB 00:00 libxslt-devel-1.1.10-1.i3 100% |=========================| 7.6 kB 00:00 procps-3.2.3-3.i386.rpm 100% |=========================| 15 kB 00:00 Traceback (most recent call last): File "/usr/share/yum-cli/yummain.py", line 139, in ? main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 94, in main (result, resultmsgs) = base.buildTransaction() File "__init__.py", line 131, in buildTransaction File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 152, in resolveDeps self.populateTs(test=1) File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 116, in populateTs hdr = po.getHeader() File "packages.py", line 272, in getHeader IndexError: list index out of range [root@devel root]# --- snapp --- Does this help you?
the wrapper passes any methods it doesn't define on to the self.ts.ts attribute. so iterating over self.ts just like self.ts.ts should be quite safe. I could add __iter__() that handed back self.ts as the iterable object but it doesn't seem necessary
I'll add in the __iter__() method to the self.ts instance handing back self.ts.ts as the iterator. Robert, if you can check out cvs after I do that I'd be interested in the result. My main confusion is why this is only happening on 2 systems and not on EVERY system. afaict, either the ts object is an iterator or it's not. one more question - there's no chance that any other yum process or rpmdb-locking process is existent, is there?
Not on my system, no. It's running in a qemu instance with nothing else running. Very minimal install.
Seth, I've got no further rpm and/or yum processes running: [root@devel root]# ps aux | grep rpm root 7728 0.0 0.2 3972 696 pts/2 S+ 08:46 0:00 grep rpm [root@devel root]# ps aux | grep yum root 7732 0.0 0.2 3976 688 pts/2 R+ 08:47 0:00 grep yum [root@devel root]#
If you could check out yum-HEAD from cvs now and try it. I defined an __iter__ method for the transaction wrapper class.
I did the yum cvs checkout and it works for me now, but I'll keep open this bug report until I get also an "OK" from Michael, who had also the same problem (I think).
This problem is definitely fixed. Thanks for the quick turn-around Seth.
fixed in upstream cvs