X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch;fp=rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch;h=6d81cf4866d5956e53071557708696336152b0f4;hb=9f9190ed9142a6a0911079cd7fcaf91dcaf15221;hp=0000000000000000000000000000000000000000;hpb=b6aa06669d52acb5791a88eef2b8499391c5b44e;p=packages%2Frpm.git 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 index 0000000..6d81cf4 --- /dev/null +++ b/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch @@ -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);