Skip to contentSkip to conversation

libc-package.bbclass: Correct a few paths for when usrmerge is used

PATCH Superseded Peter Kjellerstedt 4 participants 7 messages Feb 17, 2019 – Feb 19, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 libc-package.bbclass: Correct a few paths for when usrmerge is used

---
 meta/classes/libc-package.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/classes/libc-package.bbclass +3 -3
index 0b4c666a74..60000a9547 100644
@@ -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
Signature · 1 line
2.12.0
#1 lore raw

PATCH 2/3 libc-package.bbclass: Only extract wanted files in prep_locale_tree()

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.

---
 meta/classes/libc-package.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes/libc-package.bbclass +6 -1
index 60000a9547..ee598905b0 100644
@@ -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} './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
Signature · 1 line
2.12.0
#2 lore raw

PATCH 3/3 libc-package.bbclass: Add a progress meter for the package task

In reply to Peter Kjellerstedt

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.

---
 meta/classes/libc-package.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/libc-package.bbclass +5 -0
index ee598905b0..f1c0545c67 100644
@@ -348,11 +348,16 @@ 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()))
+        i = 1
+        total = len(commands)
         for cmd in commands:
             m.write(cmd + ":\n")
+            m.write("\t@echo 'Progress %d/%d'\n" % (i, total))
             m.write("\t" + commands[cmd] + "\n\n")
+            i = i + 1
         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")
Signature · 1 line
2.12.0
#5 lore raw
In reply to Peter Kjellerstedt
Quoted 4 lines · Peter Kjellerstedt
---
 meta/classes/libc-package.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

I included this patchset in a run on the autobuilder and its failing:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/66

I know the resulttool failures are my fault but the glibc-locale ones aren't. I'll abort the build as there are enough failures to know its doomed and I need a results set for other testing.

Cheers,

Richard

#3 lore raw

Re: [PATCH 3/3] libc-package.bbclass: Add a progress meter for the package task

In reply to Peter Kjellerstedt
Quoted 15 lines · Peter Kjellerstedt

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.

---
 meta/classes/libc-package.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/libc-package.bbclass +0 -0
index ee598905b0..f1c0545c67 100644

meta/classes/libc-package.bbclass python package_do_split_gconvs () { · line 355

Quoted 8 lines
meta/classes/libc-package.bbclass +2 -0
@@ -348,11 +348,16 @@ 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()))
+        i = 1
+        total = len(commands)
         for cmd in commands:
 

for i, cmd in enumerate(commands):

Signature · 4 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
#4 lore raw

Re: [PATCH 3/3] libc-package.bbclass: Add a progress meter for the package task

Nice, then I’ve learnt something new today. :)

//Peter

From: Christopher Larson <[email protected]>
Sent: den 18 februari 2019 02:21
To: Peter Kjellerstedt <[email protected]>
Cc: Patches and discussions about the oe-core layer <[email protected]>
Subject: Re: [OE-core] [PATCH 3/3] libc-package.bbclass: Add a progress meter for the package task

On Sun, Feb 17, 2019 at 7:51 AM Peter Kjellerstedt <[email protected]<mailto:[email protected]>> wrote:
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.

---
 meta/classes/libc-package.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/libc-package.bbclass +2 -0
index ee598905b0..f1c0545c67 100644
@@ -348,11 +348,16 @@ 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()))
+        i = 1
+        total = len(commands)
         for cmd in commands:
 

for i, cmd in enumerate(commands):
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

#6 lore raw
In reply to Richard Purdie

I am seeing locale packaging errors too
https://errors.yoctoproject.org/Errors/Build/76954/

Quoted 24 lines · Richard Purdie
Quoted 4 lines · Peter Kjellerstedt
---
 meta/classes/libc-package.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

I included this patchset in a run on the autobuilder and its failing:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/66

I know the resulttool failures are my fault but the glibc-locale ones aren't. I'll abort the build as there are enough failures to know its doomed and I need a results set for other testing.

Cheers,

Richard

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