All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] package: Rework debug source file handling
@ 2019-02-16 21:46 Richard Purdie
  2019-02-16 21:46 ` [PATCH 2/7] lib/oe/utils: Fix hang in multiprocess_launch() Richard Purdie
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Richard Purdie @ 2019-02-16 21:46 UTC (permalink / raw)
  To: openembedded-core

Currently we parallel process the files we install running dwarfsrcfiles over
each one in parallel threads but requiring a lock to write the results to one
file. This is not ideal for performance and means we can't then use per file
data for other purposes such as source code license processing.

Rework the code so that the list of source files is generated per installed
file and is reusable.

The code still generates a null separated debugsources.list file since this
is used by a shell pipeline but it no longer needs locking.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package.bbclass | 50 +++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 23 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 7dd1b09a874..749c7d9ea14 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -344,7 +344,7 @@ def parse_debugsources_from_dwarfsrcfiles_output(dwarfsrcfiles_output):
 
     return debugfiles.keys()
 
-def append_source_info(file, sourcefile, d, fatal=True):
+def source_info(file, d, fatal=True):
     import subprocess
 
     cmd = ["dwarfsrcfiles", file]
@@ -363,22 +363,15 @@ def append_source_info(file, sourcefile, d, fatal=True):
         bb.note(msg)
 
     debugsources = parse_debugsources_from_dwarfsrcfiles_output(output)
-    # filenames are null-separated - this is an artefact of the previous use
-    # of rpm's debugedit, which was writing them out that way, and the code elsewhere
-    # is still assuming that.
-    debuglistoutput = '\0'.join(debugsources) + '\0'
-    lf = bb.utils.lockfile(sourcefile + ".lock")
-    with open(sourcefile, 'a') as sf:
-        sf.write(debuglistoutput)
-    bb.utils.unlockfile(lf)
 
+    return list(debugsources)
 
-def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, sourcefile, d):
+def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d):
     # Function to split a single file into two components, one is the stripped
     # target system binary, the other contains any debugging information. The
     # two files are linked to reference each other.
     #
-    # sourcefile is also generated containing a list of debugsources
+    # return a mapping of files:debugsources
 
     import stat
     import subprocess
@@ -386,6 +379,7 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir,
     src = file[len(dvar):]
     dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
     debugfile = dvar + dest
+    sources = []
 
     # Split the file...
     bb.utils.mkdirhier(os.path.dirname(debugfile))
@@ -397,7 +391,7 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir,
 
     # We ignore kernel modules, we don't generate debug info files.
     if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
-        return 1
+        return (file, sources)
 
     newmode = None
     if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
@@ -407,7 +401,7 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir,
 
     # We need to extract the debug src information here...
     if debugsrcdir:
-        append_source_info(file, sourcefile, d)
+        sources = source_info(file, d)
 
     bb.utils.mkdirhier(os.path.dirname(debugfile))
 
@@ -419,17 +413,26 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir,
     if newmode:
         os.chmod(file, origmode)
 
-    return 0
+    return (file, sources)
 
-def copydebugsources(debugsrcdir, d):
+def copydebugsources(debugsrcdir, sources, d):
     # The debug src information written out to sourcefile is further processed
     # and copied to the destination here.
 
     import stat
     import subprocess
 
-    sourcefile = d.expand("${WORKDIR}/debugsources.list")
-    if debugsrcdir and os.path.isfile(sourcefile):
+    if debugsrcdir and sources:
+        sourcefile = d.expand("${WORKDIR}/debugsources.list")
+        bb.utils.remove(sourcefile)
+
+        # filenames are null-separated - this is an artefact of the previous use
+        # of rpm's debugedit, which was writing them out that way, and the code elsewhere
+        # is still assuming that.
+        debuglistoutput = '\0'.join(sources) + '\0'
+        with open(sourcefile, 'a') as sf:
+           sf.write(debuglistoutput)
+
         dvar = d.getVar('PKGD')
         strip = d.getVar("STRIP")
         objcopy = d.getVar("OBJCOPY")
@@ -933,9 +936,6 @@ python split_and_strip_files () {
         debuglibdir = ""
         debugsrcdir = "/usr/src/debug"
 
-    sourcefile = d.expand("${WORKDIR}/debugsources.list")
-    bb.utils.remove(sourcefile)
-
     #
     # First lets figure out all of the files we may have to process ... do this only once!
     #
@@ -1040,11 +1040,15 @@ python split_and_strip_files () {
     # First lets process debug splitting
     #
     if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
-        oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, sourcefile, d))
+        results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d))
 
         if debugsrcdir and not targetos.startswith("mingw"):
             for file in staticlibs:
-                append_source_info(file, sourcefile, d, fatal=False)
+                results.extend(source_info(file, d, fatal=False))
+
+        sources = set()
+        for r in results:
+            sources.update(r[1])
 
         # Hardlink our debug symbols to the other hardlink copies
         for ref in inodes:
@@ -1092,7 +1096,7 @@ python split_and_strip_files () {
 
         # Process the debugsrcdir if requested...
         # This copies and places the referenced sources for later debugging...
-        copydebugsources(debugsrcdir, d)
+        copydebugsources(debugsrcdir, sources, d)
     #
     # End of debug splitting
     #
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/7] lib/oe/utils: Fix hang in multiprocess_launch()
  2019-02-16 21:46 [PATCH 1/7] package: Rework debug source file handling Richard Purdie
@ 2019-02-16 21:46 ` Richard Purdie
  2019-02-16 21:46 ` [PATCH 3/7] quilt-native: Remove RDEPENDS on util-linux-native Richard Purdie
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2019-02-16 21:46 UTC (permalink / raw)
  To: openembedded-core

If large results values are returned by the subprocesses, we can hit a deadlock
where the subprocess is trying to write data back to the parent, the pipe is full
and the parent is waiting for the child to exit.

Avoid this by calling the update() method which would trigger reading a result
from the child, avoiding the deadlock. The issue is described in
https://bugs.python.org/issue8426

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/lib/oe/utils.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 0c1d48a209e..3a496090f3a 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -307,6 +307,10 @@ def multiprocess_launch(target, items, d, extraargs=None):
             p.start()
             launched.append(p)
         for q in launched:
+            # Have to manually call update() to avoid deadlocks. The pipe can be full and
+            # transfer stalled until we try and read the results object but the subprocess won't exit
+            # as it still has data to write (https://bugs.python.org/issue8426)
+            q.update()
             # The finished processes are joined when calling is_alive()
             if not q.is_alive():
                 if q.exception:
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/7] quilt-native: Remove RDEPENDS on util-linux-native
  2019-02-16 21:46 [PATCH 1/7] package: Rework debug source file handling Richard Purdie
  2019-02-16 21:46 ` [PATCH 2/7] lib/oe/utils: Fix hang in multiprocess_launch() Richard Purdie
@ 2019-02-16 21:46 ` Richard Purdie
  2019-02-16 21:46 ` [PATCH 4/7] glib-2.0-native: Break circular dependency on shared-mime-utils Richard Purdie
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2019-02-16 21:46 UTC (permalink / raw)
  To: openembedded-core

This code is actually inactive and inaccurate. If we fix other code to
enable native RDEPENDS handling, this then breaks.

quilt-native is early in the dependency tree and can't depend on
util-linux-native which may need to applu patches. The pieces of
util-linux which quilt needs are long established as part of HOSTTOOLS.

The other RDEPENDS are already part of ASSUME_PROVIDED. util-linux-native
doesn't belong there since it has multiple components and is used as a valid
dependency elsewhere in the codebase.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/quilt/quilt-native.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/quilt/quilt-native.inc b/meta/recipes-devtools/quilt/quilt-native.inc
index c7067042e6a..f6b1bd53afa 100644
--- a/meta/recipes-devtools/quilt/quilt-native.inc
+++ b/meta/recipes-devtools/quilt/quilt-native.inc
@@ -1,4 +1,4 @@
-RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native util-linux-native"
+RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native"
 
 INHIBIT_AUTOTOOLS_DEPS = "1"
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/7] glib-2.0-native: Break circular dependency on shared-mime-utils
  2019-02-16 21:46 [PATCH 1/7] package: Rework debug source file handling Richard Purdie
  2019-02-16 21:46 ` [PATCH 2/7] lib/oe/utils: Fix hang in multiprocess_launch() Richard Purdie
  2019-02-16 21:46 ` [PATCH 3/7] quilt-native: Remove RDEPENDS on util-linux-native Richard Purdie
@ 2019-02-16 21:46 ` Richard Purdie
  2019-02-16 22:45   ` Peter Kjellerstedt
  2019-02-16 21:46 ` [PATCH 5/7] font-util: Break circular native RDEPENDS Richard Purdie
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Richard Purdie @ 2019-02-16 21:46 UTC (permalink / raw)
  To: openembedded-core

If we fix native RDEPENDS handling, it exposes a problem where there
is a circular dependency between shared-mime-utils and glib-2.0-native.

Break this dependency in the -native case.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-core/glib-2.0/glib.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index c9093cee866..7e2847d4b22 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -80,6 +80,7 @@ FILES_${PN}-utils = "${bindir}/*"
 RRECOMMENDS_${PN} += "shared-mime-info"
 # When cross compiling for Windows we don't want to include this
 RRECOMMENDS_${PN}_remove_mingw32 = "shared-mime-info"
+RRECOMMENDS_${PN}_class-native = ""
 
 ARM_INSTRUCTION_SET_armv4 = "arm"
 ARM_INSTRUCTION_SET_armv5 = "arm"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/7] font-util: Break circular native RDEPENDS
  2019-02-16 21:46 [PATCH 1/7] package: Rework debug source file handling Richard Purdie
                   ` (2 preceding siblings ...)
  2019-02-16 21:46 ` [PATCH 4/7] glib-2.0-native: Break circular dependency on shared-mime-utils Richard Purdie
@ 2019-02-16 21:46 ` Richard Purdie
  2019-02-16 22:48   ` Peter Kjellerstedt
  2019-02-16 21:46 ` [PATCH 6/7] native: Enable RDEPENDS handling Richard Purdie
  2019-02-16 21:46 ` [PATCH 7/7] quilt: Merge recipe files into a more coherent form Richard Purdie
  5 siblings, 1 reply; 11+ messages in thread
From: Richard Purdie @ 2019-02-16 21:46 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-graphics/xorg-font/font-util_1.3.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb b/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
index 34646ff99b4..1289c1686c6 100644
--- a/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
+++ b/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5df208ec65eb84ce5bb8d82d8f3b9675 \
 DEPENDS = "encodings util-macros"
 DEPENDS_class-native = "util-macros-native"
 RDEPENDS_${PN} = "mkfontdir mkfontscale encodings"
-RDEPENDS_${PN}_class-native = "mkfontdir-native mkfontscale-native"
+RDEPENDS_${PN}_class-native = ""
 
 BBCLASSEXTEND = "native"
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 6/7] native: Enable RDEPENDS handling
  2019-02-16 21:46 [PATCH 1/7] package: Rework debug source file handling Richard Purdie
                   ` (3 preceding siblings ...)
  2019-02-16 21:46 ` [PATCH 5/7] font-util: Break circular native RDEPENDS Richard Purdie
@ 2019-02-16 21:46 ` Richard Purdie
  2019-02-17 10:18   ` Richard Purdie
  2019-02-16 21:46 ` [PATCH 7/7] quilt: Merge recipe files into a more coherent form Richard Purdie
  5 siblings, 1 reply; 11+ messages in thread
From: Richard Purdie @ 2019-02-16 21:46 UTC (permalink / raw)
  To: openembedded-core

Native recipes don't currently honour their RDEPENDS. In the case of
some python scripts this has started causing problems since whilst they're
not needed at build time (DEPENDS), they are needed at runtime.

We put off making this change due to circular dependency issues. I believe
the two such problems in OE-Core are now fixed, as is the dependency loop
identfication code in bitbake so its time to improve this situation.

[YOCTO #10113]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/native.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 30a30f924d9..e9f6c740abb 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -192,3 +192,6 @@ do_packagedata[stamp-extra-info] = ""
 do_populate_sysroot[stamp-extra-info] = ""
 
 USE_NLS = "no"
+
+RECIPERDEPTASK = "do_populate_sysroot"
+do_populate_sysroot[rdeptask] = "${RECIPERDEPTASK}"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 7/7] quilt: Merge recipe files into a more coherent form
  2019-02-16 21:46 [PATCH 1/7] package: Rework debug source file handling Richard Purdie
                   ` (4 preceding siblings ...)
  2019-02-16 21:46 ` [PATCH 6/7] native: Enable RDEPENDS handling Richard Purdie
@ 2019-02-16 21:46 ` Richard Purdie
  5 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2019-02-16 21:46 UTC (permalink / raw)
  To: openembedded-core

The style of this recipe is dated, move most of the code into the main
shared include file, making some of the configuration much clearer using
modern overrides to do so.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/quilt/quilt-native.inc  | 18 ----------------
 .../quilt/quilt-native_0.65.bb                |  2 +-
 meta/recipes-devtools/quilt/quilt.inc         | 21 ++++++++++++++++++-
 meta/recipes-devtools/quilt/quilt_0.65.bb     |  6 ------
 4 files changed, 21 insertions(+), 26 deletions(-)
 delete mode 100644 meta/recipes-devtools/quilt/quilt-native.inc

diff --git a/meta/recipes-devtools/quilt/quilt-native.inc b/meta/recipes-devtools/quilt/quilt-native.inc
deleted file mode 100644
index f6b1bd53afa..00000000000
--- a/meta/recipes-devtools/quilt/quilt-native.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native"
-
-INHIBIT_AUTOTOOLS_DEPS = "1"
-
-inherit native
-
-PATCHTOOL = "patch"
-EXTRA_OECONF_append = " --disable-nls"
-
-do_configure () {
-	oe_runconf
-}
-
-do_install_append () {
-	# Dummy quiltrc file for patch.bbclass
-	install -d ${D}${sysconfdir}/
-	touch ${D}${sysconfdir}/quiltrc
-}
diff --git a/meta/recipes-devtools/quilt/quilt-native_0.65.bb b/meta/recipes-devtools/quilt/quilt-native_0.65.bb
index 6bc7dcdb7a7..22374425fa9 100644
--- a/meta/recipes-devtools/quilt/quilt-native_0.65.bb
+++ b/meta/recipes-devtools/quilt/quilt-native_0.65.bb
@@ -1,2 +1,2 @@
 require quilt.inc
-require quilt-native.inc
+inherit native
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
index 48ed9babf7e..150df3d572f 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -11,14 +11,21 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
         file://0001-tests-Allow-different-output-from-mv.patch \
 "
 
+SRC_URI_append_class-target = " file://gnu_patch_test_fix_target.patch"
+
 SRC_URI[md5sum] = "c67ba0228f5b7b8bbe469474661f92d6"
 SRC_URI[sha256sum] = "f6cbc788e5cbbb381a3c6eab5b9efce67c776a8662a7795c7432fd27aa096819"
 
 inherit autotools-brokensep ptest
 
+INHIBIT_AUTOTOOLS_DEPS_class-native = "1"
+PATCHTOOL_class-native = "patch"
+
 CLEANBROKEN = "1"
 
 EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch"
+EXTRA_OECONF_append_class-native = " --disable-nls"
+EXTRA_AUTORECONF += "--exclude=aclocal"
 
 CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash"
 
@@ -33,6 +40,10 @@ do_configure_append () {
 	sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS	:=,' -i ${S}/Makefile
 }
 
+do_configure_class-native () {
+    oe_runconf
+}
+
 # quilt Makefiles install to BUILD_ROOT instead of DESTDIR
 do_install () {
 	oe_runmake 'BUILD_ROOT=${D}' install
@@ -40,6 +51,12 @@ do_install () {
 	rm -rf ${D}/${datadir}/emacs
 }
 
+do_install_append_class-native () {
+    # Dummy quiltrc file for patch.bbclass
+    install -d ${D}${sysconfdir}/
+    touch ${D}${sysconfdir}/quiltrc
+}
+
 do_compile_ptest() {
 	oe_runmake bin/patch-wrapper test/.depend
 }
@@ -61,7 +78,9 @@ FILES_guards = "${bindir}/guards"
 FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}"
 FILES_guards-doc = "${mandir}/man1/guards.1"
 
-RDEPENDS_${PN} = "bash"
+RDEPENDS_${PN} = "bash patch diffstat bzip2 util-linux"
+RDEPENDS_${PN}_class-native = "diffstat-native patch-native bzip2-native"
+
 RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \
                         perl-module-filehandle perl-module-getopt-std \
                         perl-module-posix perl-module-file-temp \
diff --git a/meta/recipes-devtools/quilt/quilt_0.65.bb b/meta/recipes-devtools/quilt/quilt_0.65.bb
index 5bf818d0bbc..ff9726576ec 100644
--- a/meta/recipes-devtools/quilt/quilt_0.65.bb
+++ b/meta/recipes-devtools/quilt/quilt_0.65.bb
@@ -1,8 +1,2 @@
 require quilt.inc
 inherit gettext
-
-SRC_URI += "file://gnu_patch_test_fix_target.patch"
-
-EXTRA_AUTORECONF += "--exclude=aclocal"
-
-RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/7] glib-2.0-native: Break circular dependency on shared-mime-utils
  2019-02-16 21:46 ` [PATCH 4/7] glib-2.0-native: Break circular dependency on shared-mime-utils Richard Purdie
@ 2019-02-16 22:45   ` Peter Kjellerstedt
  2019-02-17  8:52     ` Richard Purdie
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Kjellerstedt @ 2019-02-16 22:45 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> core-bounces@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 16 februari 2019 22:47
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 4/7] glib-2.0-native: Break circular
> dependency on shared-mime-utils
> 
> If we fix native RDEPENDS handling, it exposes a problem where there
> is a circular dependency between shared-mime-utils and glib-2.0-native.
> 
> Break this dependency in the -native case.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/recipes-core/glib-2.0/glib.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-
> core/glib-2.0/glib.inc
> index c9093cee866..7e2847d4b22 100644
> --- a/meta/recipes-core/glib-2.0/glib.inc
> +++ b/meta/recipes-core/glib-2.0/glib.inc
> @@ -80,6 +80,7 @@ FILES_${PN}-utils = "${bindir}/*"
>  RRECOMMENDS_${PN} += "shared-mime-info"

Wouldn't it be clearer to change this to:

RRECOMMENDS_${PN}_append_class-target = " shared-mime-info"

instead of adding the RRECOMMENDS_${PN}_class-native below?

>  # When cross compiling for Windows we don't want to include this
>  RRECOMMENDS_${PN}_remove_mingw32 = "shared-mime-info"
> +RRECOMMENDS_${PN}_class-native = ""
> 
>  ARM_INSTRUCTION_SET_armv4 = "arm"
>  ARM_INSTRUCTION_SET_armv5 = "arm"
> --
> 2.20.1

//Peter



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 5/7] font-util: Break circular native RDEPENDS
  2019-02-16 21:46 ` [PATCH 5/7] font-util: Break circular native RDEPENDS Richard Purdie
@ 2019-02-16 22:48   ` Peter Kjellerstedt
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Kjellerstedt @ 2019-02-16 22:48 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> core-bounces@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 16 februari 2019 22:47
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 5/7] font-util: Break circular native
> RDEPENDS
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/recipes-graphics/xorg-font/font-util_1.3.1.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
> b/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
> index 34646ff99b4..1289c1686c6 100644
> --- a/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
> +++ b/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
> @@ -12,7 +12,7 @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=5df208ec65eb84ce5bb8d82d8f3b9675 \
>  DEPENDS = "encodings util-macros"
>  DEPENDS_class-native = "util-macros-native"
>  RDEPENDS_${PN} = "mkfontdir mkfontscale encodings"
> -RDEPENDS_${PN}_class-native = "mkfontdir-native mkfontscale-native"
> +RDEPENDS_${PN}_class-native = ""

And the RDEPENDS above could be changed to:

RDEPENDS_${PN}_class-target = "mkfontdir mkfontscale encodings"

>  BBCLASSEXTEND = "native"
> 
> --
> 2.20.1

//Peter



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/7] glib-2.0-native: Break circular dependency on shared-mime-utils
  2019-02-16 22:45   ` Peter Kjellerstedt
@ 2019-02-17  8:52     ` Richard Purdie
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2019-02-17  8:52 UTC (permalink / raw)
  To: Peter Kjellerstedt, openembedded-core

On Sat, 2019-02-16 at 22:45 +0000, Peter Kjellerstedt wrote:
> > diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-
> > core/glib-2.0/glib.inc
> > index c9093cee866..7e2847d4b22 100644
> > --- a/meta/recipes-core/glib-2.0/glib.inc
> > +++ b/meta/recipes-core/glib-2.0/glib.inc
> > @@ -80,6 +80,7 @@ FILES_${PN}-utils = "${bindir}/*"
> >  RRECOMMENDS_${PN} += "shared-mime-info"
> 
> Wouldn't it be clearer to change this to:
> 
> RRECOMMENDS_${PN}_append_class-target = " shared-mime-info"
> 
> instead of adding the RRECOMMENDS_${PN}_class-native below?

You could argue that both ways, I see the native case as the exception.
Having the mingw32 remove in there is ugly as well and cleaning that up
at the same time might swing it.

Cheers,

Richard

> >  # When cross compiling for Windows we don't want to include this
> >  RRECOMMENDS_${PN}_remove_mingw32 = "shared-mime-info"
> > +RRECOMMENDS_${PN}_class-native = ""
> > 
> >  ARM_INSTRUCTION_SET_armv4 = "arm"
> >  ARM_INSTRUCTION_SET_armv5 = "arm"
> > --
> > 2.20.1
> 
> //Peter
> 
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 6/7] native: Enable RDEPENDS handling
  2019-02-16 21:46 ` [PATCH 6/7] native: Enable RDEPENDS handling Richard Purdie
@ 2019-02-17 10:18   ` Richard Purdie
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2019-02-17 10:18 UTC (permalink / raw)
  To: openembedded-core

On Sat, 2019-02-16 at 21:46 +0000, Richard Purdie wrote:
> Native recipes don't currently honour their RDEPENDS. In the case of
> some python scripts this has started causing problems since whilst they're
> not needed at build time (DEPENDS), they are needed at runtime.
> 
> We put off making this change due to circular dependency issues. I believe
> the two such problems in OE-Core are now fixed, as is the dependency loop
> identfication code in bitbake so its time to improve this situation.
> 
> [YOCTO #10113]
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/classes/native.bbclass | 3 +++
>  1 file changed, 3 insertions(+)

Just for interest, the diff for core-image-sato before/after this patch
is included below. Ideally we'd bubble the dependency to
do_prepare_recipe_sysroot rather than do_populate_sysroot but that
isn't the way the system works. In reality this shouldn't make a huge
difference to build performance other than changing task order a
little.

Cheers,

Richard

--- task-depends.dot	2019-02-17 10:11:12.216746214 +0000
+++ task-depends1.dot	2019-02-17 10:10:20.682055039 +0000
@@ -3055,6 +3055,8 @@
 "autoconf-native.do_populate_lic" -> "autoconf-native.do_patch"
 "autoconf-native.do_populate_sysroot" [label="autoconf-native do_populate_sysroot\n:2.69-r11\nvirtual:native:/media/build1/poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb"]
 "autoconf-native.do_populate_sysroot" -> "autoconf-native.do_install"
+"autoconf-native.do_populate_sysroot" -> "gnu-config-native.do_populate_sysroot"
+"autoconf-native.do_populate_sysroot" -> "m4-native.do_populate_sysroot"
 "autoconf-native.do_prepare_recipe_sysroot" [label="autoconf-native do_prepare_recipe_sysroot\n:2.69-r11\nvirtual:native:/media/build1/poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb"]
 "autoconf-native.do_prepare_recipe_sysroot" -> "autoconf-native.do_fetch"
 "autoconf-native.do_prepare_recipe_sysroot" -> "gnu-config-native.do_populate_sysroot"
@@ -3079,6 +3081,7 @@
 "automake-native.do_populate_lic" [label="automake-native do_populate_lic\n:1.16.1-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/automake/automake_1.16.1.bb"]
 "automake-native.do_populate_lic" -> "automake-native.do_patch"
 "automake-native.do_populate_sysroot" [label="automake-native do_populate_sysroot\n:1.16.1-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/automake/automake_1.16.1.bb"]
+"automake-native.do_populate_sysroot" -> "autoconf-native.do_populate_sysroot"
 "automake-native.do_populate_sysroot" -> "automake-native.do_install"
 "automake-native.do_prepare_recipe_sysroot" [label="automake-native do_prepare_recipe_sysroot\n:1.16.1-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/automake/automake_1.16.1.bb"]
 "automake-native.do_prepare_recipe_sysroot" -> "autoconf-native.do_populate_sysroot"
@@ -15498,6 +15501,7 @@
 "flex-native.do_populate_lic" -> "flex-native.do_patch"
 "flex-native.do_populate_sysroot" [label="flex-native do_populate_sysroot\n:2.6.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/flex/flex_2.6.0.bb"]
 "flex-native.do_populate_sysroot" -> "flex-native.do_install"
+"flex-native.do_populate_sysroot" -> "m4-native.do_populate_sysroot"
 "flex-native.do_prepare_recipe_sysroot" [label="flex-native do_prepare_recipe_sysroot\n:2.6.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/flex/flex_2.6.0.bb"]
 "flex-native.do_prepare_recipe_sysroot" -> "autoconf-native.do_populate_sysroot"
 "flex-native.do_prepare_recipe_sysroot" -> "automake-native.do_populate_sysroot"
@@ -17567,6 +17571,7 @@
 "gdk-pixbuf-native.do_populate_lic" -> "gdk-pixbuf-native.do_patch"
 "gdk-pixbuf-native.do_populate_sysroot" [label="gdk-pixbuf-native do_populate_sysroot\n:2.36.11-r0\nvirtual:native:/media/build1/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb"]
 "gdk-pixbuf-native.do_populate_sysroot" -> "gdk-pixbuf-native.do_install"
+"gdk-pixbuf-native.do_populate_sysroot" -> "shared-mime-info-native.do_populate_sysroot"
 "gdk-pixbuf-native.do_prepare_recipe_sysroot" [label="gdk-pixbuf-native do_prepare_recipe_sysroot\n:2.36.11-r0\nvirtual:native:/media/build1/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb"]
 "gdk-pixbuf-native.do_prepare_recipe_sysroot" -> "autoconf-native.do_populate_sysroot"
 "gdk-pixbuf-native.do_prepare_recipe_sysroot" -> "automake-native.do_populate_sysroot"
@@ -19362,6 +19367,7 @@
 "gobject-introspection-native.do_populate_lic" -> "gobject-introspection-native.do_patch"
 "gobject-introspection-native.do_populate_sysroot" [label="gobject-introspection-native do_populate_sysroot\n:1.58.3-r0\nvirtual:native:/media/build1/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.58.3.bb"]
 "gobject-introspection-native.do_populate_sysroot" -> "gobject-introspection-native.do_install"
+"gobject-introspection-native.do_populate_sysroot" -> "python3-native.do_populate_sysroot"
 "gobject-introspection-native.do_prepare_recipe_sysroot" [label="gobject-introspection-native do_prepare_recipe_sysroot\n:1.58.3-r0\nvirtual:native:/media/build1/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.58.3.bb"]
 "gobject-introspection-native.do_prepare_recipe_sysroot" -> "autoconf-archive-native.do_populate_sysroot"
 "gobject-introspection-native.do_prepare_recipe_sysroot" -> "bison-native.do_populate_sysroot"
@@ -20028,6 +20034,7 @@
 "groff-native.do_populate_lic" -> "groff-native.do_patch"
 "groff-native.do_populate_sysroot" [label="groff-native do_populate_sysroot\n:1.22.3-r0\nvirtual:native:/media/build1/poky/meta/recipes-extended/groff/groff_1.22.3.bb"]
 "groff-native.do_populate_sysroot" -> "groff-native.do_install"
+"groff-native.do_populate_sysroot" -> "perl-native.do_populate_sysroot"
 "groff-native.do_prepare_recipe_sysroot" [label="groff-native do_prepare_recipe_sysroot\n:1.22.3-r0\nvirtual:native:/media/build1/poky/meta/recipes-extended/groff/groff_1.22.3.bb"]
 "groff-native.do_prepare_recipe_sysroot" -> "autoconf-native.do_populate_sysroot"
 "groff-native.do_prepare_recipe_sysroot" -> "automake-native.do_populate_sysroot"
@@ -23986,6 +23993,7 @@
 "intltool-native.do_populate_lic" -> "intltool-native.do_patch"
 "intltool-native.do_populate_sysroot" [label="intltool-native do_populate_sysroot\n:0.51.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb"]
 "intltool-native.do_populate_sysroot" -> "intltool-native.do_install"
+"intltool-native.do_populate_sysroot" -> "libxml-parser-perl-native.do_populate_sysroot"
 "intltool-native.do_prepare_recipe_sysroot" [label="intltool-native do_prepare_recipe_sysroot\n:0.51.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb"]
 "intltool-native.do_prepare_recipe_sysroot" -> "autoconf-native.do_populate_sysroot"
 "intltool-native.do_prepare_recipe_sysroot" -> "automake-native.do_populate_sysroot"
@@ -44211,6 +44219,8 @@
 "meson-native.do_populate_lic" -> "meson-native.do_patch"
 "meson-native.do_populate_sysroot" [label="meson-native do_populate_sysroot\n:0.49.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/meson/meson_0.49.0.bb"]
 "meson-native.do_populate_sysroot" -> "meson-native.do_install"
+"meson-native.do_populate_sysroot" -> "ninja-native.do_populate_sysroot"
+"meson-native.do_populate_sysroot" -> "python3-native.do_populate_sysroot"
 "meson-native.do_prepare_recipe_sysroot" [label="meson-native do_prepare_recipe_sysroot\n:0.49.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/meson/meson_0.49.0.bb"]
 "meson-native.do_prepare_recipe_sysroot" -> "meson-native.do_fetch"
 "meson-native.do_prepare_recipe_sysroot" -> "python3-native.do_populate_sysroot"
@@ -44527,6 +44537,7 @@
 "mkfontdir-native.do_populate_lic" -> "mkfontdir-native.do_patch"
 "mkfontdir-native.do_populate_sysroot" [label="mkfontdir-native do_populate_sysroot\n1:1.0.7-r8.0\nvirtual:native:/media/build1/poky/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb"]
 "mkfontdir-native.do_populate_sysroot" -> "mkfontdir-native.do_install"
+"mkfontdir-native.do_populate_sysroot" -> "mkfontscale-native.do_populate_sysroot"
 "mkfontdir-native.do_prepare_recipe_sysroot" [label="mkfontdir-native do_prepare_recipe_sysroot\n1:1.0.7-r8.0\nvirtual:native:/media/build1/poky/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb"]
 "mkfontdir-native.do_prepare_recipe_sysroot" -> "autoconf-native.do_populate_sysroot"
 "mkfontdir-native.do_prepare_recipe_sysroot" -> "automake-native.do_populate_sysroot"
@@ -58742,6 +58753,7 @@
 "python3-setuptools-native.do_populate_lic" [label="python3-setuptools-native do_populate_lic\n:40.0.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/python/python3-setuptools_40.0.0.bb"]
 "python3-setuptools-native.do_populate_lic" -> "python3-setuptools-native.do_patch"
 "python3-setuptools-native.do_populate_sysroot" [label="python3-setuptools-native do_populate_sysroot\n:40.0.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/python/python3-setuptools_40.0.0.bb"]
+"python3-setuptools-native.do_populate_sysroot" -> "python3-native.do_populate_sysroot"
 "python3-setuptools-native.do_populate_sysroot" -> "python3-setuptools-native.do_install"
 "python3-setuptools-native.do_prepare_recipe_sysroot" [label="python3-setuptools-native do_prepare_recipe_sysroot\n:40.0.0-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/python/python3-setuptools_40.0.0.bb"]
 "python3-setuptools-native.do_prepare_recipe_sysroot" -> "python3-native.do_populate_sysroot"
@@ -59411,6 +59423,7 @@
 "qemu-helper-native.do_populate_lic" -> "qemu-helper-native.do_patch"
 "qemu-helper-native.do_populate_sysroot" [label="qemu-helper-native do_populate_sysroot\n:1.0-r1\n/media/build1/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb"]
 "qemu-helper-native.do_populate_sysroot" -> "qemu-helper-native.do_install"
+"qemu-helper-native.do_populate_sysroot" -> "qemu-native.do_populate_sysroot"
 "qemu-helper-native.do_prepare_recipe_sysroot" [label="qemu-helper-native do_prepare_recipe_sysroot\n:1.0-r1\n/media/build1/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb"]
 "qemu-helper-native.do_prepare_recipe_sysroot" -> "qemu-helper-native.do_fetch"
 "qemu-helper-native.do_prepare_recipe_sysroot" -> "qemu-native.do_populate_sysroot"
@@ -60626,6 +60639,8 @@
 "rpm-native.do_populate_lic" [label="rpm-native do_populate_lic\n1:4.14.2.1-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb"]
 "rpm-native.do_populate_lic" -> "rpm-native.do_patch"
 "rpm-native.do_populate_sysroot" [label="rpm-native do_populate_sysroot\n1:4.14.2.1-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb"]
+"rpm-native.do_populate_sysroot" -> "perl-native.do_populate_sysroot"
+"rpm-native.do_populate_sysroot" -> "python3-native.do_populate_sysroot"
 "rpm-native.do_populate_sysroot" -> "rpm-native.do_install"
 "rpm-native.do_prepare_recipe_sysroot" [label="rpm-native do_prepare_recipe_sysroot\n1:4.14.2.1-r0\nvirtual:native:/media/build1/poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb"]
 "rpm-native.do_prepare_recipe_sysroot" -> "autoconf-native.do_populate_sysroot"



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-02-17 10:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-16 21:46 [PATCH 1/7] package: Rework debug source file handling Richard Purdie
2019-02-16 21:46 ` [PATCH 2/7] lib/oe/utils: Fix hang in multiprocess_launch() Richard Purdie
2019-02-16 21:46 ` [PATCH 3/7] quilt-native: Remove RDEPENDS on util-linux-native Richard Purdie
2019-02-16 21:46 ` [PATCH 4/7] glib-2.0-native: Break circular dependency on shared-mime-utils Richard Purdie
2019-02-16 22:45   ` Peter Kjellerstedt
2019-02-17  8:52     ` Richard Purdie
2019-02-16 21:46 ` [PATCH 5/7] font-util: Break circular native RDEPENDS Richard Purdie
2019-02-16 22:48   ` Peter Kjellerstedt
2019-02-16 21:46 ` [PATCH 6/7] native: Enable RDEPENDS handling Richard Purdie
2019-02-17 10:18   ` Richard Purdie
2019-02-16 21:46 ` [PATCH 7/7] quilt: Merge recipe files into a more coherent form Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.