From: Yoann Congal <[email protected]>

grl-type-builtins.* are generated by glib-mkenums which leave full paths
in comment and #include directives. Rewrite those before *-src packaging.
Previous fix did not correct the .c file and did not work in the
"devtool modify" case.

Fix these errors:
  ERROR: grilo-0.3.16-r0 do_package_qa: QA Issue: File 
/usr/src/debug/grilo/0.3.16/src/grl-type-builtins.c in package grilo-src 
contains reference to TMPDIR [buildpaths]
  ERROR: grilo-0.3.16-r0 do_package_qa: QA Issue: File 
/usr/src/debug/grilo/0.3.16/src/grl-type-builtins.h in package grilo-src 
contains reference to TMPDIR [buildpaths]
  ERROR: grilo-0.3.16-r0 do_package_qa: Fatal QA errors were found, failing 
task.

Signed-off-by: Yoann Congal <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit aa88276c26b465039b45281b8c206dd5d7baa58e)
Signed-off-by: Anuj Mittal <[email protected]>
---
 meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb 
b/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb
index 14e1ca9fe1..b6ac75dd8a 100644
--- a/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb
+++ b/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb
@@ -26,5 +26,14 @@ PACKAGECONFIG[test-ui] = "-Denable-test-ui=true, 
-Denable-test-ui=false, gtk+3 l
 EXTRA_OEMESON = "-Denable-grl-pls=false"
 
 do_compile:append() {
-        sed -i -e 's,${B}/../,,' ${B}/src/grl-type-builtins.h
+    # grl-type-builtins.* are generated by glib-mkenums which leave full paths
+    # in comment and #include directives. Rewrite those before *-src packaging.
+
+    # Path can be relative to B or WORKDIR in devtool modify
+    for base in ${B} ${WORKDIR} ; do 
+        relpath="$(realpath --relative-to="$base" "${S}")"
+        sed -i -e "s,$base/$relpath/src/,," \
+            ${B}/src/grl-type-builtins.h \
+            ${B}/src/grl-type-builtins.c
+    done
 }
-- 
2.51.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#121903): 
https://lists.openembedded.org/g/openembedded-devel/message/121903
Mute This Topic: https://lists.openembedded.org/mt/116372527/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to