diff options
author | jbj <devnull@localhost> | 1999-07-21 16:17:12 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-07-21 16:17:12 +0000 |
commit | 114c7f8f69cdb31e7e8a9bde989133bc0d6889b6 (patch) | |
tree | 52f0cafc81b17c73b34ce9873d07cfe72dd06f3b /lib/depends.c | |
parent | c9cd11a3259022f2040ae497b8199a332665ee74 (diff) | |
download | librpm-tizen-114c7f8f69cdb31e7e8a9bde989133bc0d6889b6.tar.gz librpm-tizen-114c7f8f69cdb31e7e8a9bde989133bc0d6889b6.tar.bz2 librpm-tizen-114c7f8f69cdb31e7e8a9bde989133bc0d6889b6.zip |
Match any epoch if package has epoch and dependency doesn't specify.
CVS patchset: 3194
CVS date: 1999/07/21 16:17:12
Diffstat (limited to 'lib/depends.c')
-rw-r--r-- | lib/depends.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/depends.c b/lib/depends.c index 5547a6709..02ba24de6 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -687,7 +687,7 @@ static int checkDependentConflicts(rpmTransactionSet rpmdep, int headerMatchesDepFlags(Header h, const char * reqInfo, int reqFlags) { const char * epoch, * version, * release; - const char * reqEpoch = "0"; + const char * reqEpoch = NULL; const char * reqVersion = reqInfo; const char * reqRelease = NULL; const char *s, *se; @@ -708,7 +708,7 @@ int headerMatchesDepFlags(Header h, const char * reqInfo, int reqFlags) if (reqFlags & RPMSENSE_SERIAL) return 0; #endif /* RPMSENSE_SERIAL */ - epoch = "0"; + epoch = "0"; /* assume package is epoch 0 */ } else { sprintf(buf, "%d", *epochval); epoch = buf; @@ -730,7 +730,7 @@ int headerMatchesDepFlags(Header h, const char * reqInfo, int reqFlags) reqVersion = rv + (s - reqInfo) + 1; if (*reqEpoch == '\0') reqEpoch = "0"; } else { - reqEpoch = "0"; + reqEpoch = epoch; /* XXX assume same epoch as package */ reqVersion = rv; } if (se) { @@ -739,8 +739,8 @@ int headerMatchesDepFlags(Header h, const char * reqInfo, int reqFlags) } } - /* Compare {package,rquires} epoch:version[-release] */ - sense = rpmvercmp(epoch, reqEpoch); + /* Compare {package,requires} [epoch:]version[-release] */ + sense = ((reqEpoch != NULL) ? rpmvercmp(epoch, reqEpoch) : 0); if (sense == 0) { sense = rpmvercmp(version, reqVersion); if (sense == 0 && reqRelease && *reqRelease) { |