summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-08-20 14:56:37 +0000
committerjbj <devnull@localhost>2002-08-20 14:56:37 +0000
commit46d1fa7527073148293e8a49ed13c80043758dae (patch)
tree96a142f3de17b6aa345bd429ee3fbd882814fb3f
parentfb8ced897951d9376c10e2121eded06ec81e0599 (diff)
downloadlibrpm-tizen-46d1fa7527073148293e8a49ed13c80043758dae.tar.gz
librpm-tizen-46d1fa7527073148293e8a49ed13c80043758dae.tar.bz2
librpm-tizen-46d1fa7527073148293e8a49ed13c80043758dae.zip
- fix: add epoch to "already installed" check.
CVS patchset: 5650 CVS date: 2002/08/20 14:56:37
-rw-r--r--CHANGES3
-rw-r--r--lib/rpmts.c2
-rw-r--r--lib/transaction.c2
-rw-r--r--rpm.spec.in7
-rw-r--r--rpmdb/rpmdb.c10
5 files changed, 17 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index 022aa131e..422099dc0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -253,7 +253,8 @@
- squeaky clean memory leak checking.
- always malloc rpmfi structure, refcounts are correct in rpmtsRun().
- skip redundant /sbin/ldconfig scripts on upgrade (if possible).
- - python: supid typo broke ts.check().
+ - python: stupid typo broke ts.check().
+ - fix: add epoch to "already installed" check.
4.0.3 -> 4.0.4:
- solaris: translate i86pc to i386 (#57182).
diff --git a/lib/rpmts.c b/lib/rpmts.c
index aa7903431..70d7d5489 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -544,7 +544,7 @@ rpmps rpmtsProblems(rpmts ts)
void rpmtsCleanDig(rpmts ts)
{
- ts->sig = headerFreeData(ts->sig, -1);
+ ts->sig = headerFreeData(ts->sig, ts->sigtype);
ts->dig = pgpFreeDig(ts->dig);
}
diff --git a/lib/transaction.c b/lib/transaction.c
index d424115bd..514b5031f 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -1055,6 +1055,8 @@ rpmMessage(RPMMESS_DEBUG, _("sanity checking %d elments\n"), rpmtsNElements(ts))
/* XXX multilib should not display "already installed" problems */
if (!(rpmtsFilterFlags(ts) & RPMPROB_FILTER_REPLACEPKG) && !rpmteMultiLib(p)) {
mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(p), 0);
+ xx = rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_DEFAULT,
+ rpmteE(p));
xx = rpmdbSetIteratorRE(mi, RPMTAG_VERSION, RPMMIRE_DEFAULT,
rpmteV(p));
xx = rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_DEFAULT,
diff --git a/rpm.spec.in b/rpm.spec.in
index ee1a2c9b2..47a2c0b4c 100644
--- a/rpm.spec.in
+++ b/rpm.spec.in
@@ -17,7 +17,7 @@ Name: rpm
%define version @VERSION@
Version: %{version}
%{expand: %%define rpm_version %{version}}
-Release: 0.83
+Release: 0.84
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
Copyright: GPL
@@ -519,8 +519,9 @@ fi
%{__prefix}/include/popt.h
%changelog
-* Tue Aug 20 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.83
-- python: supid typo broke ts.check().
+* Tue Aug 20 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.84
+- python: stupid typo broke ts.check().
+- fix: add epoch to "already installed" check.
* Mon Aug 19 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.82
- add --with-efence to configure, check install/upgrade with efence.
diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c
index f9ebd5391..87b37eea0 100644
--- a/rpmdb/rpmdb.c
+++ b/rpmdb/rpmdb.c
@@ -2000,6 +2000,7 @@ static int mireSkip (const rpmdbMatchIterator mi)
rpmTagType t;
int_32 c;
miRE mire;
+ static int_32 zero = 0;
int ntags = 0;
int nmatches = 0;
int i, j;
@@ -2017,8 +2018,13 @@ static int mireSkip (const rpmdbMatchIterator mi)
for (i = 0; i < mi->mi_nre; i++, mire++) {
int anymatch;
- if (!hge(mi->mi_h, mire->tag, &t, (void **)&u, &c))
- continue;
+ if (!hge(mi->mi_h, mire->tag, &t, (void **)&u, &c)) {
+ if (mire->tag != RPMTAG_EPOCH)
+ continue;
+ t = RPM_INT32_TYPE;
+ u.i32p = &zero;
+ c = 1;
+ }
anymatch = 0; /* no matches yet */
while (1) {