Michael Schröder
444a43896d
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=196
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
--- lib/depends.c.orig 2012-04-18 14:46:10.000000000 +0000
|
|
+++ lib/depends.c 2012-04-18 14:46:15.000000000 +0000
|
|
@@ -355,6 +355,7 @@ static int rpmdbProvides(rpmts ts, depCa
|
|
rpmdbMatchIterator mi = NULL;
|
|
Header h = NULL;
|
|
int rc = 0;
|
|
+ int matchnvr = rpmdsTagN(dep) == RPMTAG_OBSOLETENAME;
|
|
|
|
/* See if we already looked this up */
|
|
if (depCacheGetEntry(dcache, DNEVR, &cachedrc, NULL, NULL)) {
|
|
@@ -368,7 +369,7 @@ static int rpmdbProvides(rpmts ts, depCa
|
|
* taking file state into account: replaced, wrong colored and
|
|
* not installed files can not satisfy a dependency.
|
|
*/
|
|
- if (Name[0] == '/') {
|
|
+ if (Name[0] == '/' && !matchnvr) {
|
|
mi = rpmtsPrunedIterator(ts, RPMDBI_BASENAMES, Name);
|
|
while ((h = rpmdbNextIterator(mi)) != NULL) {
|
|
int fs = RPMFILE_STATE_MISSING;
|
|
@@ -390,9 +391,16 @@ static int rpmdbProvides(rpmts ts, depCa
|
|
if (h == NULL) {
|
|
mi = rpmtsPrunedIterator(ts, RPMDBI_PROVIDENAME, Name);
|
|
while ((h = rpmdbNextIterator(mi)) != NULL) {
|
|
- if (rpmdsAnyMatchesDep(h, dep, _rpmds_nopromote)) {
|
|
- rpmdsNotify(dep, "(db provides)", rc);
|
|
- break;
|
|
+ if (matchnvr) {
|
|
+ if (rpmdsNVRMatchesDep(h, dep , _rpmds_nopromote)) {
|
|
+ rpmdsNotify(dep, "(db provides)", rc);
|
|
+ break;
|
|
+ }
|
|
+ } else {
|
|
+ if (rpmdsAnyMatchesDep(h, dep, _rpmds_nopromote)) {
|
|
+ rpmdsNotify(dep, "(db provides)", rc);
|
|
+ break;
|
|
+ }
|
|
}
|
|
}
|
|
rpmdbFreeIterator(mi);
|