public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/google-noto-fonts] rawhide: Fix wrong obsoletes for google-noto-sans-balinese-fonts and google-noto-serif-myanmar-vf-fonts
@ 2026-09-03  6:30 Akira TAGOH
  0 siblings, 0 replies; only message in thread
From: Akira TAGOH @ 2026-09-03  6:30 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/google-noto-fonts
Branch : rawhide
Commit : 7a202a96b4982e47e808d903b14f896a1f5fb560
Author : Akira TAGOH <tagoh@redhat.com>
Date   : 2026-09-03T15:29:04+09:00
Stats  : +28/-4 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/google-noto-fonts/c/7a202a96b4982e47e808d903b14f896a1f5fb560?branch=rawhide

Log:
Fix wrong obsoletes for google-noto-sans-balinese-fonts and google-noto-serif-myanmar-vf-fonts

---
diff --git a/google-noto-fonts.spec b/google-noto-fonts.spec
index 65197cf..a718da1 100644
--- a/google-noto-fonts.spec
+++ b/google-noto-fonts.spec
@@ -453,9 +453,7 @@ local subpackages = {
     { alias="serif",      family="Serif Armenian", lang={ "hy" },
       default=true
     },
-    { alias="serif",      family="Serif Balinese", lang={ "ban" },
-      obsoletes={ "sans-balinese" }
-    },
+    { alias="serif",      family="Serif Balinese", lang={ "ban" } },
     { alias="serif",      family="Serif Bengali", lang={ "as", "bn", "mni" },
       default=true
     },
@@ -628,7 +626,7 @@ local subpackages = {
       default=true
     },
     { alias="sans-serif", variable=true, family="Sans Myanmar", lang={ "my" },
-      obsoletes={ "serif-myanmar-vf", "sans-myanmar-ui-vf" }
+      obsoletes={ "sans-myanmar-ui-vf" }
     },
     { alias="sans-serif", variable=true, family="Sans New Tai Lue", lang={ "khb" } },
     { alias="sans-serif", variable=true, family="Sans NKo Unjoined", lang={ "nqo" },
@@ -1084,6 +1082,32 @@ Requires:   %{name}-common = %{version}-%{release}
 %{_metainfodir}/]] .. metaname .. "\n"))
 end
 
+-- Sanity check: an obsoletes token expands into both a Provides: and an
+-- Obsoletes: of %{_fontname}-<token>-fonts. If <token> matches a real
+-- subpackage name, the obsoleting package would Provides/Obsoletes a live
+-- package, so google-noto-fonts-all's dependency on it gets satisfied by the
+-- wrong package and the real one is never pulled in. Fail the build early.
+local realpnames = {}
+for i = 1, #subpackages do
+    local t = subpackages[i]
+    local pname = string.lower(t.family):gsub(' ', '-') .. (t.variable and '-vf' or '')
+    realpnames[pname] = true
+end
+local dups = ''
+for i = 1, #subpackages do
+    local t = subpackages[i]
+    if t.obsoletes then
+        for j = 1, #t.obsoletes do
+            if realpnames[t.obsoletes[j]] then
+                dups = dups .. "\n  obsoletes '" .. t.obsoletes[j] .. "' in '" .. t.family .. "' collides with real subpackage " .. rpm.expand('%{_fontname}-') .. t.obsoletes[j] .. "-fonts"
+            end
+        end
+    end
+end
+if dups ~= '' then
+    error("Duplicate package name(s) via obsoletes:" .. dups)
+end
+
 local all_deps = ''
 local all_vf_deps = ''
 local all_static_deps = ''

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-03  6:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03  6:30 [rpms/google-noto-fonts] rawhide: Fix wrong obsoletes for google-noto-sans-balinese-fonts and google-noto-serif-myanmar-vf-fonts Akira TAGOH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox