From bee5dc94cf6ee388be821625ba77034bce61c049 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 4 Oct 2019 13:01:11 +0300 Subject: [PATCH] Mark dynamically generated buildrequires autogenerated This makes them in line with regular auto-generated dependencies and allows them to be easily identified. It also makes parseRCPOT() error reporting do the right thing: generated dependencies do not relate to spec lines. Fixes #801 (also reported as RhBug:1759100) --- build/build.c | 2 +- tests/rpmbuild.at | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/build.c b/build/build.c index 08c2df1e4e..04c59ad5be 100644 --- a/build/build.c +++ b/build/build.c @@ -201,7 +201,7 @@ static int doBuildRequires(rpmSpec spec, int test) for (int i = 0; i < outc; i++) { parseRCPOT(spec, spec->sourcePackage, output[i], RPMTAG_REQUIRENAME, - 0, 0, addReqProvPkg, NULL); + 0, RPMSENSE_FIND_REQUIRES, addReqProvPkg, NULL); } rpmdsPutToHeader( diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at index 7929137beb..486cbc096f 100644 --- a/tests/rpmbuild.at +++ b/tests/rpmbuild.at @@ -1603,16 +1603,16 @@ cp "${abs_srcdir}"/data/SOURCES/buildrequires-1.0.tar.gz ${TOPDIR}/SOURCES run rpmbuild \ -br --quiet --nodeps "${abs_srcdir}"/data/SPECS/buildrequires.spec -runroot rpm -qpR /build/SRPMS/buildrequires-1.0-1.buildreqs.nosrc.rpm +runroot rpm -qpvR /build/SRPMS/buildrequires-1.0-1.buildreqs.nosrc.rpm ], [0], -[(bar = 3.4 or bar = 3.5) -foo > 1.3 -foo-bar = 2.0 -rpmlib(CompressedFileNames) <= 3.0.4-1 -rpmlib(DynamicBuildRequires) <= 4.15.0-1 -rpmlib(FileDigests) <= 4.6.0-1 -rpmlib(RichDependencies) <= 4.12.0-1 +[auto: (bar = 3.4 or bar = 3.5) +auto: foo > 1.3 +auto: foo-bar = 2.0 +rpmlib: rpmlib(CompressedFileNames) <= 3.0.4-1 +rpmlib: rpmlib(DynamicBuildRequires) <= 4.15.0-1 +rpmlib: rpmlib(FileDigests) <= 4.6.0-1 +rpmlib: rpmlib(RichDependencies) <= 4.12.0-1 ], [ignore]) AT_CLEANUP