]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
- add patch from mandriva to fix possibility of uprading the same
[packages/rpm.git] / rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
diff --git a/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch b/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
new file mode 100644 (file)
index 0000000..6d81cf4
--- /dev/null
@@ -0,0 +1,22 @@
+--- rpm-5.4.4/lib/transaction.c.epoch_cmp~     2011-11-30 22:25:26.646155379 +0100
++++ rpm-5.4.4/lib/transaction.c        2011-11-30 23:15:28.252768345 +0100
+@@ -1187,12 +1187,15 @@ rpmlog(RPMLOG_DEBUG, D_("sanity checking
+                           const char *val = NULL;
+                           he->tag = tags[t];
+                           xx = headerGet(h, he, 0);
+-                          if (he->tag == RPMTAG_EPOCH)
++                          if (he->tag == RPMTAG_EPOCH) {
+                               val = rpmteE(p);
+-                          else if (he->tag == RPMTAG_DISTEPOCH)
++                              if (val ? atoi(val) : 0 != he->p.ui32p ? *(he->p.ui32p) : 0)
++                                nkeys--;
++                          } else if (he->tag == RPMTAG_DISTEPOCH) {
+                               val = rpmteD(p);
+-                          if (strcmp(he->p.str ? he->p.str : "", val ? val : ""))
+-                              nkeys--;
++                              if (strcmp(he->p.str ? he->p.str : "", val ? val : ""))
++                                nkeys--;
++                          }
+                           he->p.ptr = _free(he->p.ptr);
+                       }
+                       mi = rpmmiFree(mi);
This page took 0.042929 seconds and 4 git commands to generate.