Re: yum 3.2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fajar A. Nugraha wrote:
> seth vidal wrote:
>   
>> let us know what breaks,
>>     
> TypeError: unknown key type
>
>   
Hi Seth,
Here's the thing. Up to yum 3.2.3 I've been applying Christoph's patch
for the TypeError problem:
https://lists.dulug.duke.edu/pipermail/yum/2007-May/009834.html

When I build yum-3.2.4, I didn't apply it. Turns out to be a big mistake :)
With that patch, the TypeError bug goes away. Is there a particular
reason why this patch is not merged?

With that bug out of the way, I get the same bug I did with yum 3.2.3 :
File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 461, in
_search
    if self._excluded(rep,x['pkgId']):
TypeError: 'NoneType' object is unsubscriptable

Looking at the source, I found this :
executeSQL(cur, "select * from packages where pkgKey=?",
  (pkgKey,))
x = cur.fetchone()
if self._excluded(rep,x['pkgId']):
  continue

which seems to cause problems when the SQL query does not return any
rows, i.e x=None.
So, following the hint on
http://docs.python.org/tut/node6.html#SECTION006710000000000000000
(search for the word 'None') I created a patch (attached) that seems to
fix this problem (please review).

With that bug out of the way as well, I'm back to the first bug I
submitted with yum 3.2.3:
  File "/usr/lib/python2.5/site-packages/yum/rpmtrans.py", line 164, in
ts_done
    (t,e,n,v,r,a) = self._te_tuples[0] # what we should be on
IndexError: list index out of range

But at least now yum completed updating my system :)
Using Opensuse 10.2, yum-3.2.4, yum-metadata-parser-1.1.2.

Regards

Fajar

diff -Nru yum-3.2.4.orig/yum/sqlitesack.py yum-3.2.4/yum/sqlitesack.py
--- yum-3.2.4.orig/yum/sqlitesack.py	2007-08-13 20:32:28.000000000 +0700
+++ yum-3.2.4/yum/sqlitesack.py	2007-08-29 14:27:55.000000000 +0700
@@ -456,6 +456,8 @@
                 executeSQL(cur, "select * from packages where pkgKey=?",
                            (pkgKey,))
                 x = cur.fetchone()
+                if x is None:
+                    continue
                 if self._excluded(rep,x['pkgId']):
                     continue
                 result[self.pc(rep,x)] = hits
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxxxxx
https://lists.dulug.duke.edu/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux