commit dd584d88a3d820cd7731d8bc9065c098d9dc3506
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Jun 15 20:45:06 2014 +0300

    handle sql errors for empty fields
    
    sqlite3.InterfaceError: Error binding parameter 2 - probably unsupported 
type.
    
    problem is that empty (or missing) fields are somewhy '[]' not 'None' on 
rpm5

 emptyfields.patch | 11 +++++++++++
 yum.spec          |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/yum.spec b/yum.spec
index d0d6bb1..a681880 100644
--- a/yum.spec
+++ b/yum.spec
@@ -37,6 +37,7 @@ Patch11:      rpm5-caps.patch
 Patch12:       %{name}-missingok.patch
 Patch13:       %{name}-info-no-size.patch
 Patch14:       %{name}-pkgspec-at.patch
+Patch15:       emptyfields.patch
 # fc
 Patch100:      %{name}-HEAD.patch
 # Patch100-md5:        4523cba9793fabb2d4b922b911701024
@@ -120,6 +121,7 @@ bash-completion for Yum.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 %build
 %{__make}
diff --git a/emptyfields.patch b/emptyfields.patch
new file mode 100644
index 0000000..63c3602
--- /dev/null
+++ b/emptyfields.patch
@@ -0,0 +1,11 @@
+--- ./yum/history.py~  2014-06-15 14:51:33.000000000 +0300
++++ ./yum/history.py   2014-06-15 15:11:19.973171388 +0300
+@@ -1317,7 +1317,7 @@
+             there is no data currently. """
+         for attr in YumHistoryPackage._valid_rpmdb_keys:
+             val = getattr(ipkg, attr, None)
+-            if val is None:
++            if val is None or val == []:
+                 continue
+             if not self._save_anydb_key(ipkg, "rpm", attr, val):
+                 return False
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/yum.git/commitdiff/dd584d88a3d820cd7731d8bc9065c098d9dc3506

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to