poldek: poldek/pkg.c, poldek/install3/obsoletes.c - rpm ignores pa...

mis mis at pld-linux.org
Sun Jan 27 19:36:11 CET 2008


Author: mis                          Date: Sun Jan 27 18:36:11 2008 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- rpm ignores package arch in multilib mode

---- Files affected:
poldek/poldek:
   pkg.c (1.121 -> 1.122) 
poldek/poldek/install3:
   obsoletes.c (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: poldek/poldek/pkg.c
diff -u poldek/poldek/pkg.c:1.121 poldek/poldek/pkg.c:1.122
--- poldek/poldek/pkg.c:1.121	Sun Jan 27 15:09:53 2008
+++ poldek/poldek/pkg.c	Sun Jan 27 19:36:06 2008
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2000 - 2007 Pawel A. Gajda (mis at pld-linux.org)
+  Copyright (C) 2000 - 2008 Pawel A. Gajda (mis at pld-linux.org)
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License, version 2 as

================================================================
Index: poldek/poldek/install3/obsoletes.c
diff -u poldek/poldek/install3/obsoletes.c:1.1 poldek/poldek/install3/obsoletes.c:1.2
--- poldek/poldek/install3/obsoletes.c:1.1	Wed Jan 23 23:56:19 2008
+++ poldek/poldek/install3/obsoletes.c	Sun Jan 27 19:36:06 2008
@@ -95,6 +95,7 @@
     return norphaned;
 }
 
+/* filter out obsoletes packages not coloured like new one  */
 static
 int obs_filter(struct pkgdb *db, const struct pm_dbrec *dbrec, void *apkg)
 {
@@ -111,13 +112,21 @@
 
     if (arch) 
         pkg_set_arch(&dbpkg, arch);
-    
-    DBGF("%s.%s:%d colored like %s:%d => %d\n", pkg_evr_snprintf_s(&dbpkg),
-         arch, dbpkg.color,
-         pkg_id(pkg), pkg->color, pkg_is_colored_like(&dbpkg, pkg));
-        
+
+    if (!poldek_conf_MULTILIB)
+        return 1;
+
+    tracef(4, "%s.%s (c=%d) colored like %s (c=%d) => %s\n",
+           pkg_evr_snprintf_s(&dbpkg), arch, dbpkg.color,
+           pkg_id(pkg), pkg->color,
+           pkg_is_colored_like(&dbpkg, pkg) ? "yes" : "no");
+
     if (pkg_is_colored_like(&dbpkg, pkg))
         return 1;
+
+    /* both uncolored -> rpm will replace one with another  */
+    if (dbpkg.color == 0 && pkg->color == 0)
+        return 1;
     
     return 0;
 }
@@ -227,7 +236,7 @@
         msgn_i(1, indent, _("%s obsoleted by %s"), pkg_id(dbpkg), pkg_id(pkg));
         iset_add(unset, dbpkg, PKGMARK_DEP);
         
-        trace(indent + 1, "verify uninstalled %s's caps", pkg_id(dbpkg));
+        trace(indent + 1, "verifying uninstalled %s's caps", pkg_id(dbpkg));
 
         it = pkg_cap_iter_new(dbpkg);
         while ((cap = pkg_cap_iter_get(it))) {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/pkg.c?r1=1.121&r2=1.122&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/install3/obsoletes.c?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list