Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V2 2/8] populate_sdk_ext.bbclass: install multilib SDKs
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

Fixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
IMAGE_CLASSES += "testimage"

$ bitbake core-image-minimal -cpopulate_sdk_ext
$ bitbake core-image-minimal -ctestsdkext
[snip]
Testing /buildarea/lyang1/test_po/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testsdkext//tc/environment-setup-x86-pokymllib32-linux
test_cvs (oeqa.sdk.buildcvs.BuildCvsTest) ... FAIL
[snip]

It was failed because no lib32 toolchains.

These fixes include:
* Set SDK_TARGETS correctly
* Return multilib depends in get_ext_sdk_depends()
* Write information to all environment-setup-* scripts.

[YOCTO #10647]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/populate_sdk_ext.bbclass | 49 ++++++++++++++++++++---------------
 1 file changed, 28 insertions(+), 21 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index adef96d..840e04d 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -39,7 +39,7 @@ SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
 SDK_UPDATE_URL ?= ""
 
-SDK_TARGETS ?= "${PN}"
+SDK_TARGETS ?= "${@multilib_pkg_extend(d, d.getVar('BPN', True))}"
 
 def get_sdk_install_targets(d, images_only=False):
     sdk_install_targets = ''
@@ -566,12 +566,14 @@ SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
 sdk_ext_postinst() {
 	printf "\nExtracting buildtools...\n"
 	cd $target_sdk_dir
-	env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
+	env_setup_scripts="`ls $target_sdk_dir/environment-setup-*`"
 	./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
 	if [ $? -ne 0 ]; then
 		printf 'ERROR: buildtools installation failed:\n'
 		cat buildtools.log
-		echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
+		for e in $env_setup_scripts; do
+			echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $e
+		done
 		exit 1
 	fi
 
@@ -580,23 +582,25 @@ sdk_ext_postinst() {
 	# We don't need the log either since it succeeded
 	rm -f buildtools.log
 
-	# Make sure when the user sets up the environment, they also get
-	# the buildtools-tarball tools in their path.
-	echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script
+	for e in $env_setup_scripts; do
+		# Make sure when the user sets up the environment, they also get
+		# the buildtools-tarball tools in their path.
+		echo ". $target_sdk_dir/buildtools/environment-setup*" >> $e
+		# Allow bitbake environment setup to be ran as part of this sdk.
+		echo "export OE_SKIP_SDK_CHECK=1" >> $e
 
-	# Allow bitbake environment setup to be ran as part of this sdk.
-	echo "export OE_SKIP_SDK_CHECK=1" >> $env_setup_script
+		# A bit of another hack, but we need this in the path only for devtool
+		# so put it at the end of $PATH.
+		echo "export PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $e
 
-	# A bit of another hack, but we need this in the path only for devtool
-	# so put it at the end of $PATH.
-	echo "export PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $env_setup_script
+		echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $e
 
-	echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script
+		# Warn if trying to use external bitbake and the ext SDK together
+		echo "(which bitbake > /dev/null 2>&1 && \
+			echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \
+			true" >> $e
+	done
 
-	# Warn if trying to use external bitbake and the ext SDK together
-	echo "(which bitbake > /dev/null 2>&1 && \
-		echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \
-		true" >> $env_setup_script
 
 	if [ "$prepare_buildsystem" != "no" ]; then
 		printf "Preparing build system...\n"
@@ -610,7 +614,9 @@ sdk_ext_postinst() {
 			. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \
 			python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'"
 		if [ $? -ne ]; then
-			echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
+			for e in $env_setup_scripts; do
+				echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $e
+			done
 			exit 1
 			rm $target_sdk_dir/ext-sdk-prepare.py
 		fi
@@ -641,10 +647,11 @@ fakeroot python do_populate_sdk_ext() {
 def get_ext_sdk_depends(d):
     # Note: the deps varflag is a list not a string, so we need to specify expand=False
     deps = d.getVarFlag('do_image_complete', 'deps', False)
-    pn = d.getVar('PN', True)
-    deplist = ['%s:%s' % (pn, dep) for dep in deps]
-    for task in ['do_image_complete', 'do_rootfs', 'do_build']:
-        deplist.extend((d.getVarFlag(task, 'depends', True) or '').split())
+    deplist = []
+    for pn in multilib_pkg_extend(d, d.getVar('BPN', True)).split():
+        deplist += ['%s:%s' % (pn, dep) for dep in deps]
+        for task in ['do_image_complete', 'do_rootfs', 'do_build']:
+            deplist.extend((d.getVarFlag(task, 'depends', True) or '').split())
     return ' '.join(deplist)
 
 python do_sdk_depends() {
-- 
2.10.2



^ permalink raw reply related

* [PATCH V2 1/8] populate_sdk_ext.bbclass: break the long lines
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

Make it easier to read and maintain.

[YOCTO #10647]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/populate_sdk_ext.bbclass | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 3c3a73c..adef96d 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -567,7 +567,13 @@ sdk_ext_postinst() {
 	printf "\nExtracting buildtools...\n"
 	cd $target_sdk_dir
 	env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
-	printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
+	./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
+	if [ $? -ne 0 ]; then
+		printf 'ERROR: buildtools installation failed:\n'
+		cat buildtools.log
+		echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
+		exit 1
+	fi
 
 	# Delete the buildtools tar file since it won't be used again
 	rm -f ./${SDK_BUILDTOOLS_INSTALLER}
@@ -588,7 +594,9 @@ sdk_ext_postinst() {
 	echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script
 
 	# Warn if trying to use external bitbake and the ext SDK together
-	echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script
+	echo "(which bitbake > /dev/null 2>&1 && \
+		echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \
+		true" >> $env_setup_script
 
 	if [ "$prepare_buildsystem" != "no" ]; then
 		printf "Preparing build system...\n"
@@ -596,8 +604,16 @@ sdk_ext_postinst() {
 		# current working directory when first ran, nor will it set $1 when
 		# sourcing a script. That is why this has to look so ugly.
 		LOGFILE="$target_sdk_dir/preparing_build_system.log"
-		sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
-		rm $target_sdk_dir/ext-sdk-prepare.py
+		sh -c ". buildtools/environment-setup* > $LOGFILE && \
+			cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && \
+			set $target_sdk_dir && \
+			. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \
+			python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'"
+		if [ $? -ne ]; then
+			echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
+			exit 1
+			rm $target_sdk_dir/ext-sdk-prepare.py
+		fi
 	fi
 	echo done
 }
-- 
2.10.2



^ permalink raw reply related

* [PATCH V2 3/8] oeqa/sdkext/devtool.py: remove sources before run test cases
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

Fixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake core-image-minimal -cpopulate_sdk_ext
[snip]
ERROR: Source tree path /path/to/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testsdkext/tc/workspace/sources/v4l2loopback-driver already exists and is not empty\n'
[snip]

This is because the test case will run twice
(environment-setup-core2-64-poky-linux and
environment-setup-x86-pokymllib32-linux), it would fail in the second
run, 'devtool reset' can not remove sources, so remove it before running
test cases.

[YOCTO #10647]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/lib/oeqa/sdkext/devtool.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/lib/oeqa/sdkext/devtool.py b/meta/lib/oeqa/sdkext/devtool.py
index 65f41f6..f101eb6 100644
--- a/meta/lib/oeqa/sdkext/devtool.py
+++ b/meta/lib/oeqa/sdkext/devtool.py
@@ -15,6 +15,9 @@ class DevtoolTest(oeSDKExtTest):
         self.myapp_cmake_dst = os.path.join(self.tc.sdktestdir, "myapp_cmake")
         shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst)
 
+        # Clean sources dir to make "git clone" can run again
+        shutil.rmtree(os.path.join(self.tc.sdktestdir, "tc/workspace/sources"), True)
+
     def _test_devtool_build(self, directory):
         self._run('devtool add myapp %s' % directory)
         try:
-- 
2.10.2



^ permalink raw reply related

* [PATCH V2 0/8] Fixes for eSDK and testsdkext
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core

* V2
  1) Fix Paul's comments:
     - Drop "don't reset when the test is failed"
     - Update bug id for "oe-publish-sdk: add pyshtables.py to .gitignore"
     - Split "install multilib targets as populate_sdk does" into 2 commits:
       "break the long lines"
       "install multilib SDKs"
  2) Use shorter subject lines

* V1
  Initial version

// Robert

The following changes since commit 4e412234c37efec42b3962c11d44903c0c58c92e:

  libpcap: Disable exposed bits of WinPCAP remote capture support (2016-12-13 22:47:35 +0000)

are available in the git repository at:

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

Robert Yang (8):
  populate_sdk_ext.bbclass: break the long lines
  populate_sdk_ext.bbclass: install multilib SDKs
  oeqa/sdkext/devtool.py: remove sources before run test cases
  oe-publish-sdk: make cmd easier to read
  oe-publish-sdk: add pyshtables.py to .gitignore
  oeqa/oetest.py: add hasLockedSig()
  oeqa/sdkext/devtool.py: skip a testcase when no libxml2
  oe/copy_buildsystem.py: add SDK_LAYERS_EXCLUDE_PATTERN

 meta/classes/populate_sdk_ext.bbclass | 63 ++++++++++++++++++++++++-----------
 meta/lib/oe/copy_buildsystem.py       | 18 ++++++++++
 meta/lib/oeqa/oetest.py               | 13 ++++++++
 meta/lib/oeqa/sdkext/devtool.py       |  8 ++++-
 scripts/oe-publish-sdk                | 19 +++++++++--
 5 files changed, 98 insertions(+), 23 deletions(-)

-- 
2.10.2



^ permalink raw reply

* [PATCH V2 4/8] oe-publish-sdk: make cmd easier to read
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

The command was too long to read and maintain.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 scripts/oe-publish-sdk | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index 4fe8974..d95c623 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -113,10 +113,25 @@ def publish(args):
             return ret
 
     # Setting up the git repo
+    cmd_common = "if [ ! -e .git ]; then"
+    cmd_common += "    git init .;"
+    cmd_common += "    mv .git/hooks/post-update.sample .git/hooks/post-update;"
+    cmd_common += "    echo '*.pyc\n*.pyo' > .gitignore;"
+    cmd_common += "fi;"
+    cmd_common += "git add -A .;"
+    cmd_common += "git config user.email 'oe@oe.oe' && git config user.name 'OE' && git commit -q -m 'init repo' || true;"
     if not is_remote:
-        cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; echo "*.pyc\n*.pyo" > .gitignore; fi; git add -A .; git config user.email "oe@oe.oe" && git config user.name "OE" && git commit -q -m "init repo" || true; git update-server-info' % (destination, destination)
+        cmd = "set -e;"
+        cmd += "mkdir -p %s/layers;" % destination
+        cmd += "cd %s/layers;" % destination
+        cmd += cmd_common
+        cmd += "git update-server-info"
     else:
-        cmd = "ssh %s 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; echo '*.pyc\n*.pyo' > .gitignore; fi; git add -A .; git config user.email 'oe@oe.oe' && git config user.name 'OE' && git commit -q -m \"init repo\" || true; git update-server-info'" % (host, destdir, destdir)
+        cmd = "ssh %s 'set -e;" % host
+        cmd += "mkdir -p %s/layers;" % destdir
+        cmd += "cd %s/layers;" % destdir
+        cmd += cmd_common
+        cmd += "git update-server-info'"
     ret = subprocess.call(cmd, shell=True)
     if ret == 0:
         logger.info('SDK published successfully')
-- 
2.10.2



^ permalink raw reply related

* [PATCH V2 5/8] oe-publish-sdk: add pyshtables.py to .gitignore
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

Fixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake core-image-minimal -cpopulate_sdk_ext
[snip]
ERROR: Failed to update metadata as there have been changes made to it. Aborting.\nERROR: Changed files:\nb' M poky/bitbake/lib/bb/pysh/pyshtables.py\\n'\n"
[snip]

This is because the test case will run twice
(environment-setup-core2-64-poky-linux and
environment-setup-x86-pokymllib32-linux), it would fail in the second
run since pyshtables.py is regenerated in the first run. This file is
generated automatically, publish it doesn't make any sense, so add it to
.gitignore.

[YOCTO #10796]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 scripts/oe-publish-sdk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index d95c623..e2b1b95 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -116,7 +116,7 @@ def publish(args):
     cmd_common = "if [ ! -e .git ]; then"
     cmd_common += "    git init .;"
     cmd_common += "    mv .git/hooks/post-update.sample .git/hooks/post-update;"
-    cmd_common += "    echo '*.pyc\n*.pyo' > .gitignore;"
+    cmd_common += "    echo '*.pyc\n*.pyo\npyshtables.py' > .gitignore;"
     cmd_common += "fi;"
     cmd_common += "git add -A .;"
     cmd_common += "git config user.email 'oe@oe.oe' && git config user.name 'OE' && git commit -q -m 'init repo' || true;"
-- 
2.10.2



^ permalink raw reply related

* [PATCH V2 6/8] oeqa/oetest.py: add hasLockedSig()
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

It checks whether there is a "recipe:do_populate_sysroot:" in
locked-sigs.inc, which will help to determine whether the testcase will
run or not.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/lib/oeqa/oetest.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 95d3bf7..d12381d 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -171,6 +171,12 @@ class oeSDKExtTest(oeSDKTest):
         return subprocess.check_output(". %s > /dev/null;"\
             " %s;" % (self.tc.sdkenv, cmd), stderr=subprocess.STDOUT, shell=True, env=env).decode("utf-8")
 
+    @classmethod
+    def hasLockedSig(self, recipe):
+        if re.search(" " + recipe + ":do_populate_sysroot:", oeTest.tc.locked_sigs):
+            return True
+        return False
+
 def getmodule(pos=2):
     # stack returns a list of tuples containg frame information
     # First element of the list the is current frame, caller is 1
@@ -708,6 +714,13 @@ class SDKExtTestContext(SDKTestContext):
         self.sdkextfilesdir = os.path.join(os.path.dirname(os.path.abspath(
             oeqa.sdkext.__file__)), "files")
 
+        self.locked_sig_file = os.path.join(self.sdktestdir, "tc/conf/locked-sigs.inc")
+        if os.path.exists(self.locked_sig_file):
+            with open(self.locked_sig_file) as f:
+                self.locked_sigs = f.read()
+        else:
+            bb.fatal("%s not found. Did you build the ext sdk image?\n%s" % e)
+
     def _get_test_namespace(self):
         if self.cm:
             return "sdk"
-- 
2.10.2



^ permalink raw reply related

* [PATCH V2 7/8] oeqa/sdkext/devtool.py: skip a testcase when no libxml2
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

Skip test_extend_autotools_recipe_creation when no libxml2

The librdfa requires libxml2 to build, otherwise, it would fail:
| configure: error: Package requirements (libxml-2.0 >= 2.6.26) were not met:
|
| No package 'libxml-2.0' found

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/lib/oeqa/sdkext/devtool.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/sdkext/devtool.py b/meta/lib/oeqa/sdkext/devtool.py
index f101eb6..6cb8d01 100644
--- a/meta/lib/oeqa/sdkext/devtool.py
+++ b/meta/lib/oeqa/sdkext/devtool.py
@@ -1,7 +1,7 @@
 import shutil
 import subprocess
 import urllib.request
-from oeqa.oetest import oeSDKExtTest
+from oeqa.oetest import oeSDKExtTest, skipModule
 from oeqa.utils.decorators import *
 
 class DevtoolTest(oeSDKExtTest):
@@ -66,6 +66,9 @@ class DevtoolTest(oeSDKExtTest):
     @testcase(1482)
     @skipUnlessPassed('test_devtool_location')
     def test_extend_autotools_recipe_creation(self):
+        # librdfa requires libxml2
+        if not oeSDKExtTest.hasLockedSig("libxml2"):
+            skipModule("No libxml2 package in the eSDK")
         req = 'https://github.com/rdfa/librdfa'
         recipe = "bbexample"
         self._run('devtool add %s %s' % (recipe, req) )
-- 
2.10.2



^ permalink raw reply related

* [PATCH V2 8/8] oe/copy_buildsystem.py: add SDK_LAYERS_EXCLUDE_PATTERN
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

It is helpful we want to exclude a lot of layers.
It uses python re, and supports multiple patterns (separated by space).

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/lib/oe/copy_buildsystem.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index 29ac6d4..e5d00c7 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -1,5 +1,12 @@
 # This class should provide easy access to the different aspects of the
 # buildsystem such as layers, bitbake location, etc.
+#
+# SDK_LAYERS_EXCLUDE: Layers which will be excluded from SDK layers.
+# SDK_LAYERS_EXCLUDE_PATTERN: The simiar to SDK_LAYERS_EXCLUDE, this supports
+#                             python regular expression, use space as separator,
+#                              e.g.: ".*-downloads closed-.*"
+#
+
 import stat
 import shutil
 
@@ -23,8 +30,10 @@ class BuildSystem(object):
         self.context = context
         self.layerdirs = [os.path.abspath(pth) for pth in d.getVar('BBLAYERS', True).split()]
         self.layers_exclude = (d.getVar('SDK_LAYERS_EXCLUDE', True) or "").split()
+        self.layers_exclude_pattern = d.getVar('SDK_LAYERS_EXCLUDE_PATTERN', True)
 
     def copy_bitbake_and_layers(self, destdir, workspace_name=None):
+        import re
         # Copy in all metadata layers + bitbake (as repositories)
         layers_copied = []
         bb.utils.mkdirhier(destdir)
@@ -36,8 +45,17 @@ class BuildSystem(object):
         # Exclude layers
         for layer_exclude in self.layers_exclude:
             if layer_exclude in layers:
+                bb.note('Excluded %s from sdk layers since it is in SDK_LAYERS_EXCLUDE' % layer_exclude)
                 layers.remove(layer_exclude)
 
+        if self.layers_exclude_pattern:
+            layers_cp = layers[:]
+            for pattern in self.layers_exclude_pattern.split():
+                for layer in layers_cp:
+                    if re.match(pattern, layer):
+                        bb.note('Excluded %s from sdk layers since matched SDK_LAYERS_EXCLUDE_PATTERN' % layer)
+                        layers.remove(layer)
+
         workspace_newname = workspace_name
         if workspace_newname:
             layernames = [os.path.basename(layer) for layer in layers]
-- 
2.10.2



^ permalink raw reply related

* [PATCH 0/1 V2] oe/path.py: fix for "Argument list too long"
From: Robert Yang @ 2016-12-14  7:57 UTC (permalink / raw)
  To: openembedded-core

* V2
  Fix oe/path.py:copyhardlinktree() as Ross suggested.

* V1
  package_manager.py: fix for "Argument list too long"

// Robert

The following changes since commit 4e412234c37efec42b3962c11d44903c0c58c92e:

  libpcap: Disable exposed bits of WinPCAP remote capture support (2016-12-13 22:47:35 +0000)

are available in the git repository at:

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

Robert Yang (1):
  oe/path.py: fix for "Argument list too long"

 meta/lib/oe/path.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

-- 
2.10.2



^ permalink raw reply

* [PATCH 1/1 V2] oe/path.py: fix for "Argument list too long"
From: Robert Yang @ 2016-12-14  7:57 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481701322.git.liezhi.yang@windriver.com>

Fixed when len(TMPDIR) = 410:
$ bitbake core-image-sato-sdk
[snip]
Subprocess output:
/bin/sh: /bin/cp: Argument list too long

ERROR: core-image-sato-sdk-1.0-r0 do_rootfs: Function failed: do_rootfs
[snip]

This is because "copyhardlinktree(src, dst)" does "cp -afl src/* dst",
while src/* is expanded to "src/file1 src/file2, src/file3..." which
causes the "Argument list too long", use ./* as src and change cwd in
subprocess.check_output() to fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/lib/oe/path.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index f73fd4a..81e7632 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -82,12 +82,14 @@ def copyhardlinktree(src, dst):
         source = ''
         if os.path.isdir(src):
             if len(glob.glob('%s/.??*' % src)) > 0:
-                source = '%s/.??* ' % src
-            source = source + '%s/*' % src
+                source = './.??* '
+            source += './*'
+            s_dir = src
         else:
             source = src
-        cmd = 'cp -afl --preserve=xattr %s %s' % (source, dst)
-        subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
+            s_dir = os.getcwd()
+        cmd = 'cp -afl --preserve=xattr %s %s' % (source, os.path.realpath(dst))
+        subprocess.check_output(cmd, shell=True, cwd=s_dir, stderr=subprocess.STDOUT)
     else:
         copytree(src, dst)
 
-- 
2.10.2



^ permalink raw reply related

* Re: [PATCH V2 1/8] populate_sdk_ext.bbclass: break the long lines
From: Ulf Magnusson @ 2016-12-14  8:02 UTC (permalink / raw)
  To: Robert Yang; +Cc: OE-core
In-Reply-To: <bc7d57b6fe00ec420d4fe2ebfd633da348bf2d00.1481700149.git.liezhi.yang@windriver.com>

I'm not a big fan of those run-on lines either, so thanks. Some
superficial comments:

On Wed, Dec 14, 2016 at 8:24 AM, Robert Yang <liezhi.yang@windriver.com> wrote:
> Make it easier to read and maintain.
>
> [YOCTO #10647]
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/classes/populate_sdk_ext.bbclass | 24 ++++++++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
> index 3c3a73c..adef96d 100644
> --- a/meta/classes/populate_sdk_ext.bbclass
> +++ b/meta/classes/populate_sdk_ext.bbclass
> @@ -567,7 +567,13 @@ sdk_ext_postinst() {
>         printf "\nExtracting buildtools...\n"
>         cd $target_sdk_dir
>         env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
> -       printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
> +       ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
> +       if [ $? -ne 0 ]; then
> +               printf 'ERROR: buildtools installation failed:\n'
> +               cat buildtools.log
> +               echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
> +               exit 1
> +       fi

Maybe it's a deliberate style choice, but just in case you're not
aware of it, the following two snippets work the same:

./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
if [ $? -ne 0 ]; then
    ...

if ! ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log; then
    ...

>
>         # Delete the buildtools tar file since it won't be used again
>         rm -f ./${SDK_BUILDTOOLS_INSTALLER}
> @@ -588,7 +594,9 @@ sdk_ext_postinst() {
>         echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script
>
>         # Warn if trying to use external bitbake and the ext SDK together
> -       echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script
> +       echo "(which bitbake > /dev/null 2>&1 && \
> +               echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \
> +               true" >> $env_setup_script
>
>         if [ "$prepare_buildsystem" != "no" ]; then
>                 printf "Preparing build system...\n"
> @@ -596,8 +604,16 @@ sdk_ext_postinst() {
>                 # current working directory when first ran, nor will it set $1 when
>                 # sourcing a script. That is why this has to look so ugly.
>                 LOGFILE="$target_sdk_dir/preparing_build_system.log"
> -               sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
> -               rm $target_sdk_dir/ext-sdk-prepare.py
> +               sh -c ". buildtools/environment-setup* > $LOGFILE && \
> +                       cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && \
> +                       set $target_sdk_dir && \

I know it was there before, but I wonder what the point of the 'set'
is here. It sets $1 to $target_sdk_dir, but $target_sdk_dir is already
passed explicitly to $target_sdk_dir/${oe_init_build_env_path} below.

> +                       . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \
> +                       python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'"
> +               if [ $? -ne ]; then
> +                       echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
> +                       exit 1
> +                       rm $target_sdk_dir/ext-sdk-prepare.py

Unreachable code.

> +               fi
>         fi
>         echo done
>  }
> --
> 2.10.2
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Cheers,
Ulf


^ permalink raw reply

* Re: [PATCH V2 1/8] populate_sdk_ext.bbclass: break the long lines
From: Robert Yang @ 2016-12-14  8:37 UTC (permalink / raw)
  To: Ulf Magnusson; +Cc: OE-core
In-Reply-To: <CAFkk2KTb_5513EU1ntijyMdjtjENhAyN8b9MBd5hVp2D7ifavQ@mail.gmail.com>

Hi Ulf,

On 12/14/2016 04:02 PM, Ulf Magnusson wrote:
> I'm not a big fan of those run-on lines either, so thanks. Some
> superficial comments:
>
> On Wed, Dec 14, 2016 at 8:24 AM, Robert Yang <liezhi.yang@windriver.com> wrote:
>> Make it easier to read and maintain.
>>
>> [YOCTO #10647]
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>  meta/classes/populate_sdk_ext.bbclass | 24 ++++++++++++++++++++----
>>  1 file changed, 20 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
>> index 3c3a73c..adef96d 100644
>> --- a/meta/classes/populate_sdk_ext.bbclass
>> +++ b/meta/classes/populate_sdk_ext.bbclass
>> @@ -567,7 +567,13 @@ sdk_ext_postinst() {
>>         printf "\nExtracting buildtools...\n"
>>         cd $target_sdk_dir
>>         env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
>> -       printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
>> +       ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
>> +       if [ $? -ne 0 ]; then
>> +               printf 'ERROR: buildtools installation failed:\n'
>> +               cat buildtools.log
>> +               echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
>> +               exit 1
>> +       fi
>
> Maybe it's a deliberate style choice, but just in case you're not
> aware of it, the following two snippets work the same:
>
> ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
> if [ $? -ne 0 ]; then
>     ...
>
> if ! ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log; then
>     ...

I'm not sure which is better. We have both of them in the real world.

>
>>
>>         # Delete the buildtools tar file since it won't be used again
>>         rm -f ./${SDK_BUILDTOOLS_INSTALLER}
>> @@ -588,7 +594,9 @@ sdk_ext_postinst() {
>>         echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script
>>
>>         # Warn if trying to use external bitbake and the ext SDK together
>> -       echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script
>> +       echo "(which bitbake > /dev/null 2>&1 && \
>> +               echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \
>> +               true" >> $env_setup_script
>>
>>         if [ "$prepare_buildsystem" != "no" ]; then
>>                 printf "Preparing build system...\n"
>> @@ -596,8 +604,16 @@ sdk_ext_postinst() {
>>                 # current working directory when first ran, nor will it set $1 when
>>                 # sourcing a script. That is why this has to look so ugly.
>>                 LOGFILE="$target_sdk_dir/preparing_build_system.log"
>> -               sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
>> -               rm $target_sdk_dir/ext-sdk-prepare.py
>> +               sh -c ". buildtools/environment-setup* > $LOGFILE && \
>> +                       cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && \
>> +                       set $target_sdk_dir && \
>
> I know it was there before, but I wonder what the point of the 'set'
> is here. It sets $1 to $target_sdk_dir, but $target_sdk_dir is already
> passed explicitly to $target_sdk_dir/${oe_init_build_env_path} below.

Will remove it in another thread the extra sed is useless here.

>
>> +                       . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \
>> +                       python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'"
>> +               if [ $? -ne ]; then
>> +                       echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
>> +                       exit 1
>> +                       rm $target_sdk_dir/ext-sdk-prepare.py
>
> Unreachable code.

Good catch, thanks, updated in the repo.

// Robert

>
>> +               fi
>>         fi
>>         echo done
>>  }
>> --
>> 2.10.2
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
> Cheers,
> Ulf
>


^ permalink raw reply

* [PATCH 0/1] devtool: package: don't try to initialise tinfoil twice
From: Paul Eggleton @ 2016-12-14  8:49 UTC (permalink / raw)
  To: openembedded-core

This patch is on top of the tinfoil2 set but doesn't actually require it -
it fixes an issue that's been there for a while, it just slowed things
down a bit instead of failing as it does with tinfoil2.


The following changes since commit 2eea6a65b009e9d47c03b7d82d2699f88228fc62:

  oe-selftest: add basic tinfoil tests (2016-12-13 19:55:02 +1300)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/tinfoil2-extra-fix
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/tinfoil2-extra-fix

Paul Eggleton (1):
  devtool: package: don't try to initialise tinfoil twice

 scripts/lib/devtool/package.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

-- 
2.5.5



^ permalink raw reply

* [PATCH 1/1] devtool: package: don't try to initialise tinfoil twice
From: Paul Eggleton @ 2016-12-14  8:49 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481705295.git.paul.eggleton@linux.intel.com>

setup_tinfoil() already calls prepare(), we don't need to call it again
ourselves and doing so with tinfoil2 results in "ERROR: Only one copy of
bitbake should be run against a build directory". Calling prepare()
twice should probably still be allowed, so that ought to be fixed
separately, but in the mean time this code is still wrong so fix it
here.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/lib/devtool/package.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/scripts/lib/devtool/package.py b/scripts/lib/devtool/package.py
index afb5809..4764064 100644
--- a/scripts/lib/devtool/package.py
+++ b/scripts/lib/devtool/package.py
@@ -28,10 +28,8 @@ def package(args, config, basepath, workspace):
     """Entry point for the devtool 'package' subcommand"""
     check_workspace_recipe(workspace, args.recipename)
 
-    tinfoil = setup_tinfoil(basepath=basepath)
+    tinfoil = setup_tinfoil(basepath=basepath, config_only=True)
     try:
-        tinfoil.prepare(config_only=True)
-
         image_pkgtype = config.get('Package', 'image_pkgtype', '')
         if not image_pkgtype:
             image_pkgtype = tinfoil.config_data.getVar('IMAGE_PKGTYPE', True)
-- 
2.5.5



^ permalink raw reply related

* [PATCH V3 0/4] Persistent /var/log support
From: Chen Qi @ 2016-12-14  9:08 UTC (permalink / raw)
  To: openembedded-core

Changes since V2:
Use boolean value consistently. Update the comments to fit the use of boolean value.

The following changes since commit d62f18c39bc0ed3b0f5ac8465b393c15f2143ecf:

  targetloader.py: drop test for ClassType (2016-12-12 15:16:39 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/persistent-var-log
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/persistent-var-log

Chen Qi (4):
  bitbake.conf: add VOLATILE_LOG_DIR variable
  base-files: respect VOLATILE_LOG_DIR
  initscripts: support persistent /var/log
  package.bbclass: support persistent /var/log

 meta/classes/package.bbclass                       |  2 +-
 meta/conf/bitbake.conf                             |  4 ++
 meta/files/fs-perms-persistent-log.txt             | 69 ++++++++++++++++++++++
 meta/recipes-core/base-files/base-files_3.0.14.bb  |  4 +-
 .../initscripts/initscripts-1.0/volatiles          |  1 -
 meta/recipes-core/initscripts/initscripts_1.0.bb   |  3 +
 6 files changed, 79 insertions(+), 4 deletions(-)
 create mode 100644 meta/files/fs-perms-persistent-log.txt

-- 
1.9.1



^ permalink raw reply

* [PATCH V3 1/4] bitbake.conf: add VOLATILE_LOG_DIR variable
From: Chen Qi @ 2016-12-14  9:08 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481706394.git.Qi.Chen@windriver.com>

The default value is "yes" which results in the /var/log being a link
pointing to /var/volatile/log which is on tmpfs.

Setting valid boolean false value ('no', 'n', 'false', 'f', '0') would make
/var/log to be a directory on persistent storage.

[YOCTO #6132]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/conf/bitbake.conf | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 1472e8f..0e40c30 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -83,6 +83,10 @@ USRBINPATH_class-nativesdk = "/usr/bin"
 # Root home directory
 ROOT_HOME ??= "/home/root"
 
+# If set to boolean true ('yes', 'y', 'true', 't', '1'), /var/log links to /var/volatile/log.
+# If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on persistent storage.
+VOLATILE_LOG_DIR ?= "yes"
+
 ##################################################################
 # Architecture-dependent build variables.
 ##################################################################
-- 
1.9.1



^ permalink raw reply related

* [PATCH V3 2/4] base-files: respect VOLATILE_LOG_DIR
From: Chen Qi @ 2016-12-14  9:08 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481706394.git.Qi.Chen@windriver.com>

Respect VOLATILE_LOG_DIR variable. In this way, if the user overrides
this variable to be any valid boolean false value, /var/log on the final
image would reside on persistent storage.

[YOCTO #6132]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 5333110..c065499 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -41,7 +41,7 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
            ${localstatedir}/backups ${localstatedir}/lib \
            /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
            ${localstatedir}/volatile \
-           ${localstatedir}/volatile/log \
+           ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
            /home ${prefix}/src ${localstatedir}/local \
            /media"
 
@@ -52,7 +52,7 @@ dirs755-lsb = "/srv  \
                ${prefix}/lib/locale"
 dirs2775-lsb = "/var/mail"
 
-volatiles = "log tmp"
+volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp"
 conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
              ${sysconfdir}/issue /${sysconfdir}/issue.net \
              ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
-- 
1.9.1



^ permalink raw reply related

* [PATCH V3 3/4] initscripts: support persistent /var/log
From: Chen Qi @ 2016-12-14  9:08 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481706394.git.Qi.Chen@windriver.com>

Respect VOLATILE_VAR_LOG variable so that if it's set to any valid boolean
false value, we could have persistent /var/log on the final image.

[YOCTO #6132]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/volatiles | 1 -
 meta/recipes-core/initscripts/initscripts_1.0.bb        | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index 297245d..6cccab7 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -25,7 +25,6 @@ d root root 1777 /run/lock none
 d root root 0755 /var/volatile/log none
 d root root 1777 /var/volatile/tmp none
 l root root 1777 /var/lock /run/lock
-l root root 0755 /var/log /var/volatile/log
 l root root 0755 /var/run /run
 l root root 1777 /var/tmp /var/volatile/tmp
 l root root 1777 /tmp /var/tmp
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 8f110b0..453116c 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -102,6 +102,9 @@ do_install () {
 	install -m 0755    ${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d
 	install -m 0755    ${WORKDIR}/save-rtc.sh	${D}${sysconfdir}/init.d
 	install -m 0644    ${WORKDIR}/volatiles		${D}${sysconfdir}/default/volatiles/00_core
+	if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = True ]; then
+		echo "l root root 0755 /var/log /var/volatile/log" >> ${D}${sysconfdir}/default/volatiles/00_core
+	fi
 	install -m 0755    ${WORKDIR}/dmesg.sh		${D}${sysconfdir}/init.d
 	install -m 0644    ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
 
-- 
1.9.1



^ permalink raw reply related

* [PATCH V3 4/4] package.bbclass: support persistent /var/log
From: Chen Qi @ 2016-12-14  9:08 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481706394.git.Qi.Chen@windriver.com>

Add a new file, fs-perms-persistent-log.txt, which treats /var/log
as a directory instead of a link.

Modify package.bbclass to use this file if VOLATILE_LOG_DIR is set to boolean
false value.

[YOCTO #6132]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes/package.bbclass           |  2 +-
 meta/files/fs-perms-persistent-log.txt | 69 ++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 1 deletion(-)
 create mode 100644 meta/files/fs-perms-persistent-log.txt

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index a6f0a7a..e60056e 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -733,7 +733,7 @@ python fixup_perms () {
         bbpath = d.getVar('BBPATH', True)
         fs_perms_tables = d.getVar('FILESYSTEM_PERMS_TABLES', True)
         if not fs_perms_tables:
-            fs_perms_tables = 'files/fs-perms.txt'
+            fs_perms_tables = 'files/fs-perms.txt' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR', True)) else 'files/fs-perms-persistent-log.txt'
         for conf_file in fs_perms_tables.split():
             str += " %s" % bb.utils.which(bbpath, conf_file)
         return str
diff --git a/meta/files/fs-perms-persistent-log.txt b/meta/files/fs-perms-persistent-log.txt
new file mode 100644
index 0000000..2487a68
--- /dev/null
+++ b/meta/files/fs-perms-persistent-log.txt
@@ -0,0 +1,69 @@
+# This file contains a list of files and directories with known permissions.
+# It is used by the packaging class to ensure that the permissions, owners and
+# group of listed files and directories are in sync across the system.
+#
+# The format of this file 
+#
+#<path>	<mode>	<uid>	<gid>	<walk>	<fmode>	<fuid>	<fgid>
+#
+# or
+#
+#<path> link <target>
+#
+# <path>: directory path
+# <mode>: mode for directory
+# <uid>:  uid for directory
+# <gid>:  gid for directory
+# <walk>: recursively walk the directory?  true or false
+# <fmode>: if walking, new mode for files
+# <fuid>:  if walking, new uid for files
+# <fgid>:  if walking, new gid for files
+# <target>: turn the directory into a symlink point to target
+#
+# in mode, uid or gid, a "-" means don't change any existing values
+#
+# /usr/src		0755	root	root	false	-	-	-
+# /usr/share/man	0755	root	root	true	0644	root	root
+
+# Note: all standard config directories are automatically assigned "0755 root root false - - -"
+
+# Documentation should always be corrected
+${mandir}		0755	root	root	true	0644	root	root
+${infodir}		0755	root	root	true	0644	root	root
+${docdir}		0755	root	root	true	0644	root	root
+${datadir}/gtk-doc	0755	root	root	true	0644	root	root
+
+# Fixup locales
+${datadir}/locale	0755	root	root	true	0644	root	root
+
+# Cleanup headers
+${includedir}		0755	root	root	true	0644	root	root
+${oldincludedir}	0755	root	root	true	0644	root	root
+
+# Cleanup debug src
+/usr/src/debug		0755	root	root	true	-	root	root
+
+# Items from base-files
+# Links
+${localstatedir}/run	link	/run
+${localstatedir}/lock	link	/run/lock
+${localstatedir}/tmp	link	volatile/tmp
+
+/home				0755	root	root	false - - -
+/srv				0755	root	root	false - - -
+${prefix}/src			0755	root	root	false - - -
+${localstatedir}/local		0755	root	root	false - - -
+
+# Special permissions from base-files
+# Set 1777
+/tmp				01777	root	root	false - - -
+${localstatedir}/volatile/tmp	01777	root	root	false - - -
+
+# Set 0700
+${ROOT_HOME}			0700	root	root	false - - -
+
+# Set 755-lsb
+/srv				0755	root	root	false - - -
+
+# Set 2775-lsb
+/var/mail			02775	root	mail	false - - -
-- 
1.9.1



^ permalink raw reply related

* Re: [PATCH V2 4/6] runqemu: support mutiple qemus running when nfs
From: Robert Yang @ 2016-12-14  9:45 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <d04c9145ce085b65cdf6ac2460f8a3ad9bd7cc79.1481014270.git.liezhi.yang@windriver.com>



On 12/06/2016 04:55 PM, Robert Yang wrote:
> Fixed:
> * In build1:
>   $ runqemu nfs qemux86-64
>   In build2:
>   $ runqemu nfs qemux86-64
>
>   It would fail before since the port numerbs and conf files are
>   conflicted, now make runqemu-export-rootfs work together with runqemu to
>   fix the problem.
>
> * And we don't need export PSEUDO_LOCALSTATEDIR in runqemu, the
>   runqemu-export-rootfs can handle it well based on NFS_EXPORT_DIR.
>
> * Remove "async" option from unfsd to fix warning in syslog:
>   Warning: unknown exports option `async' ignored
>
> * Fixed typos
>
> Both slirp and tap can work.
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  scripts/runqemu               | 55 ++++++++++++++++++++++++++++---------------
>  scripts/runqemu-export-rootfs | 10 ++++----
>  2 files changed, 41 insertions(+), 24 deletions(-)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index c737eb2..a10270c 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -690,17 +690,33 @@ class BaseConfig(object):
>              else:
>                  self.nfs_server = '192.168.7.1'
>
> -        nfs_instance = int(self.nfs_instance)
> -
> -        mountd_rpcport = 21111 + nfs_instance
> -        nfsd_rpcport = 11111 + nfs_instance
> -        nfsd_port = 3049 + 2 * nfs_instance
> -        mountd_port = 3048 + 2 * nfs_instance
> -        unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s" % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
> -        self.unfs_opts = unfs_opts
> +        # Figure out a new nfs_instance to allow multiple qemus running.
> +        cmd = "ps aux"

Updated here a little in the repo.

+        # Figure out a new nfs_instance to allow multiple qemus running.
+        # CentOS 7.1's ps doesn't print full command line without "ww"
+        # when invoke by subprocess.Popen().
+        cmd = "ps auxww"


// Robert

> +        ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
> +        pattern = '/bin/unfsd .* -i .*\.pid -e .*/exports([0-9]+) '
> +        all_instances = re.findall(pattern, ps, re.M)
> +        if all_instances:
> +            all_instances.sort(key=int)
> +            self.nfs_instance = int(all_instances.pop()) + 1
> +
> +        mountd_rpcport = 21111 + self.nfs_instance
> +        nfsd_rpcport = 11111 + self.nfs_instance
> +        nfsd_port = 3049 + 2 * self.nfs_instance
> +        mountd_port = 3048 + 2 * self.nfs_instance
> +
> +        # Export vars for runqemu-export-rootfs
> +        export_dict = {
> +            'NFS_INSTANCE': self.nfs_instance,
> +            'MOUNTD_RPCPORT': mountd_rpcport,
> +            'NFSD_RPCPORT': nfsd_rpcport,
> +            'NFSD_PORT': nfsd_port,
> +            'MOUNTD_PORT': mountd_port,
> +        }
> +        for k, v in export_dict.items():
> +            # Use '%s' since they are integers
> +            os.putenv(k, '%s' % v)
>
> -        p = '%s/.runqemu-sdk/pseudo' % os.getenv('HOME')
> -        os.putenv('PSEUDO_LOCALSTATEDIR', p)
> +        self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s" % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
>
>          # Extract .tar.bz2 or .tar.bz if no self.nfs_dir
>          if not self.nfs_dir:
> @@ -728,7 +744,7 @@ class BaseConfig(object):
>                  self.nfs_dir = dest
>
>          # Start the userspace NFS server
> -        cmd = 'runqemu-export-rootfs restart %s' % self.nfs_dir
> +        cmd = 'runqemu-export-rootfs start %s' % self.nfs_dir
>          logger.info('Running %s...' % cmd)
>          if subprocess.call(cmd, shell=True) != 0:
>              raise Exception('Failed to run %s' % cmd)
> @@ -737,6 +753,8 @@ class BaseConfig(object):
>
>
>      def setup_slirp(self):
> +        """Setup user networking"""
> +
>          if self.fstype == 'nfs':
>              self.setup_nfs()
>          self.kernel_cmdline_script += ' ip=dhcp'
> @@ -804,14 +822,13 @@ class BaseConfig(object):
>              logger.error("Failed to setup tap device. Run runqemu-gen-tapdevs to manually create.")
>              return 1
>          self.tap = tap
> -        n0 = tap[3:]
> -        n1 = int(n0) * 2 + 1
> -        n2 = n1 + 1
> -        self.nfs_instance = n0
> +        tapnum = int(tap[3:])
> +        gateway = tapnum * 2 + 1
> +        client = gateway + 1
>          if self.fstype == 'nfs':
>              self.setup_nfs()
> -        self.kernel_cmdline_script += " ip=192.168.7.%s::192.168.7.%s:255.255.255.0" % (n2, n1)
> -        mac = "52:54:00:12:34:%02x" % n2
> +        self.kernel_cmdline_script += " ip=192.168.7.%s::192.168.7.%s:255.255.255.0" % (client, gateway)
> +        mac = "52:54:00:12:34:%02x" % client
>          qb_tap_opt = self.get('QB_TAP_OPT')
>          if qb_tap_opt:
>              qemu_tap_opt = qb_tap_opt.replace('@TAP@', tap).replace('@MAC@', mac)
> @@ -854,11 +871,11 @@ class BaseConfig(object):
>                          vm_drive = '-drive if=none,id=hd,file=%s,format=%s -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd' \
>                                         % (self.rootfs, rootfs_format)
>                      elif subprocess.call(cmd2, shell=True) == 0:
> -                        logger.info('Using scsi drive')
> +                        logger.info('Using ide drive')
>                          vm_drive = "%s,format=%s" % (self.rootfs, rootfs_format)
>                      else:
>                          logger.warn("Can't detect drive type %s" % self.rootfs)
> -                        logger.warn('Tring to use virtio block drive')
> +                        logger.warn('Trying to use virtio block drive')
>                          vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format)
>                  self.rootfs_options = '%s -no-reboot' % vm_drive
>              self.kernel_cmdline = 'root=%s rw highres=off' % (self.get('QB_KERNEL_ROOT'))
> diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs
> index 0dd3eba..7ebc071 100755
> --- a/scripts/runqemu-export-rootfs
> +++ b/scripts/runqemu-export-rootfs
> @@ -78,13 +78,13 @@ if [ ! -d "$PSEUDO_LOCALSTATEDIR" ]; then
>  fi
>
>  # rpc.mountd RPC port
> -MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ]
> +MOUNTD_RPCPORT=${MOUNTD_RPCPORT:=$[ 21111 + $NFS_INSTANCE ]}
>  # rpc.nfsd RPC port
> -NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ]
> +NFSD_RPCPORT=${NFSD_RPCPORT:=$[ 11111 + $NFS_INSTANCE ]}
>  # NFS server port number
> -NFSD_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
> +NFSD_PORT=${NFSD_PORT:=$[ 3049 + 2 * $NFS_INSTANCE ]}
>  # mountd port number
> -MOUNTD_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
> +MOUNTD_PORT=${MOUNTD_PORT:=$[ 3048 + 2 * $NFS_INSTANCE ]}
>
>  ## For debugging you would additionally add
>  ## --debug all
> @@ -109,7 +109,7 @@ case "$1" in
>  	fi
>
>  	echo "Creating exports file..."
> -	echo "$NFS_EXPORT_DIR (rw,async,no_root_squash,no_all_squash,insecure)" > $EXPORTS
> +	echo "$NFS_EXPORT_DIR (rw,no_root_squash,no_all_squash,insecure)" > $EXPORTS
>
>  	echo "Starting User Mode nfsd"
>  	echo "  $PSEUDO $PSEUDO_OPTS $OECORE_NATIVE_SYSROOT/usr/bin/unfsd $UNFSD_OPTS"
>


^ permalink raw reply

* opinions on enabling busybox's "runit" implementation to control some services?
From: Robert P. J. Day @ 2016-12-14 10:27 UTC (permalink / raw)
  To: OE Core mailing list


  colleague needs "runit" to control one or more services that have
historically been managed that way, so a couple questions:

1) anyone with experience with busybox's implementation of runit? does
it work properly? does it play nicely with others?

2) is runit actually necessary, or would it be easy to migrate said
services off of runit?

  i've never used runit, so have no idea what it is that makes it so
(allegedly) indispensable. if it's easily migrateable, that'd be
great.

  thanks muchly.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply

* Re: [PATCH v5 0/6] wic: bugfixes & --fixed-size support, tests, oe-selftest: minor fixes
From: Maciej Borzęcki @ 2016-12-14 10:39 UTC (permalink / raw)
  To: Ed Bartosh
  Cc: Paul Eggleton, Maciej Borzecki,
	Patches and discussions about the oe-core layer
In-Reply-To: <20161213185317.GA6550@linux.intel.com>

On Tue, Dec 13, 2016 at 7:53 PM, Ed Bartosh <ed.bartosh@linux.intel.com> wrote:
> On Tue, Dec 13, 2016 at 09:07:30AM +0100, Maciej Borzęcki wrote:
>> On Thu, Nov 24, 2016 at 8:08 AM, Maciej Borzecki
>> <maciej.borzecki@rndity.com> wrote:
>> > v5 of a patch series previously posted here [1].
>> >
>> > Changes since v4:
>> >
>> > * dropped `wic: selftest: do not repeat core-image-minimal` & rebased
>> >   dependant patches
>> >
>> > * minor formatting fix in `wic: selftest: add tests for --fixed-size
>> >   partition flags`
>> >
>> > [1]. http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129103.html
>> >
>> > Maciej Borzecki (6):
>> >   oe-selftest: enforce en_US.UTF-8 locale
>> >   oeqa/utils/commands.py: allow use of binaries from native sysroot
>> >   wic: add --fixed-size wks option
>> >   wic: selftest: avoid COMPATIBLE_HOST issues
>> >   wic: selftest: do not assume bzImage kernel image
>> >   wic: selftest: add tests for --fixed-size partition flags
>> >
>> >  meta/lib/oeqa/selftest/wic.py          | 123 +++++++++++++++++++++++++++++++--
>> >  meta/lib/oeqa/utils/commands.py        |   9 ++-
>> >  scripts/lib/wic/help.py                |  14 +++-
>> >  scripts/lib/wic/imager/direct.py       |   2 +-
>> >  scripts/lib/wic/ksparser.py            |  41 +++++++++--
>> >  scripts/lib/wic/partition.py           |  88 ++++++++++++++---------
>> >  scripts/lib/wic/utils/partitionedfs.py |   2 +-
>> >  scripts/oe-selftest                    |   3 +
>> >  8 files changed, 234 insertions(+), 48 deletions(-)
>>
>> Is there any additional action needed from me at this point? A rebase
>> or a resend perhaps?
>>
>
> Rebase&resend would be nice as at lest one patch from this patchset is already accepted.
>

I will be posting a v6 later today or tomorrow.

-- 
Maciej Borzecki
RnDity


^ permalink raw reply

* Re: [PATCH] selftest/wic: extending test coverage for WIC script options
From: Ed Bartosh @ 2016-12-14 11:44 UTC (permalink / raw)
  To: Jair Gonzalez; +Cc: openembedded-core
In-Reply-To: <012801d255a0$806ad8e0$81408aa0$@linux.intel.com>

On Tue, Dec 13, 2016 at 06:24:57PM -0600, Jair Gonzalez wrote:
> Hi Ed,
> 
> Thank you for your response and suggestions. Below are my comments.
> 

> > > +    @testcase(1557)
> > > +    def test_listed_images_help(self):
> > > +        """Test wic listed images help"""
> > > +        output = runCmd('wic list images').output
> > > +        imageDetails = [line.split() for line in output.split('\n')]
> > > +        imageList = [row[0] for row in imageDetails]
> > How about replacing two last lines with this?
> > imagelist = [line.split()[0] for line in output.split('\n')]
> I agree. What about this?
> imagelist = [line.split()[0] for line in output.splitlines()]

This is event better, thanks!

> > > +
> > > + "--image-name=core-image-minimal").status)
> > Is '=' mandatory here?
> On wic's help it appears as mandatory, but on practice, it can be used both
> ways. I decided to use both ways along the module to test both usages and
> increase coverage, but not to dedicate specific test cases to each
> combination.

Makes sense to me.

> > >      def test_compress_gzip(self):
> > >          """Test compressing an image with gzip"""
> > >          self.assertEqual(0, runCmd("wic create directdisk "
> > > -                                   "--image-name core-image-minimal "
> > > +                                   "-e core-image-minimal "
> > --image-name is more readable than -e from my point of view.
> Similarly to the '=' to define long option names' arguments, I used both
> forms of each option along the module to increase coverage.
OK

> > > +    def test_debug_skip_build_check_and_build_rootfs(self):
> > > +        """Test wic debug, skip-build-check and build_rootfs"""
> > > +        self.assertEqual(0, runCmd("wic create directdisk "
> > > +                                   "--image-name=core-image-minimal "
> > > +                                   "-D -s -f").status)
> > > +        self.assertEqual(1, len(glob(self.resultdir +
> "directdisk-*.direct")))
> > > +        self.assertEqual(0, runCmd("wic create directdisk "
> > > +                                   "--image-name=core-image-minimal "
> > > +                                   "--debug "
> > > +                                   "--skip-build-check "
> > > +                                   "--build-rootfs").status)
> > > +        self.assertEqual(1, len(glob(self.resultdir +
> > > + "directdisk-*.direct")))
> > > +
> > I'd split this to two test cases as they're testing two different options.
> Actually, those are three different options (with their short and long
> versions). I did this to not add too many test cases, but as you mention,
> probably it's better to separate them by option to make it clearer.
Agreed.

> core-image-minimal").status)
> > > -        self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-
> > *.direct")))
> > > -        self.assertEqual(1, len(glob(self.resultdir +
> "HYBRID_ISO_IMG-*.iso")))
> > > +                                   "--image-name core-image-minimal"
> > > +                                   ).status)
> > This is less readable. Is this only to fit the line into 80 chars?
> > If so, let's not do it. Lines up to 100 chars long are more readable than
> this I
> > believe.
> I changed it to conform to PEP8 and increase readability on editors adjusted
> to 80 chars. However, if you consider it's better to leave it on 100 chars,
> I could work within that.

Let's agree on max 100 chars/line if it improves readability. Otherwise
80 is ok.

> > > +        self.assertEqual(0, runCmd("wic create directdisk "
> > > +                                   "--image-name=%s "
> > > +                                   "--vars %s"
> > > +                                   % (image, imgenvdir)).status)
> > > +
> > Do we really want to test short and long variant of options?
> > If so, we should do it for all options.
> Within the module, all short and long variant of options are tested. Not all
> combinations of long variants with '=' and without it are tested, though.

OK, makes sense to me.

> > > +    @testcase(1562)
> > > +    def test_alternate_output_dir(self):
> > > +        """Test alternate output directory"""
> > > +        self.assertEqual(0, runCmd("wic create directdisk "
> > > +                                   "-e core-image-minimal "
> > > +                                   "-o %s"
> > > +                                   % self.alternate_resultdir).status)
> > > +        self.assertEqual(1, len(glob(self.alternate_resultdir +
> > > +                                     "build/directdisk-*.direct")))
> > > +        self.assertEqual(0, runCmd("wic create mkefidisk -e "
> > > +                                   "core-image-minimal "
> > > +                                   "--outdir %s"
> > > +                                   % self.alternate_resultdir).status)
> > > +        self.assertEqual(1, len(glob(self.alternate_resultdir +
> > > +                                     "build/mkefidisk-*direct")))
> > Would one test be enough?
> I'm using both output option variants to increase coverage.
yep, understood.

> > BTW, did you measure how long does the test run before and after your
> > changes? We should be careful here as this test runs on ab and makes
> people
> > wait longer for results.
> Agreed. I didn't do it, but I'll measure it and take it into account for my
> next update.

Great! It would be interesting to look at the numbers.


--
Regards,
Ed


^ permalink raw reply

* Re: [PATCH V3 0/4] Persistent /var/log support
From: Patrick Ohly @ 2016-12-14 12:12 UTC (permalink / raw)
  To: Chen Qi; +Cc: openembedded-core
In-Reply-To: <cover.1481706394.git.Qi.Chen@windriver.com>

On Wed, 2016-12-14 at 17:08 +0800, Chen Qi wrote:
> Changes since V2:
> Use boolean value consistently. Update the comments to fit the use of boolean value.

Looks good to me now.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox