From 425d259fda75fa5302673f1f5b06e439cb66d6dd Mon Sep 17 00:00:00 2001 From: ewt Date: Tue, 24 Feb 1998 19:43:14 +0000 Subject: [PATCH] added byHeader to dependency conflict reporting CVS patchset: 2011 CVS date: 1998/02/24 19:43:14 --- lib/depends.c | 3 +++ lib/rpmlib.h | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/depends.c b/lib/depends.c index 27c0bb7..5a43ab5 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -316,6 +316,7 @@ void rpmdepFreeConflicts(struct rpmDependencyConflict * conflicts, int int i; for (i = 0; i < numConflicts; i++) { + headerFree(conflicts[i].byHeader); free(conflicts[i].byName); free(conflicts[i].byVersion); free(conflicts[i].byRelease); @@ -635,6 +636,7 @@ static int checkPackageDeps(rpmDependencies rpmdep, struct problemsSet * psp, psp->problems = realloc(psp->problems, sizeof(*psp->problems) * psp->alloced); } + psp->problems[psp->num].byHeader = headerCopy(h); psp->problems[psp->num].byName = strdup(name); psp->problems[psp->num].byVersion = strdup(version); psp->problems[psp->num].byRelease = strdup(release); @@ -677,6 +679,7 @@ static int checkPackageDeps(rpmDependencies rpmdep, struct problemsSet * psp, psp->problems = realloc(psp->problems, sizeof(*psp->problems) * psp->alloced); } + psp->problems[psp->num].byHeader = headerCopy(h); psp->problems[psp->num].byName = strdup(name); psp->problems[psp->num].byVersion = strdup(version); psp->problems[psp->num].byRelease = strdup(release); diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 87bb7ea..67c7922 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -302,6 +302,7 @@ typedef struct rpmDependencyCheck * rpmDependencies; struct rpmDependencyConflict { char * byName, * byVersion, * byRelease; + Header byHeader; /* these needs fields are misnamed -- they are used for the package which isn't needed as well */ char * needsName, * needsVersion; -- 2.7.4