A few misc fixes from meta-mentor-staging
cover A few misc fixes from meta-mentor-staging
From: Christopher Larson <[email protected]>
The following changes since commit 83c9405df5748744ef673ac8757bb89d7050ad8d:
alsa-tools: rewrite packaging (2018-06-15 11:18:15 +0100)
are available in the git repository at:
[email protected]:kergoth/openembedded-core.git misc-fixes
for you to fetch changes up to 5ce7b09e00b4967d2c0efaad58049cf871fab57a:
perf: drop the rdep on man (2018-06-16 02:04:35 +0500)
----------------------------------------------------------------
Christopher Larson (6):
oe.scriptutils.run_editor: ditch the error-prone argument quoting
pcmciautils: depend on bison-native
console-tools: add missing flex/bison deps
ovmf: set PARALLEL_MAKE for target as well
dmidecode: correct docdir
perf: drop the rdep on man
meta/recipes-bsp/pcmciautils/pcmciautils.inc | 2 +- .../console-tools/console-tools_0.3.2.bb | 1 + meta/recipes-core/ovmf/ovmf_git.bb | 2 +- meta/recipes-devtools/dmidecode/dmidecode_3.1.bb | 4 ++++ meta/recipes-kernel/perf/perf.bb | 1 - scripts/lib/scriptutils.py | 24 +++++++++++----------- 6 files changed, 19 insertions(+), 15 deletions(-)
Signature · 1 line
2.11.1
PATCH 1/6 oe.scriptutils.run_editor: ditch the error-prone argument quoting
From: Christopher Larson <[email protected]>
Rather than trying to construct a string by quoting the files in an error-prone way, parse $EDITOR to pass a list to subprocess rather than a string.
--- scripts/lib/scriptutils.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
scripts/lib/scriptutils.py +12 -12
@@ -15,16 +15,17 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import sys -import os -import logging -import glob import argparse -import subprocess -import tempfile -import shutil +import glob +import logging +import os import random +import shlex +import shutil import string +import subprocess +import sys +import tempfile def logger_create(name, stream=None): logger = logging.getLogger(name)
@@ -214,15 +215,14 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr def run_editor(fn, logger=None): if isinstance(fn, str): - params = '"%s"' % fn + files = [fn] else: - params = '' - for fnitem in fn: - params += ' "%s"' % fnitem + files = fn editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi')) try: - return subprocess.check_call('%s %s' % (editor, params), shell=True) + print(shlex.split(editor) + files) + return subprocess.check_call(shlex.split(editor) + files) except subprocess.CalledProcessError as exc: logger.error("Execution of '%s' failed: %s" % (editor, exc)) return 1
Signature · 1 line
2.11.1
Re: [PATCH 1/6] oe.scriptutils.run_editor: ditch the error-prone argument quoting
Quoted 27 lines · Christopher Larson
From: Christopher Larson <[email protected]>
Rather than trying to construct a string by quoting the files in an error-prone way, parse $EDITOR to pass a list to subprocess rather than
a string.Signed-off-by Christopher Larson <[email protected]>--- scripts/lib/scriptutils.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)scripts/lib/scriptutils.py +0
-0@@ -214,15 +215,14 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir,logger, preserve_tmp=False, mirr
def
run_editor(fn, logger=None):
ifisinstance(fn, str):scripts/lib/scriptutils.py +1
-4- params = '"%s"' % fn + files = [fn] else: - params = '' - for fnitem in fn: - params += ' "%s"' % fnitem
scripts/lib/scriptutils.py def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr · line 228
Quoted 10 lines
scripts/lib/scriptutils.py +3
-1+ files = fn editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi')) try: - return subprocess.check_call('%s %s' % (editor, params), shell=True) + print(shlex.split(editor) + files) + return subprocess.check_call(shlex.split(editor) + files) except subprocess.CalledProcessError as exc: logger.error("Execution of '%s' failed: %s" % (editor, exc)) return 1
I'm guessing you didn't mean to leave the print() above in?
If the print is there, it breaks:
"oe-selftest -r devtool.DevtoolTests.test_devtool_add"
I can comment it out...
Cheers,
Richard
Re: [PATCH 1/6] oe.scriptutils.run_editor: ditch the error-prone argument quoting
Quoted 40 lines · Richard Purdie
Quoted 22 lines · Christopher Larson
From: Christopher Larson <[email protected]>
Rather than trying to construct a string by quoting the files in an error-prone way, parse $EDITOR to pass a list to subprocess rather than
a string.Signed-off-by Christopher Larson <[email protected]>--- scripts/lib/scriptutils.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)scripts/lib/scriptutils.py +0
-0@@ -214,15 +215,14 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir,logger, preserve_tmp=False, mirr
def
run_editor(fn, logger=None):
ifisinstance(fn, str):scripts/lib/scriptutils.py +0
-1- params = '"%s"' % fnscripts/lib/scriptutils.py def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr
Quoted 10 lines
scripts/lib/scriptutils.py +2
-4+ files = [fn] else: - params = '' - for fnitem in fn: - params += ' "%s"' % fnitem + files = fn editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi')) try: - return subprocess.check_call('%s %s' % (editor, params),shell=True)
scripts/lib/scriptutils.py def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr · line 228
Quoted 5 lines
scripts/lib/scriptutils.py +2
-0+ print(shlex.split(editor) + files) + return subprocess.check_call(shlex.split(editor) + files) except subprocess.CalledProcessError as exc: logger.error("Execution of '%s' failed: %s" % (editor, exc)) return 1
Quoted 8 lines
I'm guessing you didn't mean to leave the
print()above in?If the print is there, it breaks:
"oe-selftest -r devtool.DevtoolTests.test_devtool_add"
I can comment it out...
Yeah, that was a debug remnant, sorry about that. :\
Signature · 4 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics
PATCH 2/6 pcmciautils: depend on bison-native
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
pcmciautils needs yacc as well as lex.
--- meta/recipes-bsp/pcmciautils/pcmciautils.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/pcmciautils/pcmciautils.inc +1 -1
@@ -5,7 +5,7 @@ SECTION = "kernel/userland" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -DEPENDS = "udev sysfsutils flex-native" +DEPENDS = "udev sysfsutils flex-native bison-native" RDEPENDS_${PN} = "udev module-init-tools" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/pcmcia/${BP}.tar.xz"
Signature · 1 line
2.11.1
PATCH 3/6 console-tools: add missing flex/bison deps
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
--- meta/recipes-core/console-tools/console-tools_0.3.2.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/console-tools/console-tools_0.3.2.bb +1 -0
@@ -3,6 +3,7 @@ DESCRIPTION = "Provides tools that enable the set-up and manipulation of the lin SECTION = "base" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING.kbd;md5=9b2d91511d3d80d4d20ac6e6b0137fe9" +DEPENDS = "flex-native bison-native" PR = "r8" SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
Signature · 1 line
2.11.1
PATCH 4/6 ovmf: set PARALLEL_MAKE for target as well
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
This can fail for target, not just native.
--- meta/recipes-core/ovmf/ovmf_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/ovmf/ovmf_git.bb +1 -1
@@ -39,7 +39,7 @@ SRC_URI[openssl.sha256sum] = "57be8618979d80c910728cfc99369bf97b2a1abd8f366ab6eb inherit deploy -PARALLEL_MAKE_class-native = "" +PARALLEL_MAKE = "" S = "${WORKDIR}/git"
Signature · 1 line
2.11.1
PATCH 5/6 dmidecode: correct docdir
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
Without this, the package clutters up the root of /usr/share/doc.
--- meta/recipes-devtools/dmidecode/dmidecode_3.1.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta/recipes-devtools/dmidecode/dmidecode_3.1.bb +4 -0
@@ -9,6 +9,10 @@ COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux" EXTRA_OEMAKE = "-e MAKEFLAGS=" +# The upstream buildsystem uses 'docdir' as the path where it puts AUTHORS, +# README, etc, but we don't want those in the root of our docdir. +docdir .= "/${BPN}" + do_install() { oe_runmake DESTDIR="${D}" install }
Signature · 1 line
2.11.1
PATCH 6/6 perf: drop the rdep on man
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
It's not common practice to make -doc rdep on man when man pages are included, and doing so prevents the recipe from building for non-gplv3
--- meta/recipes-kernel/perf/perf.bb | 1 - 1 file changed, 1 deletion(-)
meta/recipes-kernel/perf/perf.bb +0 -1
@@ -239,7 +239,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" RDEPENDS_${PN} += "elfutils bash" -RDEPENDS_${PN}-doc += "man" RDEPENDS_${PN}-archive =+ "bash" RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}" RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
Signature · 1 line
2.11.1
Re: [PATCH 6/6] perf: drop the rdep on man
Quoted 23 lines · Christopher Larson
From: Christopher Larson <[email protected]>
It's not common practice to make -doc rdep on man when man pages are included, and doing so prevents the recipe from building for non- gplv3
Signed-off-by Christopher Larson <[email protected]>--- meta/recipes-kernel/perf/perf.bb | 1 - 1 file changed, 1 deletion(-)meta/recipes- renamed from meta/recipes-kernel/perf/perf.bb +0
-0
kernel/perf/perf.bb
index51f5597eb92..5e710f61834100644meta/recipes-kernel/perf/perf.bb +0
-1@@ -239,7 +239,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" RDEPENDS_${PN} += "elfutils bash" -RDEPENDS_${PN}-doc += "man" RDEPENDS_${PN}-archive =+ "bash" RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.con
Quoted 2 lines
tains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}"
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
We're certainly not consistent but:
http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/classes/manpages.bbclass#n13
RDEPENDS_${MAN_PKG} += "${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'man-db', '', d)}"
man-db is gplv2 too...
Cheers,
Richard
Re: [PATCH 6/6] perf: drop the rdep on man
Quoted 30 lines · Richard Purdie
Quoted 23 lines · Christopher Larson
From: Christopher Larson <[email protected]>
It's not common practice to make -doc rdep on man when man pages are included, and doing so prevents the recipe from building for non- gplv3
Signed-off-by Christopher Larson <[email protected]>--- meta/recipes-kernel/perf/perf.bb | 1 - 1 file changed, 1 deletion(-)meta/recipes- renamed from meta/recipes-kernel/perf/perf.bb +0
-0
kernel/perf/perf.bb
index51f5597eb92..5e710f61834100644meta/recipes-kernel/perf/perf.bb +0
-1@@ -239,7 +239,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" RDEPENDS_${PN} += "elfutils bash" -RDEPENDS_${PN}-doc += "man" RDEPENDS_${PN}-archive =+ "bash" RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.conQuoted 2 lines
tains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}"
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"We're certainly not consistent but:
Quoted 7 lines
http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/classes/manpages.bbclass#n13
RDEPENDS_${MAN_PKG} += "${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'man-db', '', d)}"
man-db is gplv2 too...
Ah, well spotted, I didn't know about that one. If that's the case, I'll drop this patch and rework both it and manpages.bbclass to make the rdep conditional on license compatibility. Thanks!
Signature · 4 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics