public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Fix regression(s) on build dependency resolution
Date: Mon, 23 Nov 2026 09:33:17 GMT [thread overview]
Message-ID: <179542639744.1.16008349696586526439.rpms-rpm-931d61f432a3@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 931d61f432a34bf311a597ad5322ed85fb36dbb8
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2020-04-22T15:43:23+03:00
Stats : +70/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/931d61f432a34bf311a597ad5322ed85fb36dbb8?branch=pmatilai-v6
Log:
Fix regression(s) on build dependency resolution
Upstream ticket https://github.com/rpm-software-management/rpm/issues/1189
---
diff --git a/0001-Don-t-look-into-source-package-provides-in-depsolvin.patch b/0001-Don-t-look-into-source-package-provides-in-depsolvin.patch
new file mode 100644
index 0000000..c2684bd
--- /dev/null
+++ b/0001-Don-t-look-into-source-package-provides-in-depsolvin.patch
@@ -0,0 +1,65 @@
+From a4afbb62c94c6e0dc18c1bf08336aeb4a91f82de Mon Sep 17 00:00:00 2001
+Message-Id: <a4afbb62c94c6e0dc18c1bf08336aeb4a91f82de.1587559252.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Wed, 22 Apr 2020 14:12:47 +0300
+Subject: [PATCH] Don't look into source package provides in depsolving
+
+Fixes regressions from commit 75ec16e660e784d7897b37cac1a2b9b135825f25:
+the newly added provides of to-be-built packages were being used for
+dependency resolution, such as spec satifying its own buildrequires,
+and matched against conflicts in installed packages.
+
+Source packages cannot obsolete anything or provide capabilities or files
+to transactions, don't add them to rpmal at all. Explicitly skip checks
+against source provides, similarly to what we already did with obsoletes.
+
+Fixes: #1189
+---
+ lib/depends.c | 8 ++++----
+ lib/rpmal.c | 4 ++++
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/lib/depends.c b/lib/depends.c
+index 6acb21dc3..579451926 100644
+--- a/lib/depends.c
++++ b/lib/depends.c
+@@ -1040,6 +1040,10 @@ int rpmtsCheck(rpmts ts)
+ checkDS(ts, dcache, p, rpmteNEVRA(p), rpmteDS(p, RPMTAG_OBSOLETENAME),
+ tscolor);
+
++ /* Skip obsoletion and provides checks for source packages (ie build) */
++ if (rpmteIsSource(p))
++ continue;
++
+ /* Check provides against conflicts in installed packages. */
+ while (rpmdsNext(provides) >= 0) {
+ checkInstDeps(ts, dcache, p, RPMTAG_CONFLICTNAME, NULL, provides, 0);
+@@ -1047,10 +1051,6 @@ int rpmtsCheck(rpmts ts)
+ checkInstDeps(ts, dcache, p, RPMTAG_REQUIRENAME, NULL, provides, 1);
+ }
+
+- /* Skip obsoletion checks for source packages (ie build) */
+- if (rpmteIsSource(p))
+- continue;
+-
+ /* Check package name (not provides!) against installed obsoletes */
+ checkInstDeps(ts, dcache, p, RPMTAG_OBSOLETENAME, NULL, rpmteDS(p, RPMTAG_NAME), 0);
+
+diff --git a/lib/rpmal.c b/lib/rpmal.c
+index 3c8acd63a..8a47d025a 100644
+--- a/lib/rpmal.c
++++ b/lib/rpmal.c
+@@ -247,6 +247,10 @@ void rpmalAdd(rpmal al, rpmte p)
+ rpmalNum pkgNum;
+ availablePackage alp;
+
++ /* Source packages don't provide anything to depsolving */
++ if (rpmteIsSource(p))
++ return;
++
+ if (al->size == al->alloced) {
+ al->alloced += al->delta;
+ al->list = xrealloc(al->list, sizeof(*al->list) * al->alloced);
+--
+2.25.3
+
diff --git a/rpm.spec b/rpm.spec
index a4a44f4..1a20816 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -25,7 +25,7 @@
%global rpmver 4.15.90
%global snapver git14971
-%global rel 7
+%global rel 8
%global srcver %{version}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -63,6 +63,7 @@ Patch100: 0001-Unset-SOURCE_DATE_EPOCH-for-the-test-suite.patch
Patch101: 0001-rpmfc-Do-not-prepend-buildroot-to-a-path-for-paramet.patch
Patch102: 0001-Fix-regression-causing-all-ELF-files-classified-as-O.patch
Patch103: 0001-Warn-on-undefined-components-in-buildtree-macros.patch
+Patch104: 0001-Don-t-look-into-source-package-provides-in-depsolvin.patch
# These are not yet upstream
Patch906: rpm-4.7.1-geode-i686.patch
@@ -533,6 +534,9 @@ make check || (cat tests/rpmtests.log; exit 1)
%doc doc/librpm/html/*
%changelog
+* Wed Apr 22 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.8
+- Fix regression(s) on build dependency resolution
+
* Wed Apr 22 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.7
- Add rpmdb-rebuild systemd service
reply other threads:[~2026-11-23 9:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542639744.1.16008349696586526439.rpms-rpm-931d61f432a3@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox