From 5f498494f896868509175567968883d3a6bcc7b2 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Aug 18 2014 13:50:06 +0000 Subject: - Fix regression on rpmspec dependency queries --- diff --git a/rpm-4.12-beta1-spec-header-deps.patch b/rpm-4.12-beta1-spec-header-deps.patch new file mode 100644 index 0000000..893ca8f --- /dev/null +++ b/rpm-4.12-beta1-spec-header-deps.patch @@ -0,0 +1,47 @@ +commit 0bda2faa4de368a87f85084856a5fed701774acb +Author: Panu Matilainen +Date: Mon Aug 18 16:31:14 2014 +0300 + + Populate manual dependencies into spec pkg headers early too + + - Similar to commit 1b41c91431d37295701281ff208f99a51f660c89, rpmspec + and other tools expect to find manually specified dependencies + from the headers of a freshly parsed spec. This means we need to + add this cruft two times: once for the manual dependencies and then + scratch all that and redo from start after automatic dependencies + have been discovered at the end of package build. + - Fixes another regression (rpmspec dependency queries went dead) + introduced in commit a357c99c58a5e1367160dfa692f26d14bd3a3df1 + +diff --git a/build/pack.c b/build/pack.c +index dc24fb5..4abca48 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -618,6 +618,11 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) + headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1); + + for (int i=0; iheader, rpmdsTagN(pkg->dependencies[i])); ++ headerDel(pkg->header, rpmdsTagEVR(pkg->dependencies[i])); ++ headerDel(pkg->header, rpmdsTagF(pkg->dependencies[i])); ++ /* ...and add again, now with automatic dependencies included */ + rpmdsPutToHeader(pkg->dependencies[i], pkg->header); + } + +diff --git a/build/parseSpec.c b/build/parseSpec.c +index b14c3ee..77cf409 100644 +--- a/build/parseSpec.c ++++ b/build/parseSpec.c +@@ -548,6 +548,11 @@ static void addTargets(Package Pkgs) + headerPutString(pkg->header, RPMTAG_PLATFORM, platform); + headerPutString(pkg->header, RPMTAG_OPTFLAGS, optflags); + ++ /* Add manual dependencies early for rpmspec etc to look at */ ++ for (int i=0; idependencies[i], pkg->header); ++ } ++ + pkg->ds = rpmdsThis(pkg->header, RPMTAG_REQUIRENAME, RPMSENSE_EQUAL); + addPackageProvides(pkg); + } diff --git a/rpm.spec b/rpm.spec index eedd301..63da7aa 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}2%{?dist} +Release: %{?snapver:0.%{snapver}.}3%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 @@ -49,6 +49,7 @@ Patch4: rpm-4.8.1-use-gpg2.patch # Patches already upstream: Patch100: rpm-4.12-beta1-fix-buildrequires.patch +Patch101: rpm-4.12-beta1-spec-header-deps.patch # These are not yet upstream Patch302: rpm-4.7.1-geode-i686.patch @@ -527,6 +528,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Mon Aug 18 2014 Panu Matilainen - 4.12.0-0.beta1.3 +- Fix regression on rpmspec dependency queries + * Mon Aug 18 2014 Panu Matilainen - 4.12.0-0.beta1.2 - Fix regression on BuildRequires checking