glade: fix buildpaths QA warning in gladeui-enum-types

glib-mkenums records the "enumerations from" comment using the
input file's full path (@filename@), embedding the build host's
TMPDIR/HOME path into the installed gladeui-enum-types.c/.h and
tripping the buildpaths QA check:

  WARNING: glade-3.40.0-r0 do_package_qa: QA Issue: File
  /usr/src/debug/glade/3.40.0/gladeui/gladeui-enum-types.c in
  package glade-src contains reference to TMPDIR [buildpaths]

Switch both mkenums templates to @basename@ (supported since glib
2.22), the same fix already used for the analogous gcab-enums
issue. Verified with a clean rebuild: do_package_qa now reports no
buildpaths warnings for glade.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Khem Raj
2026-08-07 03:08:11 +00:00
parent ab3a450b0b
commit 779260faf5
2 changed files with 55 additions and 0 deletions
@@ -0,0 +1,54 @@
From: Khem Raj <khem.raj@oss.qualcomm.com>
Date: Fri, 7 Aug 2026 00:00:00 +0000
Subject: [PATCH] gladeui-enum-types templates: use @basename@ instead of
@filename@
glib-mkenums records the "enumerations from" comment using the input
file's full path (@filename@), which embeds the build host's absolute
source path (including TMPDIR and, since the build is run from a
checkout under $HOME, the host's HOME directory) into the installed
gladeui-enum-types.c/.h, tripping the buildpaths QA check:
WARNING: glade-3.40.0-r0 do_package_qa: QA Issue: File
/usr/src/debug/glade/3.40.0/gladeui/gladeui-enum-types.c in package
glade-src contains reference to TMPDIR [buildpaths]
glib-mkenums has supported @basename@ (base name of the current input
file) since glib 2.22, which avoids embedding the build path. This is
the same fix already applied upstream/downstream for the analogous
gcab-enums.c.etemplate issue.
Upstream-Status: Pending
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
gladeui/gladeui-enum-types.c.template | 2 +-
gladeui/gladeui-enum-types.h.template | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gladeui/gladeui-enum-types.c.template b/gladeui/gladeui-enum-types.c.template
index 1111111..2222222 100644
--- a/gladeui/gladeui-enum-types.c.template
+++ b/gladeui/gladeui-enum-types.c.template
@@ -5,7 +5,7 @@
/*** END file-header ***/
/*** BEGIN file-production ***/
-/* enumerations from "@filename@" */
+/* enumerations from "@basename@" */
/*** END file-production ***/
/*** BEGIN value-header ***/
diff --git a/gladeui/gladeui-enum-types.h.template b/gladeui/gladeui-enum-types.h.template
index 3333333..4444444 100644
--- a/gladeui/gladeui-enum-types.h.template
+++ b/gladeui/gladeui-enum-types.h.template
@@ -10,7 +10,7 @@ G_BEGIN_DECLS
/*** BEGIN file-production ***/
-/* enumerations from "@filename@" */
+/* enumerations from "@basename@" */
/*** END file-production ***/
/*** BEGIN value-header ***/
@@ -14,6 +14,7 @@ inherit features_check gettext pkgconfig gnomebase gobject-introspection mime-xd
# cairo would at least needed to be built with xlib.
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
SRC_URI += "file://0001-gladeui-enum-types-templates-use-basename-instead-o.patch"
SRC_URI[archive.sha256sum] = "31c9adaea849972ab9517b564e19ac19977ca97758b109edc3167008f53e3d9c"
# Man pages are generated with xsltproc pulling the docbook stylesheets over