public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - fix regression on addressing main package by its name (#972994)
@ 2026-11-23 9:28 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:28 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 4cf31cb6ea7c9e03e8f7ef2880383f0fda8c71b5
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2013-06-11T09:58:42+03:00
Stats : +34/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/4cf31cb6ea7c9e03e8f7ef2880383f0fda8c71b5?branch=pmatilai-v6
Log:
- fix regression on addressing main package by its name (#972994)
---
diff --git a/rpm-4.11.1-rc1-lookup-mainpkg.patch b/rpm-4.11.1-rc1-lookup-mainpkg.patch
new file mode 100644
index 0000000..a41c291
--- /dev/null
+++ b/rpm-4.11.1-rc1-lookup-mainpkg.patch
@@ -0,0 +1,27 @@
+commit eacb69f779cc5fd7b651d7a7cf450b327e5735f8
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date: Tue Jun 11 09:51:48 2013 +0300
+
+ Fix regression on addressing main package by its name (RhBug:972994)
+
+ - The main package name is not known when we start parsing the preamble,
+ so newPackage() is called with NULL name and the early callers use
+ NULL to find it. Populate the name as soon as we know it so
+ various "%foo -n <name>" operations work on the main package too,
+ which got broken by commit 9929459f9967ecfe0a05d557bc42531944faa70a.
+ (cherry picked from commit fed1298af7911145c953da8910fd5f2f15976374)
+
+diff --git a/build/parsePreamble.c b/build/parsePreamble.c
+index f7cc167..e4b1f94 100644
+--- a/build/parsePreamble.c
++++ b/build/parsePreamble.c
+@@ -670,6 +670,9 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
+ if (rpmCharCheck(spec, field, strlen(field), ".-_+%{}"))
+ goto exit;
+ headerPutString(pkg->header, tag, field);
++ /* Main pkg name is unknown at the start, populate as soon as we can */
++ if (pkg == spec->packages)
++ pkg->name = rpmstrPoolId(spec->pool, field, 1);
+ break;
+ case RPMTAG_VERSION:
+ case RPMTAG_RELEASE:
diff --git a/rpm.spec b/rpm.spec
index d251fe6..472315f 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -22,7 +22,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}1%{?dist}
+Release: %{?snapver:0.%{snapver}.}2%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -47,6 +47,8 @@ Patch6: rpm-4.9.0-armhfp-logic.patch
# Patches already in upstream
# Filter soname dependencies by name
Patch100: rpm-4.11.x-filter-soname-deps.patch
+# Fix regression on addressing main package by its name
+Patch101: rpm-4.11.1-rc1-lookup-mainpkg.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -225,6 +227,7 @@ packages on a system.
%patch4 -p1 -b .use-gpg2
%patch100 -p1 -b .filter-soname-deps
+%patch101 -p1 -b .lookup-mainpkg
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -458,6 +461,9 @@ exit 0
%doc COPYING doc/librpm/html/*
%changelog
+* Tue Jun 11 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.1-0.rc1.2
+- fix regression on addressing main package by its name (#972994)
+
* Mon Jun 10 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.1-0.rc1.1
- update to 4.11.1-rc1 (http://rpm.org/wiki/Releases/4.11.1)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:28 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:28 [rpms/rpm] pmatilai-v6: - fix regression on addressing main package by its name (#972994) Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox