Add patch to fix broken Since/Obsoletes
This commit is contained in:
parent
4040705522
commit
1db67ba675
169
fix-broken-since-obsoletes.patch
Normal file
169
fix-broken-since-obsoletes.patch
Normal file
@ -0,0 +1,169 @@
|
||||
From fc0d2b5f15f58dae817816ba02e20ebf7017b842 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Catanzaro <mcatanzaro@redhat.com>
|
||||
Date: Mon, 18 Dec 2023 10:14:30 -0600
|
||||
Subject: [PATCH] Revert "generate: Add fallback for missing "since""
|
||||
|
||||
This reverts commit 4fa286d504df8dd970a175db806a7f9156cdf527.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gi-docgen/-/issues/179
|
||||
---
|
||||
gidocgen/gdgenerate.py | 38 ++++++++++++++++----------------------
|
||||
1 file changed, 16 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/gidocgen/gdgenerate.py b/gidocgen/gdgenerate.py
|
||||
index 75175a5..21095c6 100644
|
||||
--- a/gidocgen/gdgenerate.py
|
||||
+++ b/gidocgen/gdgenerate.py
|
||||
@@ -146,7 +146,7 @@ def gen_index_func(func, namespace, md=None):
|
||||
if func.available_since is not None:
|
||||
available_since = func.available_since
|
||||
else:
|
||||
- available_since = namespace.version
|
||||
+ available_since = None
|
||||
if func.deprecated:
|
||||
(version, msg) = func.deprecated_since
|
||||
deprecated_since = version
|
||||
@@ -170,7 +170,7 @@ def gen_index_property(prop, namespace, md=None):
|
||||
if prop.available_since is not None:
|
||||
available_since = prop.available_since
|
||||
else:
|
||||
- available_since = namespace.version
|
||||
+ available_since = None
|
||||
if prop.deprecated:
|
||||
(version, msg) = prop.deprecated_since
|
||||
deprecated_since = version
|
||||
@@ -193,7 +193,7 @@ def gen_index_signal(signal, namespace, md=None):
|
||||
if signal.available_since is not None:
|
||||
available_since = signal.available_since
|
||||
else:
|
||||
- available_since = namespace.version
|
||||
+ available_since = None
|
||||
if signal.deprecated:
|
||||
(version, msg) = signal.deprecated_since
|
||||
deprecated_since = version
|
||||
@@ -394,7 +394,7 @@ class TemplateConstant:
|
||||
|
||||
self.stability = const.stability
|
||||
self.attributes = const.attributes
|
||||
- self.available_since = const.available_since or namespace.version
|
||||
+ self.available_since = const.available_since
|
||||
if const.deprecated:
|
||||
(version, msg) = const.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -455,7 +455,7 @@ class TemplateProperty:
|
||||
self.description = MISSING_DESCRIPTION
|
||||
|
||||
self.stability = prop.stability
|
||||
- self.available_since = prop.available_since or namespace.version
|
||||
+ self.available_since = prop.available_since
|
||||
if prop.deprecated:
|
||||
(version, msg) = prop.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -800,7 +800,7 @@ class TemplateSignal:
|
||||
|
||||
self.stability = signal.stability
|
||||
self.attributes = signal.attributes
|
||||
- self.available_since = signal.available_since or namespace.version
|
||||
+ self.available_since = signal.available_since
|
||||
if signal.deprecated:
|
||||
(version, msg) = signal.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -857,7 +857,7 @@ class TemplateMethod:
|
||||
self.return_value = TemplateReturnValue(namespace, method, method.return_value)
|
||||
|
||||
self.stability = method.stability
|
||||
- self.available_since = method.available_since or type_.available_since
|
||||
+ self.available_since = method.available_since
|
||||
if method.deprecated:
|
||||
(version, msg) = method.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1006,7 +1006,7 @@ class TemplateClassMethod:
|
||||
|
||||
self.stability = method.stability
|
||||
self.attributes = method.attributes
|
||||
- self.available_since = method.available_since or cls.available_since
|
||||
+ self.available_since = method.available_since
|
||||
if method.deprecated:
|
||||
(version, msg) = method.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1080,13 +1080,7 @@ class TemplateFunction:
|
||||
|
||||
self.stability = func.stability
|
||||
self.attributes = func.attributes
|
||||
- if func.available_since is None:
|
||||
- if type_ is None:
|
||||
- self.available_since = namespace.version
|
||||
- else:
|
||||
- self.available_since = type_.available_since
|
||||
- else:
|
||||
- self.available_since = func.available_since
|
||||
+ self.available_since = func.available_since
|
||||
if func.deprecated:
|
||||
(version, msg) = func.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1171,7 +1165,7 @@ class TemplateCallback:
|
||||
|
||||
self.stability = cb.stability
|
||||
self.attributes = cb.attributes
|
||||
- self.available_since = cb.available_since or namespace.version
|
||||
+ self.available_since = cb.available_since
|
||||
if cb.deprecated:
|
||||
(version, msg) = cb.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1315,7 +1309,7 @@ class TemplateInterface:
|
||||
|
||||
self.stability = interface.stability
|
||||
self.attributes = interface.attributes
|
||||
- self.available_since = interface.available_since or namespace.version
|
||||
+ self.available_since = interface.available_since
|
||||
if interface.deprecated:
|
||||
(version, msg) = interface.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1471,7 +1465,7 @@ class TemplateClass:
|
||||
|
||||
self.stability = cls.stability
|
||||
self.attributes = cls.attributes
|
||||
- self.available_since = cls.available_since or namespace.version
|
||||
+ self.available_since = cls.available_since
|
||||
if cls.deprecated:
|
||||
(version, msg) = cls.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1693,7 +1687,7 @@ class TemplateRecord:
|
||||
|
||||
self.stability = record.stability
|
||||
self.attributes = record.attributes
|
||||
- self.available_since = record.available_since or namespace.version
|
||||
+ self.available_since = record.available_since
|
||||
if record.deprecated:
|
||||
(version, msg) = record.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1772,7 +1766,7 @@ class TemplateUnion:
|
||||
|
||||
self.stability = union.stability
|
||||
self.attributes = union.attributes
|
||||
- self.available_since = union.available_since or namespace.version
|
||||
+ self.available_since = union.available_since
|
||||
if union.deprecated:
|
||||
(version, msg) = union.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1849,7 +1843,7 @@ class TemplateAlias:
|
||||
|
||||
self.stability = alias.stability
|
||||
self.attributes = alias.attributes
|
||||
- self.available_since = alias.available_since or namespace.version
|
||||
+ self.available_since = alias.available_since
|
||||
if alias.deprecated:
|
||||
(version, msg) = alias.deprecated_since
|
||||
self.deprecated_since = {
|
||||
@@ -1912,7 +1906,7 @@ class TemplateEnum:
|
||||
|
||||
self.stability = enum.stability
|
||||
self.attributes = enum.attributes
|
||||
- self.available_since = enum.available_since or namespace.version
|
||||
+ self.available_since = enum.available_since
|
||||
if enum.deprecated:
|
||||
(version, msg) = enum.deprecated_since
|
||||
self.deprecated_since = {
|
||||
--
|
||||
2.43.0
|
||||
|
@ -95,6 +95,9 @@ Source: %{url}/-/archive/%{version}/gi-docgen-%{version}.tar.bz2
|
||||
# local system fonts.
|
||||
Patch: gi-docgen-2022.2-no-web-fonts.patch
|
||||
|
||||
# https://gitlab.gnome.org/GNOME/gi-docgen/-/issues/179
|
||||
Patch: fix-broken-since-obsoletes.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
|
Loading…
Reference in New Issue
Block a user