From 2a6926d531ca9aa797db678b648509ca251de3f2 Mon Sep 17 00:00:00 2001
From: Florian Festi <ffesti@redhat.com>
Date: Thu, 25 Feb 2016 16:51:02 +0100
Subject: [PATCH] Use pkg->dpaths during dependency generation instead of
buildRoot + filename
This passes the filenames with the actual file content to the dependency
generators when using RemovePathPostfixes.
---
build/rpmfc.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 7c61d9d..59cf472 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -1267,7 +1267,6 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
{
rpmfi fi = rpmfilesIter(pkg->cpioList, RPMFI_ITER_FWD);
rpmfc fc = NULL;
- ARGV_t av = NULL;
rpm_mode_t * fmode = NULL;
int ac = rpmfiFC(fi);
int genConfigDeps = 0;
@@ -1280,18 +1279,14 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
goto exit;
/* Extract absolute file paths in argv format. */
- av = xcalloc(ac+1, sizeof(*av));
fmode = xcalloc(ac+1, sizeof(*fmode));
fi = rpmfiInit(fi, 0);
while ((idx = rpmfiNext(fi)) >= 0) {
/* Does package have any %config files? */
genConfigDeps |= (rpmfiFFlags(fi) & RPMFILE_CONFIG);
-
- av[idx] = rstrscat(NULL, spec->buildRoot, rpmfiFN(fi), NULL);
fmode[idx] = rpmfiFMode(fi);
}
- av[ac] = NULL;
fc = rpmfcCreate(spec->buildRoot, 0);
free(fc->pkg);
@@ -1316,7 +1311,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
}
/* Build file class dictionary. */
- rc = rpmfcClassify(fc, av, fmode);
+ rc = rpmfcClassify(fc, pkg->dpaths, fmode);
if ( rc != RPMRC_OK )
goto exit;
@@ -1371,7 +1366,6 @@ exit:
fc->pkg = NULL;
free(fmode);
rpmfcFree(fc);
- argvFree(av);
rpmfiFree(fi);
return rc;
--
2.5.0