All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 1/3] libc-package.bbclass: Correct a few paths for when usrmerge is used
@ 2019-02-18  7:08 Peter Kjellerstedt
  2019-02-18  7:08 ` [PATCHv2 2/3] libc-package.bbclass: Only extract wanted files in prep_locale_tree() Peter Kjellerstedt
  2019-02-18  7:08 ` [PATCHv2 3/3] libc-package.bbclass: Add a progress meter for the package task Peter Kjellerstedt
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2019-02-18  7:08 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/classes/libc-package.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 0b4c666a74..60000a9547 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -68,8 +68,8 @@ do_prep_locale_tree() {
 		gunzip $i
 	done
 	tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir}
-	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then
-		tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
+	if [ -f ${STAGING_LIBDIR_NATIVE}/libgcc_s.* ]; then
+		tar -cf - -C ${STAGING_LIBDIR_NATIVE} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
 	fi
 	install -m 0755 ${LOCALETREESRC}${bindir}/localedef $treedir/${base_bindir}
 }
@@ -278,7 +278,7 @@ python package_do_split_gconvs () {
             qemu_options = d.getVar('QEMU_OPTIONS')
 
             cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \
-                -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \
+                -E LD_LIBRARY_PATH=%s %s %s${base_bindir}/localedef %s" % \
                 (path, i18npath, qemu, treedir, ldlibdir, qemu_options, treedir, localedef_opts)
 
         commands["%s/%s" % (outputpath, name)] = cmd
-- 
2.12.0



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

* [PATCHv2 2/3] libc-package.bbclass: Only extract wanted files in prep_locale_tree()
  2019-02-18  7:08 [PATCHv2 1/3] libc-package.bbclass: Correct a few paths for when usrmerge is used Peter Kjellerstedt
@ 2019-02-18  7:08 ` Peter Kjellerstedt
  2019-02-18  7:08 ` [PATCHv2 3/3] libc-package.bbclass: Add a progress meter for the package task Peter Kjellerstedt
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2019-02-18  7:08 UTC (permalink / raw)
  To: openembedded-core

prep_locale_tree() predates the usrmerge DISTRO_FEATURE, which meant it
was not prepared for the case when ${base_libdir} == ${libdir}. This
lead to it extracting files and directories where it shouldn't.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

PATCHv2: Apparently, some versions of tar require the --wildcards 
option to allow wildcard to be used.

 meta/classes/libc-package.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 60000a9547..cf0d8901e3 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -67,7 +67,12 @@ do_prep_locale_tree() {
 	for i in $treedir/${datadir}/i18n/charmaps/*gz; do 
 		gunzip $i
 	done
-	tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir}
+	# The extract pattern "./l*.so*" is carefully selected so that it will
+	# match ld*.so and lib*.so*, but not any files in the gconv directory
+	# (if it exists). This makes sure we only unpack the files we need.
+	# This is important in case usrmerge is set in DISTRO_FEATURES, which
+	# means ${base_libdir} == ${libdir}.
+	tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir} --wildcards './l*.so*'
 	if [ -f ${STAGING_LIBDIR_NATIVE}/libgcc_s.* ]; then
 		tar -cf - -C ${STAGING_LIBDIR_NATIVE} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
 	fi
-- 
2.12.0



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

* [PATCHv2 3/3] libc-package.bbclass: Add a progress meter for the package task
  2019-02-18  7:08 [PATCHv2 1/3] libc-package.bbclass: Correct a few paths for when usrmerge is used Peter Kjellerstedt
  2019-02-18  7:08 ` [PATCHv2 2/3] libc-package.bbclass: Only extract wanted files in prep_locale_tree() Peter Kjellerstedt
@ 2019-02-18  7:08 ` Peter Kjellerstedt
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2019-02-18  7:08 UTC (permalink / raw)
  To: openembedded-core

The package task for glibc-locale takes a very long time to execute,
especially if using qemu. In that case, a progress meter helps a lot to
show the progress of the task.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

PATCHv2: Use enumerate().

 meta/classes/libc-package.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index cf0d8901e3..34c9151ae9 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -348,11 +348,14 @@ python package_do_split_gconvs () {
         makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
         m = open(makefile, "w")
         m.write("all: %s\n\n" % " ".join(commands.keys()))
-        for cmd in commands:
+        total = len(commands)
+        for i, cmd in enumerate(commands):
             m.write(cmd + ":\n")
+            m.write("\t@echo 'Progress %d/%d'\n" % (i, total))
             m.write("\t" + commands[cmd] + "\n\n")
         m.close()
         d.setVar("EXTRA_OEMAKE", "-C %s ${PARALLEL_MAKE}" % (os.path.dirname(makefile)))
+        d.setVarFlag("oe_runmake", "progress", "outof:Progress\s(\d+)/(\d+)")
         bb.note("Executing binary locale generation makefile")
         bb.build.exec_func("oe_runmake", d)
         bb.note("collecting binary locales from locale tree")
-- 
2.12.0



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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18  7:08 [PATCHv2 1/3] libc-package.bbclass: Correct a few paths for when usrmerge is used Peter Kjellerstedt
2019-02-18  7:08 ` [PATCHv2 2/3] libc-package.bbclass: Only extract wanted files in prep_locale_tree() Peter Kjellerstedt
2019-02-18  7:08 ` [PATCHv2 3/3] libc-package.bbclass: Add a progress meter for the package task Peter Kjellerstedt

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.