Allow updates to different architectures
authorAnas Nashif <anas.nashif@intel.com>
Thu, 11 Oct 2012 19:35:52 +0000 (12:35 -0700)
committerAnas Nashif <anas.nashif@intel.com>
Sun, 3 Feb 2013 00:44:15 +0000 (16:44 -0800)
Also test architecture in "refresh" test when not colored. This allows
updates to different architectures.

lib/psm.c

index 8f5376d..c786f1e 100644 (file)
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -680,13 +680,14 @@ void rpmpsmNotify(rpmpsm psm, int what, rpm_loff_t amount)
  */
 static void markReplacedInstance(rpmts ts, rpmte te)
 {
+    /* this must match rpmNameVersionCompare in depends.c */
     rpmdbMatchIterator mi = rpmtsInitIterator(ts, RPMDBI_NAME, rpmteN(te), 0);
     rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, rpmteE(te));
     rpmdbSetIteratorRE(mi, RPMTAG_VERSION, RPMMIRE_STRCMP, rpmteV(te));
     rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, rpmteR(te));
+    rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, rpmteA(te));
     /* XXX shouldn't we also do this on colorless transactions? */
     if (rpmtsColor(ts)) {
-       rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, rpmteA(te));
        rpmdbSetIteratorRE(mi, RPMTAG_OS, RPMMIRE_STRCMP, rpmteO(te));
     }