diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-09-15 10:56:58 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-09-15 10:56:58 +0300 |
commit | 4018bbd08e84fd0cc227dcb8d2dc20693ce2296a (patch) | |
tree | ad3cedaf4a3a282ce7fca3bc8a31577a3fa50e7d /build | |
parent | b69c5cf90d74738214fa46c94f223ac9800487de (diff) | |
download | rpm-4018bbd08e84fd0cc227dcb8d2dc20693ce2296a.tar.gz rpm-4018bbd08e84fd0cc227dcb8d2dc20693ce2296a.tar.bz2 rpm-4018bbd08e84fd0cc227dcb8d2dc20693ce2296a.zip |
Allow absolute paths in file lists again (SuseBug:535594, RhBug:521760)
- patch from OpenSUSE / Michael Schroeder
- build-time generated file lists should be placed in the build directory,
but at least one valid use case for this is things like %files -f %{SOURCE10}
Diffstat (limited to 'build')
-rw-r--r-- | build/files.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/build/files.c b/build/files.c index b5c5437a4..061494d99 100644 --- a/build/files.c +++ b/build/files.c @@ -1755,9 +1755,13 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg, argvSplit(&filelists, getStringBuf(pkg->fileFile), "\n"); for (fp = filelists; *fp != NULL; fp++) { - ffn = rpmGetPath("%{_builddir}/", - (spec->buildSubdir ? spec->buildSubdir : "") , - "/", *fp, NULL); + if (**fp == '/') { + ffn = rpmGetPath(*fp, NULL); + } else { + ffn = rpmGetPath("%{_builddir}/", + (spec->buildSubdir ? spec->buildSubdir : "") , + "/", *fp, NULL); + } fd = fopen(ffn, "r"); if (fd == NULL || ferror(fd)) { |