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 (rhbz#1306559).
This commit is contained in:
parent
4749a08a9e
commit
21661336c3
|
@ -1267,7 +1267,6 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
|
||||||
{
|
{
|
||||||
rpmfi fi = rpmfilesIter(pkg->cpioList, RPMFI_ITER_FWD);
|
rpmfi fi = rpmfilesIter(pkg->cpioList, RPMFI_ITER_FWD);
|
||||||
rpmfc fc = NULL;
|
rpmfc fc = NULL;
|
||||||
ARGV_t av = NULL;
|
|
||||||
rpm_mode_t * fmode = NULL;
|
rpm_mode_t * fmode = NULL;
|
||||||
int ac = rpmfiFC(fi);
|
int ac = rpmfiFC(fi);
|
||||||
int genConfigDeps = 0;
|
int genConfigDeps = 0;
|
||||||
|
@ -1280,18 +1279,14 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
/* Extract absolute file paths in argv format. */
|
/* Extract absolute file paths in argv format. */
|
||||||
av = xcalloc(ac+1, sizeof(*av));
|
|
||||||
fmode = xcalloc(ac+1, sizeof(*fmode));
|
fmode = xcalloc(ac+1, sizeof(*fmode));
|
||||||
|
|
||||||
fi = rpmfiInit(fi, 0);
|
fi = rpmfiInit(fi, 0);
|
||||||
while ((idx = rpmfiNext(fi)) >= 0) {
|
while ((idx = rpmfiNext(fi)) >= 0) {
|
||||||
/* Does package have any %config files? */
|
/* Does package have any %config files? */
|
||||||
genConfigDeps |= (rpmfiFFlags(fi) & RPMFILE_CONFIG);
|
genConfigDeps |= (rpmfiFFlags(fi) & RPMFILE_CONFIG);
|
||||||
|
|
||||||
av[idx] = rstrscat(NULL, spec->buildRoot, rpmfiFN(fi), NULL);
|
|
||||||
fmode[idx] = rpmfiFMode(fi);
|
fmode[idx] = rpmfiFMode(fi);
|
||||||
}
|
}
|
||||||
av[ac] = NULL;
|
|
||||||
|
|
||||||
fc = rpmfcCreate(spec->buildRoot, 0);
|
fc = rpmfcCreate(spec->buildRoot, 0);
|
||||||
free(fc->pkg);
|
free(fc->pkg);
|
||||||
|
@ -1316,7 +1311,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build file class dictionary. */
|
/* Build file class dictionary. */
|
||||||
rc = rpmfcClassify(fc, av, fmode);
|
rc = rpmfcClassify(fc, pkg->dpaths, fmode);
|
||||||
if ( rc != RPMRC_OK )
|
if ( rc != RPMRC_OK )
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
@ -1371,7 +1366,6 @@ exit:
|
||||||
fc->pkg = NULL;
|
fc->pkg = NULL;
|
||||||
free(fmode);
|
free(fmode);
|
||||||
rpmfcFree(fc);
|
rpmfcFree(fc);
|
||||||
argvFree(av);
|
|
||||||
rpmfiFree(fi);
|
rpmfiFree(fi);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|
Loading…
Reference in New Issue