Skip to contentSkip to conversation

meta: resend patches

PATCH In review Robert Yang 4 participants 13 messages Sep 16, 2015 – Sep 22, 2015

lore
Share & tools
lore
#0 lore raw

cover meta: resend patches

Hi RP and Ross,

I had sent these patches before, but didn't get any feedback, now send again, would you please take a look at them ?

The following two patches would make oe-core can do world build well without x11 in DISTRO_FEATURES:
gtk+/cairo: enable x11 or directfb
libsdl: depends on libglu when both x11 and opengl

And the patches for insane.bbclass will make package_qa_check_buildpaths actually useful.

// Robert

The following changes since commit f0189829498e30231d826c9f55aad73e622d076e:

qemu: Update to upstream patches (2015-09-14 11:22:02 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/resend
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/resend

Robert Yang (4):
gtk+/cairo: enable x11 or directfb
libsdl: depends on libglu when both x11 and opengl insane.bbclass: fix package_qa_check_buildpaths insane.bbclass: make package_qa_clean_path return a relative path

 meta/classes/insane.bbclass                   |   14 ++++++++++----
 meta/recipes-gnome/gtk+/gtk+.inc              |    5 ++---
 meta/recipes-graphics/cairo/cairo.inc         |    8 ++++++--
 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb |    3 ++-
 4 files changed, 20 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/4 gtk+/cairo: enable x11 or directfb

The gtk+2 requires whether x11 or directfb to build, so we need enable either of them. The cairo can be built without x11 or directfb, but gtk+ requires cairo, so enable x11 or directfb for cairo, too.

---
 meta/recipes-gnome/gtk+/gtk+.inc      |    5 ++---
 meta/recipes-graphics/cairo/cairo.inc |    8 ++++++--
 2 files changed, 8 insertions(+), 5 deletions(-)
meta/recipes-gnome/gtk+/gtk+.inc +2 -3
index be5273d..9d697cdb 100644
@@ -17,9 +17,8 @@ X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender
 DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
  cairo gdk-pixbuf"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-"
+# Requires x11 or directfb
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'directfb', d)}"
 
 PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
 # without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE
meta/recipes-graphics/cairo/cairo.inc +6 -2
index 1e45318..f6474bc 100644
@@ -17,8 +17,12 @@ LICENSE_${PN}-perf-utils = "GPLv3+"
 X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
+# Build cairo-xlib or cairo-directfb for gtk+
+PACKAGECONFIG ??= " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', 'directfb', d)} \
+                    "
+
+# No directfb-native, so set PACKAGECONFIG to null when no x11
+PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
 
 PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
 PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [PATCH 1/4] gtk+/cairo: enable x11 or directfb

Quoted 4 lines · Robert Yang

The gtk+2 requires whether x11 or directfb to build, so we need enable either of them. The cairo can be built without x11 or directfb, but gtk+ requires cairo, so enable x11 or directfb for cairo, too.

What is the issue being fixed here? I can see how current config can go wrong in some situations but I'm not sure if the approach "if x11 is not a DISTRO_FEATURE, then automatically use direcfb" is much better. Especially for cairo: I would have thought building multiple surface backends is a valid choice there?

Jussi

Review

Quoted 7 lines
---
 meta/recipes-gnome/gtk+/gtk+.inc      |    5 ++---
 meta/recipes-graphics/cairo/cairo.inc |    8 ++++++--
 2 files changed, 8 insertions(+), 5 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-gnome/gtk+/gtk+.inc

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor

Quoted 4 lines

index be5273d..9d697cdb 100644

meta/recipes-gnome/gtk+/gtk+.inc +0 -0
@@ -17,9 +17,8 @@ X11DEPENDS = "virtual/libx11 libxext libxcursor

libxrandr libxdamage libxrender

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor · line 17

Quoted 1 line
meta/recipes-gnome/gtk+/gtk+.inc +0 -0
 DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native

docbook-utils-native \

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender

Quoted 3 lines
meta/recipes-gnome/gtk+/gtk+.inc +0 -1
  cairo gdk-pixbuf"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11',

'', d)} \

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor · line 21

Quoted 1 line
meta/recipes-gnome/gtk+/gtk+.inc +0 -1
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb',

'directfb', '', d)} \

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender

Quoted 3 lines
meta/recipes-gnome/gtk+/gtk+.inc +2 -1
-"
+# Requires x11 or directfb
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11',

'directfb', d)}"

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor · line 22

Quoted 2 lines
meta/recipes-gnome/gtk+/gtk+.inc +0 -0
 PACKAGECONFIG[x11] = "--with-x=yes

--with-gdktarget=x11,--with-x=no,${X11DEPENDS}"

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor · line 23

Quoted 1 line
meta/recipes-gnome/gtk+/gtk+.inc +0 -0
 # without --with-gdktarget=directfb it will check for cairo-xlib which

isn't available without X11 DISTRO_FEATURE

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-graphics/cairo/cairo.inc

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 20

Quoted 8 lines

index 1e45318..f6474bc 100644

meta/recipes-graphics/cairo/cairo.inc +0 -1
@@ -17,8 +17,12 @@ LICENSE_${PN}-perf-utils = "GPLv3+"
 X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11

xcb', '', d)} \

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 21

Quoted 1 line
meta/recipes-graphics/cairo/cairo.inc +0 -1
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb',

'directfb', '', d)}"

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 21

Quoted 2 lines
meta/recipes-graphics/cairo/cairo.inc +2 -0
+# Build cairo-xlib or cairo-directfb for gtk+
+PACKAGECONFIG ??= " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11

xcb', 'directfb', d)} \

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+"

Quoted 4 lines
meta/recipes-graphics/cairo/cairo.inc +4 -0
+                    "
+
+# No directfb-native, so set PACKAGECONFIG to null when no x11
+PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES',

'x11', 'x11', '', d)}"

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 26

Quoted 2 lines
meta/recipes-graphics/cairo/cairo.inc +0 -0
 PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no

--disable-xlib,${X11DEPENDS}"

Quoted 9 lines
meta/recipes-graphics/cairo/cairo.inc +0 -1
 PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
--

1.7.9.5

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

Re: [PATCH 1/4] gtk+/cairo: enable x11 or directfb

Quoted 8 lines · Jussi Kukkonen
Quoted 4 lines · On 16 September 2015 at 05:28, Robert Yang <[email protected]…

The gtk+2 requires whether x11 or directfb to build, so we need enable either of them. The cairo can be built without x11 or directfb, but gtk+ requires cairo, so enable x11 or directfb for cairo, too.

What is the issue being fixed here? I can see how current config can go wrong in

Make the world build OK when possible, for example, when no x11 in DISTRO_FEATURE.

Quoted 4 lines

some situations but I'm not sure if the approach "if x11 is not a DISTRO_FEATURE, then automatically use direcfb" is much better. Especially for
cairo: I would have thought building multiple surface backends is a valid choice there?

Yes, this is not a perfect solution, I don't like to pull in directfb either. We can override PACKAGECONFIG to custom the build.

// Robert

Quoted 67 lines

Jussi

Quoted 1 line

<mailto:[email protected]>>

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr

Quoted 10 lines
---
 meta/recipes-gnome/gtk+/gtk+.inc      |    5 ++---
 meta/recipes-graphics/cairo/cairo.inc |    8 ++++++--
 2 files changed, 8 insertions(+), 5 deletions(-)
meta/recipes-gnome/gtk+/gtk+.inc +0 -0
index be5273d..9d697cdb 100644
@@ -17,9 +17,8 @@ X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr

libxdamage libxrender

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr · line 17

Quoted 1 line
meta/recipes-gnome/gtk+/gtk+.inc +0 -0
 DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native

docbook-utils-native \

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender

Quoted 3 lines
meta/recipes-gnome/gtk+/gtk+.inc +0 -1
  cairo gdk-pixbuf"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '',

d)} \

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr · line 21

Quoted 1 line
meta/recipes-gnome/gtk+/gtk+.inc +0 -1
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb',

'', d)} \

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender

Quoted 3 lines
meta/recipes-gnome/gtk+/gtk+.inc +2 -1
-"
+# Requires x11 or directfb
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11',

'directfb', d)}"

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr · line 22

Quoted 2 lines
meta/recipes-gnome/gtk+/gtk+.inc +0 -0
 PACKAGECONFIG[x11] = "--with-x=yes

--with-gdktarget=x11,--with-x=no,${X11DEPENDS}"

meta/recipes-gnome/gtk+/gtk+.inc X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr · line 23

Quoted 1 line
meta/recipes-gnome/gtk+/gtk+.inc +0 -0
 # without --with-gdktarget=directfb it will check for cairo-xlib which isn't

available without X11 DISTRO_FEATURE

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-graphics/cairo/cairo.inc

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 20

Quoted 8 lines

index 1e45318..f6474bc 100644

meta/recipes-graphics/cairo/cairo.inc +0 -1
@@ -17,8 +17,12 @@ LICENSE_${PN}-perf-utils = "GPLv3+"
 X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb',

'', d)} \

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 21

Quoted 1 line
meta/recipes-graphics/cairo/cairo.inc +0 -1
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb',

'', d)}"

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 21

Quoted 2 lines
meta/recipes-graphics/cairo/cairo.inc +2 -0
+# Build cairo-xlib or cairo-directfb for gtk+
+PACKAGECONFIG ??= " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11

xcb', 'directfb', d)} \

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+"

Quoted 4 lines
meta/recipes-graphics/cairo/cairo.inc +4 -0
+                    "
+
+# No directfb-native, so set PACKAGECONFIG to null when no x11
+PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES',

'x11', 'x11', '', d)}"

meta/recipes-graphics/cairo/cairo.inc LICENSE_${PN}-perf-utils = "GPLv3+" · line 26

Quoted 2 lines
meta/recipes-graphics/cairo/cairo.inc +0 -0
 PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no

--disable-xlib,${X11DEPENDS}"

Quoted 8 lines
meta/recipes-graphics/cairo/cairo.inc +0 -1
 PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
--

1.7.9.5

--
_______________________________________________
Openembedded-core mailing list
[email protected]

<mailto:[email protected]>

Quoted 1 line

http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw

Re: [PATCH 1/4] gtk+/cairo: enable x11 or directfb

Quoted 3 lines · Robert Yang

Make the world build OK when possible, for example, when no x11 in DISTRO_FEATURE.

But now you're just explicitly ignoring the directfb DISTRO_FEATURE. Maybe if you want to do a world build without X11 enabled the you should add directfb to DISTRO_FEATURES?

Ross

#5 lore raw

Re: [PATCH 1/4] gtk+/cairo: enable x11 or directfb

Quoted 11 lines · Ross

On 16 September 2015 at 11:34, Robert Yang <[email protected] <mailto:[email protected]>> wrote:

Make the world build OK when possible, for example, when no x11 in DISTRO_FEATURE.

But now you're just explicitly ignoring the directfb DISTRO_FEATURE. Maybe if you want to do a world build without X11 enabled the you should add directfb to DISTRO_FEATURES?

If I understand correctly, how about we add a sanity check when do world build? Either X11 or directfb should be in DISTRO_FEATURES. But gtk+ is the only one which requires this, others can be built without both of them.

// Robert

Quoted 2 lines

Ross

#6 lore raw

Re: [PATCH 1/4] gtk+/cairo: enable x11 or directfb

Quoted 4 lines · Robert Yang

If I understand correctly, how about we add a sanity check when do world build? Either X11 or directfb should be in DISTRO_FEATURES. But gtk+ is the only one which requires this, others can be built without both of them.

I don't think we need a sanity test for that. If you want to do a world build a limited set of DISTRO_FEATURES then we need to path in more required_distro_features checks and/or you exclude recipes from world builds (using EXCLUDE_FROM_WORLD).

Ross

#7 lore raw

PATCH 2/4 libsdl: depends on libglu when both x11 and opengl

In reply to Robert Yang

The libglu requires both opengl (depends on virtual/libgl) and x11 (needs libGL.so which is provided by mesa when x11 in DISTRO_FEATURES), so let libsdl depends on libglu when both x11 and opengl in DISTRO_FEATURES.

---
 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-graphics/libsdl/libsdl_1.2.15.bb +2 -1
index 266bd42..c0d5c6a 100644
@@ -13,8 +13,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
 PROVIDES = "virtual/libsdl"
 
 DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl libglu', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} \
            ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxext libxrandr libxrender', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'libglu', '', d)} \
            tslib"
 DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
 
Signature · 1 line
1.7.9.5
#8 lore raw

PATCH 3/4 insane.bbclass: fix package_qa_check_buildpaths

In reply to Robert Yang

* Ignore elf files because they usually contain build path:
- The path of the source file such as .c, these are usually happen when separate B and S since we use absolute path to run configure script, and then VPATH in Makefile will be an absolute path and contains build path, we can use relative path in autotools.bbclass to fix the problem, but we don't have to since they are harmless.
- The configure options such as "configure --with-libtool-sysroot"
- The compile options such as "gcc --sysroot"
These are harmless usually, so ignore elf files.

* Ignore "-dbg" and "-staticdev" package since symbols and .a files usually contain buildpath.

* Ignore .a files too since they contain buildpath, this mainly for ignoring:
glibc-2.21: glibc-dev/usr/lib/libc_nonshared.a libgcc-4.9.3: libgcc-dev/usr/lib/x86_64-poky-linux/4.9.3/libgcc_eh.a gcc-runtime-4.9.3: libssp-dev/usr/lib/libssp_nonshared.a

* Use full path rather than package_qa_clean_path() when report issue, this makes it easier to find the file and fix the problem.

Then we will verify other warings and fix one be one.

---
 meta/classes/insane.bbclass |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
meta/classes/insane.bbclass +9 -3
index 5c8629a..943ada8 100644
@@ -571,8 +571,14 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
     """
     Check for build paths inside target files and error if not found in the whitelist
     """
-    # Ignore .debug files, not interesting
-    if path.find(".debug") != -1:
+
+    # Ignore staticdev and debug files since symbols and .a usually
+    # contain buildpath.
+    if name.endswith("-dbg") or name.endswith("-staticdev"):
+        return
+
+    # Ignore elf and .a files
+    if elf or path.endswith('.a'):
         return
 
     # Ignore symlinks
@@ -583,7 +589,7 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
     with open(path) as f:
         file_content = f.read()
         if tmpdir in file_content:
-            messages["buildpaths"] = "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d)
+            messages["buildpaths"] = "File %s in package contained reference to tmpdir" % path
 
 
 QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi"
Signature · 1 line
1.7.9.5
#9 lore raw

Re: [PATCH 3/4] insane.bbclass: fix package_qa_check_buildpaths

Quoted 9 lines · Robert Yang

* Ignore elf files because they usually contain build path:
- The path of the source file such as .c, these are usually happen when separate B and S since we use absolute path to run configure script, and then VPATH in Makefile will be an absolute path and contains build path, we can use relative path in autotools.bbclass to fix the problem, but we don't have to since they are harmless.
- The configure options such as "configure --with-libtool-sysroot"
- The compile options such as "gcc --sysroot"
These are harmless usually, so ignore elf files.

I'm not sure about this. Yes, elf files have large issues in the debug symbols but the main elf files really shouldn't have build paths in them. I understand they can creep in through a variety of sources including B!=S but we should really be identifying them and fixing them, not pretending they don't exist. The whole point of this check originally was to get to the bottom of this!

Quoted 2 lines

* Ignore "-dbg" and "-staticdev" package since symbols and .a files usually contain buildpath.

Ideally, we should be fixing the debug code so its using target paths rather than build ones too...

Cheers,

Richard

Quoted 10 lines

* Ignore .a files too since they contain buildpath, this mainly for ignoring:
glibc-2.21: glibc-dev/usr/lib/libc_nonshared.a libgcc-4.9.3: libgcc-dev/usr/lib/x86_64-poky-linux/4.9.3/libgcc_eh.a gcc-runtime-4.9.3: libssp-dev/usr/lib/libssp_nonshared.a

* Use full path rather than package_qa_clean_path() when report issue, this makes it easier to find the file and fix the problem.

Then we will verify other warings and fix one be one.

#10 lore raw

Re: [PATCH 3/4] insane.bbclass: fix package_qa_check_buildpaths

Quoted 11 lines · Richard Purdie
Quoted 9 lines · Robert Yang

* Ignore elf files because they usually contain build path:
- The path of the source file such as .c, these are usually happen when separate B and S since we use absolute path to run configure script, and then VPATH in Makefile will be an absolute path and contains build path, we can use relative path in autotools.bbclass to fix the problem, but we don't have to since they are harmless.
- The configure options such as "configure --with-libtool-sysroot"
- The compile options such as "gcc --sysroot"
These are harmless usually, so ignore elf files.

Quoted 6 lines

I'm not sure about this. Yes, elf files have large issues in the debug symbols but the main elf files really shouldn't have build paths in them. I understand they can creep in through a variety of sources including B!=S but we should really be identifying them and fixing them, not pretending they don't exist. The whole point of this check originally was to get to the bottom of this!

Thanks, the fix will change a lot to the build behaviour, I'd like to fix them in 2.1.

// Robert

Quoted 25 lines
Quoted 3 lines

* Ignore "-dbg" and "-staticdev" package since symbols and .a files usually contain buildpath.

Ideally, we should be fixing the debug code so its using target paths rather than build ones too...

Cheers,

Richard

Quoted 10 lines

* Ignore .a files too since they contain buildpath, this mainly for ignoring:

   glibc-2.21: glibc-dev/usr/lib/libc_nonshared.a
   libgcc-4.9.3: libgcc-dev/usr/lib/x86_64-poky-linux/4.9.3/libgcc_eh.a
   gcc-runtime-4.9.3: libssp-dev/usr/lib/libssp_nonshared.a

* Use full path rather than package_qa_clean_path() when report issue, this makes it easier to find the file and fix the problem.

Then we will verify other warings and fix one be one.

#11 lore raw

Re: [PATCH 3/4] insane.bbclass: fix package_qa_check_buildpaths

Quoted 19 lines · Robert Yang
Quoted 11 lines · Richard Purdie
Quoted 9 lines · Robert Yang

* Ignore elf files because they usually contain build path:
- The path of the source file such as .c, these are usually happen when separate B and S since we use absolute path to run configure script, and then VPATH in Makefile will be an absolute path and contains build path, we can use relative path in autotools.bbclass to fix the problem, but we don't have to since they are harmless.
- The configure options such as "configure --with-libtool-sysroot"
- The compile options such as "gcc --sysroot"
These are harmless usually, so ignore elf files.

Quoted 6 lines

I'm not sure about this. Yes, elf files have large issues in the debug symbols but the main elf files really shouldn't have build paths in them. I understand they can creep in through a variety of sources including B!=S but we should really be identifying them and fixing them, not pretending they don't exist. The whole point of this check originally was to get to the bottom of this!

Quoted 2 lines

Thanks, the fix will change a lot to the build behaviour, I'd like to fix them in 2.1.

Agreed, this is 2.1 material at this point.

Cheers,

Richard

#12 lore raw

PATCH 4/4 insane.bbclass: make package_qa_clean_path return a relative path

In reply to Robert Yang

Make package_qa_clean_path() return something like "work/path/to/file" rather than "/work/path/to/file", the relative path is a little clear.

---
 meta/classes/insane.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/insane.bbclass +1 -1
index 943ada8..628b63f 100644
@@ -166,7 +166,7 @@ def package_qa_get_machine_dict():
 
 def package_qa_clean_path(path,d):
     """ Remove the common prefix from the path. In this case it is the TMPDIR"""
-    return path.replace(d.getVar('TMPDIR',True),"")
+    return path.replace(d.getVar("TMPDIR", True) + "/", "")
 
 def package_qa_write_error(type, error, d):
     logfile = d.getVar('QA_LOGFILE', True)
Signature · 1 line
1.7.9.5