public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - Fix regression on rpmspec dependency queries
@ 2026-11-23 9:29 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:29 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 5f498494f896868509175567968883d3a6bcc7b2
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2014-08-18T16:50:06+03:00
Stats : +52/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/5f498494f896868509175567968883d3a6bcc7b2?branch=pmatilai-v6
Log:
- 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 <pmatilai@redhat.com>
+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; i<PACKAGE_NUM_DEPS; i++) {
++ /* Nuke any previously added dependencies from the header */
++ headerDel(pkg->header, 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; i<PACKAGE_NUM_DEPS; i++) {
++ rpmdsPutToHeader(pkg->dependencies[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 <pmatilai@redhat.com> - 4.12.0-0.beta1.3
+- Fix regression on rpmspec dependency queries
+
* Mon Aug 18 2014 Panu Matilainen <pmatilai@redhat.com> - 4.12.0-0.beta1.2
- Fix regression on BuildRequires checking
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:29 [rpms/rpm] pmatilai-v6: - Fix regression on rpmspec dependency queries Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox