* [PATCH] lib/oe/lsb: better handle missing fields
From: Joshua Lock @ 2016-11-15 22:08 UTC (permalink / raw)
To: openembedded-core
Some rolling release distros, such as Arch Linux, don't include a
VERSION_ID field in their os-release file.
Change release_dict_osr() to better handle this optional field
being absent.
Further improve the resilience of the release_dict_*() methods by
always returning a dict and using dict.get() in distro_identifier()
to supply a default, empty string, value when then key is missing.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
meta/lib/oe/lsb.py | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 5a795a1..3a945e0 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -15,9 +15,6 @@ def release_dict_osr():
if key == 'VERSION_ID':
data['DISTRIB_RELEASE'] = val.strip('"')
- if len(data.keys()) != 2:
- return None
-
return data
def release_dict_lsb():
@@ -27,7 +24,7 @@ def release_dict_lsb():
try:
output, err = bb.process.run(['lsb_release', '-ir'], stderr=PIPE)
except bb.process.CmdError as exc:
- return None
+ return {}
lsb_map = { 'Distributor ID': 'DISTRIB_ID',
'Release': 'DISTRIB_RELEASE'}
@@ -51,7 +48,7 @@ def release_dict_lsb():
def release_dict_file():
""" Try to gather release information manually when other methods fail """
- data = None
+ data = {}
try:
if os.path.exists('/etc/lsb-release'):
data = {}
@@ -78,7 +75,7 @@ def release_dict_file():
break
except IOError:
- return None
+ return {}
return data
def distro_identifier(adjust_hook=None):
@@ -96,8 +93,8 @@ def distro_identifier(adjust_hook=None):
if not distro_data:
distro_data = release_dict_file()
- distro_id = distro_data['DISTRIB_ID']
- release = distro_data['DISTRIB_RELEASE']
+ distro_id = distro_data.get('DISTRIB_ID', '')
+ release = distro_data.get('DISTRIB_RELEASE', '')
if adjust_hook:
distro_id, release = adjust_hook(distro_id, release)
--
2.7.4
^ permalink raw reply related
* [PATCH] python3-setuptools: upgrade to 28.8.0
From: Edwin Plauchu @ 2016-11-15 22:07 UTC (permalink / raw)
To: openembedded-core; +Cc: Edwin Plauchu
From: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@linux.intel.com>
---
meta/recipes-devtools/python/python-setuptools.inc | 6 +++---
.../{python3-setuptools_22.0.5.bb => python3-setuptools_28.8.0.bb} | 0
2 files changed, 3 insertions(+), 3 deletions(-)
rename meta/recipes-devtools/python/{python3-setuptools_22.0.5.bb => python3-setuptools_28.8.0.bb} (100%)
diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc
index 92ca9a0..d3eef13 100644
--- a/meta/recipes-devtools/python/python-setuptools.inc
+++ b/meta/recipes-devtools/python/python-setuptools.inc
@@ -3,14 +3,14 @@ HOMEPAGE = "https://pypi.python.org/pypi/setuptools"
SECTION = "devel/python"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://setup.py;beginline=134;endline=134;md5=3e8df024d6c1442d18e84acf8fbbc475"
+LIC_FILES_CHKSUM = "file://setup.py;beginline=146;endline=146;md5=3e8df024d6c1442d18e84acf8fbbc475"
SRCNAME = "setuptools"
SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "869f3029dcc66a64ba39875e2a2f044a"
-SRC_URI[sha256sum] = "19aad19471052d5daefe96f2c1fa2e88dcdb17488bf8708d7e6356881ea833cb"
+SRC_URI[md5sum] = "43d6eb25f60e8a2682a8f826ce9e3f42"
+SRC_URI[sha256sum] = "432a1ad4044338c34c2d09b0ff75d509b9849df8cf329f4c1c7706d9c2ba3c61"
UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
diff --git a/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb b/meta/recipes-devtools/python/python3-setuptools_28.8.0.bb
similarity index 100%
rename from meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
rename to meta/recipes-devtools/python/python3-setuptools_28.8.0.bb
--
2.9.3
^ permalink raw reply related
* Re: [PATCH] weston: upgrade from 1.11.1 to 1.12.0
From: Andre McCurdy @ 2016-11-15 21:16 UTC (permalink / raw)
To: Fathi Boudra; +Cc: OE-core
In-Reply-To: <CAGNsrLACnGpM2t_0s00kzvdpkHLsB57KEcLRwmy8wJ5r83dnsw@mail.gmail.com>
On Wed, Nov 9, 2016 at 6:41 AM, Fathi Boudra <fathi.boudra@linaro.org> wrote:
> On 9 November 2016 at 14:15, Burton, Ross <ross.burton@intel.com> wrote:
>>
>> On 8 November 2016 at 13:54, Fathi Boudra <fathi.boudra@linaro.org> wrote:
>>>
>>> FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so"
>>
>>
>> Because you didn't fix this patch the weston-xwayland package is never
>> built, buildhistory is huge and core-image-weston with X11 enabled doesn't
>> build.
>
> I'll spin a v2 with Jussi suggested split.
Would it be OK to split the version update and the packaging changes
across two commits?
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply
* Re: FW: [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests
From: Burton, Ross @ 2016-11-15 21:11 UTC (permalink / raw)
To: Esquivel, Benjamin; +Cc: OE-core
In-Reply-To: <005d01d23f73$e17e85c0$a47b9140$@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
On 15 November 2016 at 19:10, Benjamin Esquivel <
benjamin.esquivel@linux.intel.com> wrote:
> The reason for the migration of the tests is for them to be included in
> the selftest execution. And for that execution, it needs to base off of the
> oeSelfTest class.
>
>
Sounds like a problem with the discovery if it mandates oeselftest. Is
there a reason why it can't also execute bare unittests?
Ross
[-- Attachment #2: Type: text/html, Size: 929 bytes --]
^ permalink raw reply
* Re: [PATCH] OpenSSL: CVE-2004-2761 replace MD5 hash algorithm
From: Radzykewycz, T (Radzy) @ 2016-11-15 20:13 UTC (permalink / raw)
To: BURTON, ROSS; +Cc: OE-core
In-Reply-To: <CAJTo0LZFy4Y23DjQC=v-3-P4HzVoZCOOPWwYNkty4CCxVfGj+Q@mail.gmail.com>
________________________________________
> From: Burton, Ross [ross.burton@intel.com]
> Sent: Tuesday, November 15, 2016 11:59 AM
> To: Radzykewycz, T (Radzy)
> Cc: OE-core
> Subject: Re: [OE-core] [PATCH] OpenSSL: CVE-2004-2761 replace MD5 hash algorithm
>
> On 15 November 2016 at 19:43, T.O. Radzy Radzykewycz <radzy@windriver.com<mailto:radzy@windriver.com>> wrote:
> .../recipes-connectivity/openssl/openssl_1.0.2h.bb<http://openssl_1.0.2h.bb> | 1 +
>
> oe-core master is on openssl 1.0.2j now, so please rebase.
>
> 2 files changed, 60 insertions(+)
> create mode 100644 meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
>
> diff --git a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
> new file mode 100644
> index 000000000000..766af67e1db9
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
> @@ -0,0 +1,59 @@
> +From d795f5f20a29adecf92c09459a3ee07ffac01a99 Mon Sep 17 00:00:00 2001
> +From: Rich Salz <rsalz@akamai.com<mailto:rsalz@akamai.com>>
> +Date: Sat, 13 Jun 2015 17:03:39 -0400
> +Subject: [PATCH] Use SHA256 not MD5 as default digest.
> +
> +Commit f8547f62c212837dbf44fb7e2755e5774a59a57b upstream.
> +
> +Upstream Status: Backport
>
> I'm such a pedant but we do have automated tooling around this, so please use "Upstream-Status". Also adding a CVE tag in the patch (CVE: CVE-2004-2761) would be appreciated for tracking.
Thanks for the great feedback!
I'll send a new patch shortly.
Enjoy!
-- radzy
PS: The instructions at
http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
seem to indicate that you should not use master. Since I seem to have
misunderstood, please forgive my ignorance.
> Ross
^ permalink raw reply
* [PATCH 1/1] devtool: modify: support recipes with only local files as source
From: Paul Eggleton @ 2016-11-15 20:05 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <cover.1479240326.git.paul.eggleton@linux.intel.com>
The hello-mod recipe is unusual in that it has only local files in
SRC_URI and builds these out of ${WORKDIR}. When you use devtool modify
on it, devtool puts all of those files in an "oe-local-files"
subdirectory of the source tree, which is not ${S} (or ${B}) any more
and thus building the recipe afterwards fails. It's a bit of a hack, but
symlink the files in oe-local-files into the source tree (and commit the
symlinks with an ignored commit so that the repo is clean) to work
around the problem. We only do this at time of extraction, so any files
added to or removed from oe-local-files after that won't be handled, but
I think there's a limit to how far we should go to support these kinds
of recipes - ultimately they are anomalies.
I initially tried a hacky workaround where I set effectively set B =
"${WORKDIR}" and that allowed it to build, but other things such as the
LIC_FILES_CHKSUM checks still broke because they expected to find files
in ${S}. Another hack where I set the sourcetree to point to the
oe-local-files subdirectory works for hello-mod but not for makedevs
since whilst that is similar, unlike hello-mod it does in fact have
files in the source tree (since it has a patch that adds COPYING) and
thus the same issue occurred.
Also tweak one of the tests that tries devtool modify / update-recipe on
the makedevs recipe to try building it since that would have caught this
issue.
Fixes [YOCTO #10616].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/lib/oeqa/selftest/devtool.py | 2 ++
scripts/lib/devtool/standard.py | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 46f5a0b..b5f850f 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -874,6 +874,8 @@ class DevtoolTests(DevtoolBase):
result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
# Check git repo
self._check_src_repo(tempdir)
+ # Try building just to ensure we haven't broken that
+ bitbake("%s" % testrecipe)
# Edit / commit local source
runCmd('echo "/* Foobar */" >> oe-local-files/makedevs.c', cwd=tempdir)
runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 4523048..891f308 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -673,6 +673,29 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d):
shutil.move(srcsubdir, srctree)
+ if os.path.abspath(d.getVar('S', True)) == os.path.abspath(d.getVar('WORKDIR', True)):
+ # If recipe extracts to ${WORKDIR}, symlink the files into the srctree
+ # (otherwise the recipe won't build as expected)
+ local_files_dir = os.path.join(srctree, 'oe-local-files')
+ addfiles = []
+ for root, _, files in os.walk(local_files_dir):
+ relpth = os.path.relpath(root, local_files_dir)
+ if relpth != '.':
+ bb.utils.mkdirhier(os.path.join(srctree, relpth))
+ for fn in files:
+ if fn == '.gitignore':
+ continue
+ destpth = os.path.join(srctree, relpth, fn)
+ if os.path.exists(destpth):
+ os.unlink(destpth)
+ os.symlink('oe-local-files/%s' % fn, destpth)
+ addfiles.append(os.path.join(relpth, fn))
+ if addfiles:
+ bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree)
+ useroptions = []
+ oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d)
+ bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
+
if kconfig:
logger.info('Copying kernel config to srctree')
shutil.copy2(kconfig, srctree)
--
2.5.5
^ permalink raw reply related
* [PATCH 0/1] devtool: modify: support recipes with only local files as source
From: Paul Eggleton @ 2016-11-15 20:05 UTC (permalink / raw)
To: openembedded-core
The following changes since commit a675b2c89e477af088faee9b3be96eae19a85f0b:
sanity.bbclass: fix logging of an error (2016-11-15 15:18:50 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/devtool-localfiles
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/devtool-localfiles
Paul Eggleton (1):
devtool: modify: support recipes with only local files as source
meta/lib/oeqa/selftest/devtool.py | 2 ++
scripts/lib/devtool/standard.py | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+)
--
2.5.5
^ permalink raw reply
* Re: [PATCH] OpenSSL: CVE-2004-2761 replace MD5 hash algorithm
From: Burton, Ross @ 2016-11-15 19:59 UTC (permalink / raw)
To: T.O. Radzy Radzykewycz; +Cc: OE-core
In-Reply-To: <1479239005-26229-1-git-send-email-radzy@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
On 15 November 2016 at 19:43, T.O. Radzy Radzykewycz <radzy@windriver.com>
wrote:
> .../recipes-connectivity/openssl/openssl_1.0.2h.bb | 1 +
>
oe-core master is on openssl 1.0.2j now, so please rebase.
> 2 files changed, 60 insertions(+)
> create mode 100644 meta/recipes-connectivity/openssl/openssl/Use-SHA256-
> not-MD5-as-default-digest.patch
>
> diff --git a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-
> not-MD5-as-default-digest.patch b/meta/recipes-connectivity/
> openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
> new file mode 100644
> index 000000000000..766af67e1db9
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-
> not-MD5-as-default-digest.patch
> @@ -0,0 +1,59 @@
> +From d795f5f20a29adecf92c09459a3ee07ffac01a99 Mon Sep 17 00:00:00 2001
> +From: Rich Salz <rsalz@akamai.com>
> +Date: Sat, 13 Jun 2015 17:03:39 -0400
> +Subject: [PATCH] Use SHA256 not MD5 as default digest.
> +
> +Commit f8547f62c212837dbf44fb7e2755e5774a59a57b upstream.
> +
> +Upstream Status: Backport
>
I'm such a pedant but we do have automated tooling around this, so please
use "Upstream-Status". Also adding a CVE tag in the patch (CVE:
CVE-2004-2761) would be appreciated for tracking.
Ross
[-- Attachment #2: Type: text/html, Size: 2268 bytes --]
^ permalink raw reply
* [PATCH] OpenSSL: CVE-2004-2761 replace MD5 hash algorithm
From: T.O. Radzy Radzykewycz @ 2016-11-15 19:43 UTC (permalink / raw)
To: openembedded-core
Use SHA256 as default digest for OpenSSL instead of MD5.
CVE-2004-2761:
The MD5 Message-Digest Algorithm is not collision resistant,
which makes it easier for context-dependent attackers to
conduct spoofing attacks, as demonstrated by attacks on the
use of MD5 in the signature algorithm of an X.509 certificate.
Status: Backport from OpenSSL 2.0 to OpenSSL 1.0.2
Commit f8547f62c212837dbf44fb7e2755e5774a59a57b
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
Signed-off-by: T.O. Radzy Radzykewycz <radzy@windriver.com>
---
.../Use-SHA256-not-MD5-as-default-digest.patch | 59 ++++++++++++++++++++++
.../recipes-connectivity/openssl/openssl_1.0.2h.bb | 1 +
2 files changed, 60 insertions(+)
create mode 100644 meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
diff --git a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
new file mode 100644
index 000000000000..766af67e1db9
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
@@ -0,0 +1,59 @@
+From d795f5f20a29adecf92c09459a3ee07ffac01a99 Mon Sep 17 00:00:00 2001
+From: Rich Salz <rsalz@akamai.com>
+Date: Sat, 13 Jun 2015 17:03:39 -0400
+Subject: [PATCH] Use SHA256 not MD5 as default digest.
+
+Commit f8547f62c212837dbf44fb7e2755e5774a59a57b upstream.
+
+Upstream Status: Backport
+
+Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
+Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
+---
+ apps/ca.c | 2 +-
+ apps/dgst.c | 2 +-
+ apps/enc.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/apps/ca.c b/apps/ca.c
+index 3b7336c..8f3a84b 100644
+--- a/apps/ca.c
++++ b/apps/ca.c
+@@ -1612,7 +1612,7 @@ static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
+ } else
+ BIO_printf(bio_err, "Signature ok\n");
+
+- if ((rreq = X509_to_X509_REQ(req, NULL, EVP_md5())) == NULL)
++ if ((rreq = X509_to_X509_REQ(req, NULL, NULL)) == NULL)
+ goto err;
+
+ ok = do_body(xret, pkey, x509, dgst, sigopts, policy, db, serial, subj,
+diff --git a/apps/dgst.c b/apps/dgst.c
+index 95e5fa3..0d1529f 100644
+--- a/apps/dgst.c
++++ b/apps/dgst.c
+@@ -442,7 +442,7 @@ int MAIN(int argc, char **argv)
+ goto end;
+ }
+ if (md == NULL)
+- md = EVP_md5();
++ md = EVP_sha256();
+ if (!EVP_DigestInit_ex(mctx, md, impl)) {
+ BIO_printf(bio_err, "Error setting digest %s\n", pname);
+ ERR_print_errors(bio_err);
+diff --git a/apps/enc.c b/apps/enc.c
+index 7b7c70b..a7d944c 100644
+--- a/apps/enc.c
++++ b/apps/enc.c
+@@ -344,7 +344,7 @@ int MAIN(int argc, char **argv)
+ }
+
+ if (dgst == NULL) {
+- dgst = EVP_md5();
++ dgst = EVP_sha256();
+ }
+
+ if (bufsize != NULL) {
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
index 5a4e52a4d735..5714affe4407 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
@@ -49,6 +49,7 @@ SRC_URI += "file://find.pl;subdir=${BP}/util/ \
file://CVE-2016-6303.patch \
file://CVE-2016-6304.patch \
file://CVE-2016-6306.patch \
+ file://Use-SHA256-not-MD5-as-default-digest.patch \
"
SRC_URI[md5sum] = "9392e65072ce4b614c1392eefc1f23d0"
SRC_URI[sha256sum] = "1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c74332919"
--
1.9.1
^ permalink raw reply related
* [PATCH] licenses.conf: Fix variable name in comments (FOSS_NO_COPYRIGHT)
From: Olof Johansson @ 2016-11-15 19:10 UTC (permalink / raw)
To: openembedded-core
A FOSSology related variable was renamed from FOSS_COPRYIGHT to
FOSS_NO_COPYRIGHT, but the comment block describing the variable
in licenses.conf was missed.
Besides fixing this, this change also removes a redundant comment
about where the variable is defined (it's right there! ;-)).
Signed-off-by: Olof Johansson <olofjn@axis.com>
---
meta/conf/licenses.conf | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/meta/conf/licenses.conf b/meta/conf/licenses.conf
index 9917c40..d210a0e 100644
--- a/meta/conf/licenses.conf
+++ b/meta/conf/licenses.conf
@@ -133,11 +133,10 @@ DATA_LICENSE = "CC0-1.0"
# You can set option to control if the copyright information will be skipped
# during the identification process.
#
-# It is defined as [FOSS_COPYRIGHT] in ./meta/conf/licenses.conf.
-# FOSS_COPYRIGHT = "true"
+# FOSS_NO_COPYRIGHT = "true"
# NO copyright will be processed. That means only license information will be
# identified and output to SPDX file
-# FOSS_COPYRIGHT = "false"
+# FOSS_NO_COPYRIGHT = "false"
# Copyright will be identified and output to SPDX file along with license
# information. The process will take more time than not processing copyright
# information.
--
2.1.4
^ permalink raw reply related
* FW: [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests
From: Benjamin Esquivel @ 2016-11-15 19:10 UTC (permalink / raw)
To: 'Jose Perez Carranza', Burton, Ross; +Cc: 'OE-core'
In-Reply-To: <1369e521-e304-1b80-4229-2449718736a0@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]
Re-sending from the correct account (of mine).
From: Esquivel, Benjamin
Sent: Tuesday, November 15, 2016 12:38 PM
To: 'Jose Perez Carranza' <jose.perez.carranza@linux.intel.com>; 'Burton, Ross' <ross.burton@intel.com>
Cc: 'OE-core' <openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests
Apologies for the top posting.
The reason for the migration of the tests is for them to be included in the selftest execution. And for that execution, it needs to base off of the oeSelfTest class.
Benjamin
From: openembedded-core-bounces@lists.openembedded.org <mailto:openembedded-core-bounces@lists.openembedded.org> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Jose Perez Carranza
Sent: Tuesday, November 15, 2016 12:09 PM
To: Burton, Ross <ross.burton@intel.com <mailto:ross.burton@intel.com> >
Cc: OE-core <openembedded-core@lists.openembedded.org <mailto:openembedded-core@lists.openembedded.org> >
Subject: Re: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests
On 11/15/2016 11:16 AM, Burton, Ross wrote:
On 15 November 2016 at 16:24, <jose.perez.carranza@linux.intel.com <mailto:jose.perez.carranza@linux.intel.com> > wrote:
+class TestPackagesFilterOutSystem(oeSelfTest):
As the tests don't need anything special that oeSelfTest provides, can they remain as testcase.TestCase instances? There's a lot of complication from oeSelfTest that isn't required.
In order to the test cases be recognized and executed as part of the suite they need to be in the same context of selftest hence be an instance of oeSelftest.
Ross
[-- Attachment #2: Type: text/html, Size: 6526 bytes --]
^ permalink raw reply
* Re: [PATCH 1/2] go: Add recipes for golang compilers and tools
From: Matt Madison @ 2016-11-15 18:43 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core@lists.openembedded.org
In-Reply-To: <1478887474.23123.233.camel@linuxfoundation.org>
On Fri, Nov 11, 2016 at 10:04 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2016-11-11 at 15:10 +0200, Alexander Kanavin wrote:
>> On 11/10/2016 02:39 AM, Khem Raj wrote:
>> >
>> > This is converging the recipes for go from
>> > meta-virtualization and oe-meta-go
>> Wait a moment, why this should go to oe-core and not to meta-go? Is
>> there something in oe-core itself that requires presence of go
>> compiler?
>
> This was something that came up at OEDEM. There are several layers with
> several attempts at getting this right, most have some issues.
>
> Whilst we've been pulling things out of core, we also need to consider
> things that perhaps should get added. Having this in core would
> certainly address a number of issues (but is also potentially a
> maintenance burden).
>
> We did agree there that we'd consider this. Obviously input from people
> not there is welcome though and this does need discussion. I'm leaning
> moderately in favour of adding it as things stand.
It would certainly help me, as I have a bunch of developers writing Go
packages and apps for embedded targets. That said, I don't know if Go
is really mature enough. I've just been working through a pretty
significant bug in the Go 1.7 runtime that makes it unusable when
linked as a shareable library, for instance.
Any reason why more of meta-golang couldn't be integrated into this
patch set, though? I've been looking over what's in oe-meta-go and
meta-virt, and most of the patches i put into meta-golang to have
already been pulled in there. And go.bbclass looks like a subset of
meta-golang's golang.bbclass.
Whether it's pulled into OE-core or a common layer hosted at
git.yp.org, it would be helpful to synthesize a common base for Go
support. I'd be willing to help that.
Thanks,
-Matt
>
> Cheers,
>
> Richard
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply
* Re: [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests
From: Benjamin Esquivel @ 2016-11-15 18:39 UTC (permalink / raw)
To: jose.perez.carranza, openembedded-core
In-Reply-To: <1479227073-13133-1-git-send-email-jose.perez.carranza@linux.intel.com>
Looks good to me, thanks for sending the v2.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of jose.perez.carranza@linux.intel.com
> Sent: Tuesday, November 15, 2016 10:25 AM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to
> /oeqa/selftest/oe-tests
>
> From: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
>
> Currently the unittests for scripts on meta/lib/oe/tests are not being
> executed by any suite hence the best option is migrate them to
> meta/lib/oeqa/selftest/oelib-tests to be executed along with the selftest
> suite.
>
> [YOCTO #7376]
>
> Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
> ---
> meta/lib/oe/tests/__init__.py | 0
> meta/lib/oe/tests/test_elf.py | 21 ------
> meta/lib/oe/tests/test_license.py | 68 -------------------
> meta/lib/oe/tests/test_path.py | 89
-------------------------
> meta/lib/oe/tests/test_types.py | 62 ------------------
> meta/lib/oe/tests/test_utils.py | 51 ---------------
> meta/lib/oeqa/selftest/oelib-tests/__init__.py | 0
> meta/lib/oeqa/selftest/oelib-tests/elf.py | 22 +++++++
> meta/lib/oeqa/selftest/oelib-tests/license.py | 69
> ++++++++++++++++++++
> meta/lib/oeqa/selftest/oelib-tests/path.py | 90
> ++++++++++++++++++++++++++
> meta/lib/oeqa/selftest/oelib-tests/types.py | 61 +++++++++++++++++
> meta/lib/oeqa/selftest/oelib-tests/utils.py | 52 +++++++++++++++
> 12 files changed, 294 insertions(+), 291 deletions(-) delete mode 100644
> meta/lib/oe/tests/__init__.py delete mode 100644
> meta/lib/oe/tests/test_elf.py delete mode 100644
> meta/lib/oe/tests/test_license.py delete mode 100644
> meta/lib/oe/tests/test_path.py delete mode 100644
> meta/lib/oe/tests/test_types.py delete mode 100644
> meta/lib/oe/tests/test_utils.py create mode 100644
> meta/lib/oeqa/selftest/oelib-tests/__init__.py
> create mode 100644 meta/lib/oeqa/selftest/oelib-tests/elf.py
> create mode 100644 meta/lib/oeqa/selftest/oelib-tests/license.py
> create mode 100644 meta/lib/oeqa/selftest/oelib-tests/path.py
> create mode 100644 meta/lib/oeqa/selftest/oelib-tests/types.py
> create mode 100644 meta/lib/oeqa/selftest/oelib-tests/utils.py
>
> diff --git a/meta/lib/oe/tests/__init__.py b/meta/lib/oe/tests/__init__.py
> deleted file mode 100644 index e69de29..0000000 diff --git
> a/meta/lib/oe/tests/test_elf.py b/meta/lib/oe/tests/test_elf.py deleted
file
> mode 100644 index 1f59037..0000000
> --- a/meta/lib/oe/tests/test_elf.py
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -import unittest
> -import oe.qa
> -
> -class TestElf(unittest.TestCase):
> - def test_machine_name(self):
> - """
> - Test elf_machine_to_string()
> - """
> - self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
> - self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
> - self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
> - self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
> - self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
> - self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
> - self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
> - self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
> - self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
> -
> - self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown
(0)")
> - self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF),
"Unknown
> (3735928559)")
> - self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown
> ('foobar')")
> diff --git a/meta/lib/oe/tests/test_license.py
> b/meta/lib/oe/tests/test_license.py
> deleted file mode 100644
> index c388886..0000000
> --- a/meta/lib/oe/tests/test_license.py
> +++ /dev/null
> @@ -1,68 +0,0 @@
> -import unittest
> -import oe.license
> -
> -class SeenVisitor(oe.license.LicenseVisitor):
> - def __init__(self):
> - self.seen = []
> - oe.license.LicenseVisitor.__init__(self)
> -
> - def visit_Str(self, node):
> - self.seen.append(node.s)
> -
> -class TestSingleLicense(unittest.TestCase):
> - licenses = [
> - "GPLv2",
> - "LGPL-2.0",
> - "Artistic",
> - "MIT",
> - "GPLv3+",
> - "FOO_BAR",
> - ]
> - invalid_licenses = ["GPL/BSD"]
> -
> - @staticmethod
> - def parse(licensestr):
> - visitor = SeenVisitor()
> - visitor.visit_string(licensestr)
> - return visitor.seen
> -
> - def test_single_licenses(self):
> - for license in self.licenses:
> - licenses = self.parse(license)
> - self.assertListEqual(licenses, [license])
> -
> - def test_invalid_licenses(self):
> - for license in self.invalid_licenses:
> - with self.assertRaises(oe.license.InvalidLicense) as cm:
> - self.parse(license)
> - self.assertEqual(cm.exception.license, license)
> -
> -class TestSimpleCombinations(unittest.TestCase):
> - tests = {
> - "FOO&BAR": ["FOO", "BAR"],
> - "BAZ & MOO": ["BAZ", "MOO"],
> - "ALPHA|BETA": ["ALPHA"],
> - "BAZ&MOO|FOO": ["FOO"],
> - "FOO&BAR|BAZ": ["FOO", "BAR"],
> - }
> - preferred = ["ALPHA", "FOO", "BAR"]
> -
> - def test_tests(self):
> - def choose(a, b):
> - if all(lic in self.preferred for lic in b):
> - return b
> - else:
> - return a
> -
> - for license, expected in self.tests.items():
> - licenses = oe.license.flattened_licenses(license, choose)
> - self.assertListEqual(licenses, expected)
> -
> -class TestComplexCombinations(TestSimpleCombinations):
> - tests = {
> - "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"],
> - "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"],
> - "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"],
> - "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0",
"BSD-4-clause",
> "MIT"],
> - }
> - preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"]
> diff --git a/meta/lib/oe/tests/test_path.py
> b/meta/lib/oe/tests/test_path.py deleted file mode 100644 index
> 44d0681..0000000
> --- a/meta/lib/oe/tests/test_path.py
> +++ /dev/null
> @@ -1,89 +0,0 @@
> -import unittest
> -import oe, oe.path
> -import tempfile
> -import os
> -import errno
> -import shutil
> -
> -class TestRealPath(unittest.TestCase):
> - DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX",
"usr/sbin",
> "usr/include", "usr/include/gdbm" ]
> - FILES = [ "etc/passwd", "b/file" ]
> - LINKS = [
> - ( "bin", "/usr/bin", "/usr/bin" ),
> - ( "binX", "usr/binX", "/usr/binX" ),
> - ( "c", "broken", "/broken" ),
> - ( "etc/passwd-1", "passwd", "/etc/passwd" ),
> - ( "etc/passwd-2", "passwd-1", "/etc/passwd" ),
> - ( "etc/passwd-3", "/etc/passwd-1", "/etc/passwd" ),
> - ( "etc/shadow-1", "/etc/shadow", "/etc/shadow" ),
> - ( "etc/shadow-2", "/etc/shadow-1", "/etc/shadow" ),
> - ( "prog-A", "bin/prog-A", "/usr/bin/prog-A" ),
> - ( "prog-B", "/bin/prog-B", "/usr/bin/prog-B" ),
> - ( "usr/bin/prog-C", "../../sbin/prog-C", "/sbin/prog-C" ),
> - ( "usr/bin/prog-D", "/sbin/prog-D", "/sbin/prog-D" ),
> - ( "usr/binX/prog-E", "../sbin/prog-E", None ),
> - ( "usr/bin/prog-F", "../../../sbin/prog-F", "/sbin/prog-F" ),
> - ( "loop", "a/loop", None ),
> - ( "a/loop", "../loop", None ),
> - ( "b/test", "file/foo", "/b/file/foo" ),
> - ]
> -
> - LINKS_PHYS = [
> - ( "./", "/", "" ),
> - ( "binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E" ),
> - ]
> -
> - EXCEPTIONS = [
> - ( "loop", errno.ELOOP ),
> - ( "b/test", errno.ENOENT ),
> - ]
> -
> - def __del__(self):
> - try:
> - #os.system("tree -F %s" % self.tmpdir)
> - shutil.rmtree(self.tmpdir)
> - except:
> - pass
> -
> - def setUp(self):
> - self.tmpdir = tempfile.mkdtemp(prefix = "oe-test_path")
> - self.root = os.path.join(self.tmpdir, "R")
> -
> - os.mkdir(os.path.join(self.tmpdir, "_real"))
> - os.symlink("_real", self.root)
> -
> - for d in self.DIRS:
> - os.mkdir(os.path.join(self.root, d))
> - for f in self.FILES:
> - open(os.path.join(self.root, f), "w")
> - for l in self.LINKS:
> - os.symlink(l[1], os.path.join(self.root, l[0]))
> -
> - def __realpath(self, file, use_physdir, assume_dir = True):
> - return oe.path.realpath(os.path.join(self.root, file), self.root,
> - use_physdir, assume_dir = assume_dir)
> -
> - def test_norm(self):
> - for l in self.LINKS:
> - if l[2] == None:
> - continue
> -
> - target_p = self.__realpath(l[0], True)
> - target_l = self.__realpath(l[0], False)
> -
> - if l[2] != False:
> - self.assertEqual(target_p, target_l)
> - self.assertEqual(l[2], target_p[len(self.root):])
> -
> - def test_phys(self):
> - for l in self.LINKS_PHYS:
> - target_p = self.__realpath(l[0], True)
> - target_l = self.__realpath(l[0], False)
> -
> - self.assertEqual(l[1], target_p[len(self.root):])
> - self.assertEqual(l[2], target_l[len(self.root):])
> -
> - def test_loop(self):
> - for e in self.EXCEPTIONS:
> - self.assertRaisesRegex(OSError, r'\[Errno %u\]' % e[1],
> - self.__realpath, e[0], False, False)
> diff --git a/meta/lib/oe/tests/test_types.py
> b/meta/lib/oe/tests/test_types.py deleted file mode 100644 index
> 367cc30..0000000
> --- a/meta/lib/oe/tests/test_types.py
> +++ /dev/null
> @@ -1,62 +0,0 @@
> -import unittest
> -from oe.maketype import create, factory
> -
> -class TestTypes(unittest.TestCase):
> - def assertIsInstance(self, obj, cls):
> - return self.assertTrue(isinstance(obj, cls))
> -
> - def assertIsNot(self, obj, other):
> - return self.assertFalse(obj is other)
> -
> - def assertFactoryCreated(self, value, type, **flags):
> - cls = factory(type)
> - self.assertIsNot(cls, None)
> - self.assertIsInstance(create(value, type, **flags), cls)
> -
> -class TestBooleanType(TestTypes):
> - def test_invalid(self):
> - self.assertRaises(ValueError, create, '', 'boolean')
> - self.assertRaises(ValueError, create, 'foo', 'boolean')
> - self.assertRaises(TypeError, create, object(), 'boolean')
> -
> - def test_true(self):
> - self.assertTrue(create('y', 'boolean'))
> - self.assertTrue(create('yes', 'boolean'))
> - self.assertTrue(create('1', 'boolean'))
> - self.assertTrue(create('t', 'boolean'))
> - self.assertTrue(create('true', 'boolean'))
> - self.assertTrue(create('TRUE', 'boolean'))
> - self.assertTrue(create('truE', 'boolean'))
> -
> - def test_false(self):
> - self.assertFalse(create('n', 'boolean'))
> - self.assertFalse(create('no', 'boolean'))
> - self.assertFalse(create('0', 'boolean'))
> - self.assertFalse(create('f', 'boolean'))
> - self.assertFalse(create('false', 'boolean'))
> - self.assertFalse(create('FALSE', 'boolean'))
> - self.assertFalse(create('faLse', 'boolean'))
> -
> - def test_bool_equality(self):
> - self.assertEqual(create('n', 'boolean'), False)
> - self.assertNotEqual(create('n', 'boolean'), True)
> - self.assertEqual(create('y', 'boolean'), True)
> - self.assertNotEqual(create('y', 'boolean'), False)
> -
> -class TestList(TestTypes):
> - def assertListEqual(self, value, valid, sep=None):
> - obj = create(value, 'list', separator=sep)
> - self.assertEqual(obj, valid)
> - if sep is not None:
> - self.assertEqual(obj.separator, sep)
> - self.assertEqual(str(obj), obj.separator.join(obj))
> -
> - def test_list_nosep(self):
> - testlist = ['alpha', 'beta', 'theta']
> - self.assertListEqual('alpha beta theta', testlist)
> - self.assertListEqual('alpha beta\ttheta', testlist)
> - self.assertListEqual('alpha', ['alpha'])
> -
> - def test_list_usersep(self):
> - self.assertListEqual('foo:bar', ['foo', 'bar'], ':')
> - self.assertListEqual('foo:bar:baz', ['foo', 'bar', 'baz'], ':')
> diff --git a/meta/lib/oe/tests/test_utils.py
b/meta/lib/oe/tests/test_utils.py
> deleted file mode 100644 index 5d9ac52..0000000
> --- a/meta/lib/oe/tests/test_utils.py
> +++ /dev/null
> @@ -1,51 +0,0 @@
> -import unittest
> -from oe.utils import packages_filter_out_system
> -
> -class TestPackagesFilterOutSystem(unittest.TestCase):
> - def test_filter(self):
> - """
> - Test that oe.utils.packages_filter_out_system works.
> - """
> - try:
> - import bb
> - except ImportError:
> - self.skipTest("Cannot import bb")
> -
> - d = bb.data_smart.DataSmart()
> - d.setVar("PN", "foo")
> -
> - d.setVar("PACKAGES", "foo foo-doc foo-dev")
> - pkgs = packages_filter_out_system(d)
> - self.assertEqual(pkgs, [])
> -
> - d.setVar("PACKAGES", "foo foo-doc foo-data foo-dev")
> - pkgs = packages_filter_out_system(d)
> - self.assertEqual(pkgs, ["foo-data"])
> -
> - d.setVar("PACKAGES", "foo foo-locale-en-gb")
> - pkgs = packages_filter_out_system(d)
> - self.assertEqual(pkgs, [])
> -
> - d.setVar("PACKAGES", "foo foo-data foo-locale-en-gb")
> - pkgs = packages_filter_out_system(d)
> - self.assertEqual(pkgs, ["foo-data"])
> -
> -
> -class TestTrimVersion(unittest.TestCase):
> - def test_version_exception(self):
> - with self.assertRaises(TypeError):
> - trim_version(None, 2)
> - with self.assertRaises(TypeError):
> - trim_version((1, 2, 3), 2)
> -
> - def test_num_exception(self):
> - with self.assertRaises(ValueError):
> - trim_version("1.2.3", 0)
> - with self.assertRaises(ValueError):
> - trim_version("1.2.3", -1)
> -
> - def test_valid(self):
> - self.assertEqual(trim_version("1.2.3", 1), "1")
> - self.assertEqual(trim_version("1.2.3", 2), "1.2")
> - self.assertEqual(trim_version("1.2.3", 3), "1.2.3")
> - self.assertEqual(trim_version("1.2.3", 4), "1.2.3")
> diff --git a/meta/lib/oeqa/selftest/oelib-tests/__init__.py
> b/meta/lib/oeqa/selftest/oelib-tests/__init__.py
> new file mode 100644
> index 0000000..e69de29
> diff --git a/meta/lib/oeqa/selftest/oelib-tests/elf.py
> b/meta/lib/oeqa/selftest/oelib-tests/elf.py
> new file mode 100644
> index 0000000..582d772
> --- /dev/null
> +++ b/meta/lib/oeqa/selftest/oelib-tests/elf.py
> @@ -0,0 +1,22 @@
> +from oeqa.selftest.base import oeSelfTest from oeqa.utils.decorators
> +import testcase import oe.qa
> +
> +class TestElf(oeSelfTest):
> + def test_machine_name(self):
> + """
> + Test elf_machine_to_string()
> + """
> + self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
> + self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
> + self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
> + self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
> + self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
> + self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
> + self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
> + self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
> + self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
> +
> + self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown
(0)")
> + self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF),
> "Unknown (3735928559)")
> + self.assertEqual(oe.qa.elf_machine_to_string("foobar"),
> + "Unknown ('foobar')")
> diff --git a/meta/lib/oeqa/selftest/oelib-tests/license.py
> b/meta/lib/oeqa/selftest/oelib-tests/license.py
> new file mode 100644
> index 0000000..90bdf51
> --- /dev/null
> +++ b/meta/lib/oeqa/selftest/oelib-tests/license.py
> @@ -0,0 +1,69 @@
> +import oe.license
> +from oeqa.selftest.base import oeSelfTest from oeqa.utils.decorators
> +import testcase
> +
> +class SeenVisitor(oe.license.LicenseVisitor):
> + def __init__(self):
> + self.seen = []
> + oe.license.LicenseVisitor.__init__(self)
> +
> + def visit_Str(self, node):
> + self.seen.append(node.s)
> +
> +class TestSingleLicense(oeSelfTest):
> + licenses = [
> + "GPLv2",
> + "LGPL-2.0",
> + "Artistic",
> + "MIT",
> + "GPLv3+",
> + "FOO_BAR",
> + ]
> + invalid_licenses = ["GPL/BSD"]
> +
> + @staticmethod
> + def parse(licensestr):
> + visitor = SeenVisitor()
> + visitor.visit_string(licensestr)
> + return visitor.seen
> +
> + def test_single_licenses(self):
> + for license in self.licenses:
> + licenses = self.parse(license)
> + self.assertListEqual(licenses, [license])
> +
> + def test_invalid_licenses(self):
> + for license in self.invalid_licenses:
> + with self.assertRaises(oe.license.InvalidLicense) as cm:
> + self.parse(license)
> + self.assertEqual(cm.exception.license, license)
> +
> +class TestSimpleCombinations(oeSelfTest):
> + tests = {
> + "FOO&BAR": ["FOO", "BAR"],
> + "BAZ & MOO": ["BAZ", "MOO"],
> + "ALPHA|BETA": ["ALPHA"],
> + "BAZ&MOO|FOO": ["FOO"],
> + "FOO&BAR|BAZ": ["FOO", "BAR"],
> + }
> + preferred = ["ALPHA", "FOO", "BAR"]
> +
> + def test_tests(self):
> + def choose(a, b):
> + if all(lic in self.preferred for lic in b):
> + return b
> + else:
> + return a
> +
> + for license, expected in self.tests.items():
> + licenses = oe.license.flattened_licenses(license, choose)
> + self.assertListEqual(licenses, expected)
> +
> +class TestComplexCombinations(TestSimpleCombinations):
> + tests = {
> + "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"],
> + "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"],
> + "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"],
> + "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-
> clause", "MIT"],
> + }
> + preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"]
> diff --git a/meta/lib/oeqa/selftest/oelib-tests/path.py
> b/meta/lib/oeqa/selftest/oelib-tests/path.py
> new file mode 100644
> index 0000000..09b56cb
> --- /dev/null
> +++ b/meta/lib/oeqa/selftest/oelib-tests/path.py
> @@ -0,0 +1,90 @@
> +from oeqa.selftest.base import oeSelfTest from oeqa.utils.decorators
> +import testcase import oe, oe.path import tempfile import os import
> +errno import shutil
> +
> +class TestRealPath(oeSelfTest):
> + DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX",
"usr/sbin",
> "usr/include", "usr/include/gdbm" ]
> + FILES = [ "etc/passwd", "b/file" ]
> + LINKS = [
> + ( "bin", "/usr/bin", "/usr/bin" ),
> + ( "binX", "usr/binX", "/usr/binX" ),
> + ( "c", "broken", "/broken" ),
> + ( "etc/passwd-1", "passwd", "/etc/passwd" ),
> + ( "etc/passwd-2", "passwd-1", "/etc/passwd" ),
> + ( "etc/passwd-3", "/etc/passwd-1", "/etc/passwd" ),
> + ( "etc/shadow-1", "/etc/shadow", "/etc/shadow" ),
> + ( "etc/shadow-2", "/etc/shadow-1", "/etc/shadow" ),
> + ( "prog-A", "bin/prog-A", "/usr/bin/prog-A" ),
> + ( "prog-B", "/bin/prog-B", "/usr/bin/prog-B" ),
> + ( "usr/bin/prog-C", "../../sbin/prog-C", "/sbin/prog-C" ),
> + ( "usr/bin/prog-D", "/sbin/prog-D", "/sbin/prog-D" ),
> + ( "usr/binX/prog-E", "../sbin/prog-E", None ),
> + ( "usr/bin/prog-F", "../../../sbin/prog-F", "/sbin/prog-F" ),
> + ( "loop", "a/loop", None ),
> + ( "a/loop", "../loop", None ),
> + ( "b/test", "file/foo", "/b/file/foo" ),
> + ]
> +
> + LINKS_PHYS = [
> + ( "./", "/", "" ),
> + ( "binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E" ),
> + ]
> +
> + EXCEPTIONS = [
> + ( "loop", errno.ELOOP ),
> + ( "b/test", errno.ENOENT ),
> + ]
> +
> + def __del__(self):
> + try:
> + #os.system("tree -F %s" % self.tmpdir)
> + shutil.rmtree(self.tmpdir)
> + except:
> + pass
> +
> + def setUp(self):
> + self.tmpdir = tempfile.mkdtemp(prefix = "oe-test_path")
> + self.root = os.path.join(self.tmpdir, "R")
> +
> + os.mkdir(os.path.join(self.tmpdir, "_real"))
> + os.symlink("_real", self.root)
> +
> + for d in self.DIRS:
> + os.mkdir(os.path.join(self.root, d))
> + for f in self.FILES:
> + open(os.path.join(self.root, f), "w")
> + for l in self.LINKS:
> + os.symlink(l[1], os.path.join(self.root, l[0]))
> +
> + def __realpath(self, file, use_physdir, assume_dir = True):
> + return oe.path.realpath(os.path.join(self.root, file), self.root,
> + use_physdir, assume_dir = assume_dir)
> +
> + def test_norm(self):
> + for l in self.LINKS:
> + if l[2] == None:
> + continue
> +
> + target_p = self.__realpath(l[0], True)
> + target_l = self.__realpath(l[0], False)
> +
> + if l[2] != False:
> + self.assertEqual(target_p, target_l)
> + self.assertEqual(l[2], target_p[len(self.root):])
> +
> + def test_phys(self):
> + for l in self.LINKS_PHYS:
> + target_p = self.__realpath(l[0], True)
> + target_l = self.__realpath(l[0], False)
> +
> + self.assertEqual(l[1], target_p[len(self.root):])
> + self.assertEqual(l[2], target_l[len(self.root):])
> +
> + def test_loop(self):
> + for e in self.EXCEPTIONS:
> + self.assertRaisesRegex(OSError, r'\[Errno %u\]' % e[1],
> + self.__realpath, e[0], False,
> + False)
> diff --git a/meta/lib/oeqa/selftest/oelib-tests/types.py
> b/meta/lib/oeqa/selftest/oelib-tests/types.py
> new file mode 100644
> index 0000000..2613da9
> --- /dev/null
> +++ b/meta/lib/oeqa/selftest/oelib-tests/types.py
> @@ -0,0 +1,61 @@
> +from oeqa.selftest.base import oeSelfTest from oeqa.utils.decorators
> +import testcase from oe.maketype import create, factory
> +
> +class TestTypes(oeSelfTest):
> + def assertIsInstance(self, obj, cls):
> + return self.assertTrue(isinstance(obj, cls))
> +
> + def assertIsNot(self, obj, other):
> + return self.assertFalse(obj is other)
> +
> + def assertFactoryCreated(self, value, type, **flags):
> + cls = factory(type)
> + self.assertIsNot(cls, None)
> + self.assertIsInstance(create(value, type, **flags), cls)
> +
> + def assertListIsEqual(self, value, valid, sep=None):
> + obj = create(value, 'list', separator=sep)
> + self.assertListEqual(obj, valid)
> +
> +class TestBooleanType(TestTypes):
> + def test_invalid(self):
> + self.assertRaises(ValueError, create, '', 'boolean')
> + self.assertRaises(ValueError, create, 'foo', 'boolean')
> + self.assertRaises(TypeError, create, object(), 'boolean')
> +
> + def test_true(self):
> + self.assertTrue(create('y', 'boolean'))
> + self.assertTrue(create('yes', 'boolean'))
> + self.assertTrue(create('1', 'boolean'))
> + self.assertTrue(create('t', 'boolean'))
> + self.assertTrue(create('true', 'boolean'))
> + self.assertTrue(create('TRUE', 'boolean'))
> + self.assertTrue(create('truE', 'boolean'))
> +
> + def test_false(self):
> + self.assertFalse(create('n', 'boolean'))
> + self.assertFalse(create('no', 'boolean'))
> + self.assertFalse(create('0', 'boolean'))
> + self.assertFalse(create('f', 'boolean'))
> + self.assertFalse(create('false', 'boolean'))
> + self.assertFalse(create('FALSE', 'boolean'))
> + self.assertFalse(create('faLse', 'boolean'))
> +
> + def test_bool_equality(self):
> + self.assertEqual(create('n', 'boolean'), False)
> + self.assertNotEqual(create('n', 'boolean'), True)
> + self.assertEqual(create('y', 'boolean'), True)
> + self.assertNotEqual(create('y', 'boolean'), False)
> +
> +class TestList(TestTypes):
> +
> + def test_list_nosep(self):
> + testlist = ['alpha', 'beta', 'theta']
> + self.assertListIsEqual('alpha beta theta', testlist)
> + self.assertListIsEqual('alpha beta\ttheta', testlist)
> + self.assertListIsEqual('alpha', ['alpha'])
> +
> + def test_list_usersep(self):
> + self.assertListIsEqual('foo:bar', ['foo', 'bar'], ':')
> + self.assertListIsEqual('foo:bar:baz', ['foo', 'bar', 'baz'],
> + ':')
> diff --git a/meta/lib/oeqa/selftest/oelib-tests/utils.py
> b/meta/lib/oeqa/selftest/oelib-tests/utils.py
> new file mode 100644
> index 0000000..25c60e1
> --- /dev/null
> +++ b/meta/lib/oeqa/selftest/oelib-tests/utils.py
> @@ -0,0 +1,52 @@
> +from oeqa.selftest.base import oeSelfTest from oeqa.utils.decorators
> +import testcase from oe.utils import packages_filter_out_system,
> +trim_version
> +
> +class TestPackagesFilterOutSystem(oeSelfTest):
> + def test_filter(self):
> + """
> + Test that oe.utils.packages_filter_out_system works.
> + """
> + try:
> + import bb
> + except ImportError:
> + self.skipTest("Cannot import bb")
> +
> + d = bb.data_smart.DataSmart()
> + d.setVar("PN", "foo")
> +
> + d.setVar("PACKAGES", "foo foo-doc foo-dev")
> + pkgs = packages_filter_out_system(d)
> + self.assertEqual(pkgs, [])
> +
> + d.setVar("PACKAGES", "foo foo-doc foo-data foo-dev")
> + pkgs = packages_filter_out_system(d)
> + self.assertEqual(pkgs, ["foo-data"])
> +
> + d.setVar("PACKAGES", "foo foo-locale-en-gb")
> + pkgs = packages_filter_out_system(d)
> + self.assertEqual(pkgs, [])
> +
> + d.setVar("PACKAGES", "foo foo-data foo-locale-en-gb")
> + pkgs = packages_filter_out_system(d)
> + self.assertEqual(pkgs, ["foo-data"])
> +
> +
> +class TestTrimVersion(oeSelfTest):
> + def test_version_exception(self):
> + with self.assertRaises(TypeError):
> + trim_version(None, 2)
> + with self.assertRaises(TypeError):
> + trim_version((1, 2, 3), 2)
> +
> + def test_num_exception(self):
> + with self.assertRaises(ValueError):
> + trim_version("1.2.3", 0)
> + with self.assertRaises(ValueError):
> + trim_version("1.2.3", -1)
> +
> + def test_valid(self):
> + self.assertEqual(trim_version("1.2.3", 1), "1")
> + self.assertEqual(trim_version("1.2.3", 2), "1.2")
> + self.assertEqual(trim_version("1.2.3", 3), "1.2.3")
> + self.assertEqual(trim_version("1.2.3", 4), "1.2.3")
> --
> 2.1.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply
* Re: [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests
From: Jose Perez Carranza @ 2016-11-15 18:09 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LYp7-ufcRMiwmXac7vmOZquq6PPm3w8_XDK40prpZBFZw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 613 bytes --]
On 11/15/2016 11:16 AM, Burton, Ross wrote:
>
> On 15 November 2016 at 16:24, <jose.perez.carranza@linux.intel.com
> <mailto:jose.perez.carranza@linux.intel.com>> wrote:
>
> +class TestPackagesFilterOutSystem(oeSelfTest):
>
>
> As the tests don't need anything special that oeSelfTest provides, can
> they remain as testcase.TestCase instances? There's a lot of
> complication from oeSelfTest that isn't required.
>
In order to the test cases be recognized and executed as part of the
suite they need to be in the same context of selftest hence be an
instance of oeSelftest.
> Ross
[-- Attachment #2: Type: text/html, Size: 1863 bytes --]
^ permalink raw reply
* [PATCH V4] package_manager: remove strings and migrate to direct arrays
From: Stephano Cetola @ 2016-11-15 17:17 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <20161115171728.76132-1-stephano.cetola@linux.intel.com>
When using subprocess call and check_output, it is better to use arrays
rather than strings when possible to avoid whitespace and quoting
problems.
[ YOCTO #9342 ]
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
---
meta/lib/oe/package.py | 13 +--
meta/lib/oe/package_manager.py | 229 ++++++++++++++++++++---------------------
2 files changed, 118 insertions(+), 124 deletions(-)
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 02642f2..ae60a58 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -18,23 +18,24 @@ def runstrip(arg):
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
- extraflags = ""
+ stripcmd = [strip]
# kernel module
if elftype & 16:
- extraflags = "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
+ stripcmd.extend(["--strip-debug", "--remove-section=.comment",
+ "--remove-section=.note", "--preserve-dates"])
# .so and shared library
elif ".so" in file and elftype & 8:
- extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
+ stripcmd.extend(["--remove-section=.comment", "--remove-section=.note", "--strip-unneeded"])
# shared or executable:
elif elftype & 8 or elftype & 4:
- extraflags = "--remove-section=.comment --remove-section=.note"
+ stripcmd.extend(["--remove-section=.comment", "--remove-section=.note"])
- stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+ stripcmd.append(file)
bb.debug(1, "runstrip: %s" % stripcmd)
try:
- output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT, shell=True)
+ output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.error("runstrip: '%s' strip command failed with %s (%s)" % (stripcmd, e.returncode, e.output))
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index a9d216a..5fbfa7a 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -358,12 +358,11 @@ class RpmPkgsList(PkgsList):
RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, os_var)
# Determine rpm version
- cmd = "%s --version" % self.rpm_cmd
try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+ output = subprocess.check_output([self.rpm_cmd, "--version"], stderr=subprocess.STDOUT).decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Getting rpm version failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ "returned %d:\n%s" % (self.rpm_cmd, e.returncode, e.output.decode("utf-8")))
'''
Translate the RPM/Smart format names to the OE multilib format names
@@ -412,16 +411,15 @@ class RpmPkgsList(PkgsList):
return output
def list_pkgs(self):
- cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
- cmd += ' -D "_dbpath /var/lib/rpm" -qa'
- cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
+ cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
+ cmd.extend(['-D', '_dbpath /var/lib/rpm'])
+ cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'])
try:
- # bb.note(cmd)
- tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
+ tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Cannot get the installed packages list. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
output = dict()
deps = dict()
@@ -672,11 +670,11 @@ class RpmPM(PackageManager):
# 2 = --log-level=debug
# 3 = --log-level=debug plus dumps of scriplet content and command invocation
self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG', True) or "0")
- self.smart_opt = "--log-level=%s --data-dir=%s" % \
+ self.smart_opt = ["--log-level=%s" %
("warning" if self.debug_level == 0 else
"info" if self.debug_level == 1 else
- "debug",
- os.path.join(target_rootfs, 'var/lib/smart'))
+ "debug"), "--data-dir=%s" %
+ os.path.join(target_rootfs, 'var/lib/smart')]
self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
self.task_name)
@@ -732,18 +730,18 @@ class RpmPM(PackageManager):
for arch in arch_list:
bb.note('Adding Smart channel url%d%s (%s)' %
(uri_iterator, arch, channel_priority))
- self._invoke_smart('channel --add url%d-%s type=rpm-md baseurl=%s/%s -y'
- % (uri_iterator, arch, uri, arch))
- self._invoke_smart('channel --set url%d-%s priority=%d' %
- (uri_iterator, arch, channel_priority))
+ self._invoke_smart(['channel', '--add', 'url%d-%s' % (uri_iterator, arch),
+ 'type=rpm-md', 'baseurl=%s/%s' % (uri, arch), '-y'])
+ self._invoke_smart(['channel', '--set', 'url%d-%s' % (uri_iterator, arch),
+ 'priority=%d' % channel_priority])
channel_priority -= 5
else:
bb.note('Adding Smart channel url%d (%s)' %
(uri_iterator, channel_priority))
- self._invoke_smart('channel --add url%d type=rpm-md baseurl=%s -y'
- % (uri_iterator, uri))
- self._invoke_smart('channel --set url%d priority=%d' %
- (uri_iterator, channel_priority))
+ self._invoke_smart(['channel', '--add', 'url%d' % uri_iterator,
+ 'type=rpm-md', 'baseurl=%s' % uri, '-y'])
+ self._invoke_smart(['channel', '--set', 'url%d' % uri_iterator,
+ 'priority=%d' % channel_priority])
channel_priority -= 5
uri_iterator += 1
@@ -774,18 +772,17 @@ class RpmPM(PackageManager):
self._create_configs(platform, platform_extra)
+ #takes array args
def _invoke_smart(self, args):
- cmd = "%s %s %s" % (self.smart_cmd, self.smart_opt, args)
+ cmd = [self.smart_cmd] + self.smart_opt + args
# bb.note(cmd)
try:
- complementary_pkgs = subprocess.check_output(cmd,
- stderr=subprocess.STDOUT,
- shell=True).decode("utf-8")
+ complementary_pkgs = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
# bb.note(complementary_pkgs)
return complementary_pkgs
except subprocess.CalledProcessError as e:
bb.fatal("Could not invoke smart. Command "
- "'%s' returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
def _search_pkg_name_in_feeds(self, pkg, feed_archs):
for arch in feed_archs:
@@ -800,19 +797,23 @@ class RpmPM(PackageManager):
# Search provides if not found by pkgname.
bb.note('Not found %s by name, searching provides ...' % pkg)
- cmd = "%s %s query --provides %s --show-format='$name-$version'" % \
- (self.smart_cmd, self.smart_opt, pkg)
- cmd += " | sed -ne 's/ *Provides://p'"
- bb.note('cmd: %s' % cmd)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
- # Found a provider
- if output:
- bb.note('Found providers for %s: %s' % (pkg, output))
- for p in output.split():
- for arch in feed_archs:
- arch = arch.replace('-', '_')
- if p.rstrip().endswith('@' + arch):
- return p
+ cmd = [self.smart_cmd] + self.smart_opt + ["query", "--provides", pkg,
+ "--show-format='$name-$version'"]
+ bb.note('cmd: %s' % ' '.join(cmd))
+ ps = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+ try:
+ output = subprocess.check_output(["sed", "-ne", "s/ *Provides://p"],
+ stdin=ps.stdout, stderr=subprocess.STDOUT).decode("utf-8")
+ # Found a provider
+ if output:
+ bb.note('Found providers for %s: %s' % (pkg, output))
+ for p in output.split():
+ for arch in feed_archs:
+ arch = arch.replace('-', '_')
+ if p.rstrip().endswith('@' + arch):
+ return p
+ except subprocess.CalledProcessError as e:
+ bb.error("Failed running smart query on package %s." % pkg)
return ""
@@ -949,30 +950,32 @@ class RpmPM(PackageManager):
open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
# Create database so that smart doesn't complain (lazy init)
- opt = "-qa"
- cmd = "%s --root %s --dbpath /var/lib/rpm %s > /dev/null" % (
- self.rpm_cmd, self.target_rootfs, opt)
+ cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '-qa']
try:
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.fatal("Create rpm database failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
# Import GPG key to RPM database of the target system
if self.d.getVar('RPM_SIGN_PACKAGES', True) == '1':
pubkey_path = self.d.getVar('RPM_GPG_PUBKEY', True)
- cmd = "%s --root %s --dbpath /var/lib/rpm --import %s > /dev/null" % (
- self.rpm_cmd, self.target_rootfs, pubkey_path)
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '--import', pubkey_path]
+ try:
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Import GPG key failed. Command '%s' "
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+
# Configure smart
bb.note("configuring Smart settings")
bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
True)
- self._invoke_smart('config --set rpm-root=%s' % self.target_rootfs)
- self._invoke_smart('config --set rpm-dbpath=/var/lib/rpm')
- self._invoke_smart('config --set rpm-extra-macros._var=%s' %
- self.d.getVar('localstatedir', True))
- cmd = "config --set rpm-extra-macros._tmppath=/%s/tmp" % (self.install_dir_name)
+ self._invoke_smart(['config', '--set', 'rpm-root=%s' % self.target_rootfs])
+ self._invoke_smart(['config', '--set', 'rpm-dbpath=/var/lib/rpm'])
+ self._invoke_smart(['config', '--set', 'rpm-extra-macros._var=%s' %
+ self.d.getVar('localstatedir', True)])
+ cmd = ["config", "--set", "rpm-extra-macros._tmppath=/%s/tmp" % self.install_dir_name]
prefer_color = self.d.getVar('RPM_PREFER_ELF_ARCH', True)
if prefer_color:
@@ -986,32 +989,32 @@ class RpmPM(PackageManager):
['mips64', 'mips64el']:
bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
"only.")
- self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
- % prefer_color)
+ self._invoke_smart(['config', '--set', 'rpm-extra-macros._prefer_color=%s'
+ % prefer_color])
self._invoke_smart(cmd)
- self._invoke_smart('config --set rpm-ignoresize=1')
+ self._invoke_smart(['config', '--set', 'rpm-ignoresize=1'])
# Write common configuration for host and target usage
- self._invoke_smart('config --set rpm-nolinktos=1')
- self._invoke_smart('config --set rpm-noparentdirs=1')
+ self._invoke_smart(['config', '--set', 'rpm-nolinktos=1'])
+ self._invoke_smart(['config', '--set', 'rpm-noparentdirs=1'])
check_signature = self.d.getVar('RPM_CHECK_SIGNATURES', True)
if check_signature and check_signature.strip() == "0":
- self._invoke_smart('config --set rpm-check-signatures=false')
+ self._invoke_smart(['config', '--set rpm-check-signatures=false'])
for i in self.d.getVar('BAD_RECOMMENDATIONS', True).split():
- self._invoke_smart('flag --set ignore-recommends %s' % i)
+ self._invoke_smart(['flag', '--set', 'ignore-recommends', i])
# Do the following configurations here, to avoid them being
# saved for field upgrade
if self.d.getVar('NO_RECOMMENDATIONS', True).strip() == "1":
- self._invoke_smart('config --set ignore-all-recommends=1')
+ self._invoke_smart(['config', '--set', 'ignore-all-recommends=1'])
pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE', True) or ""
for i in pkg_exclude.split():
- self._invoke_smart('flag --set exclude-packages %s' % i)
+ self._invoke_smart(['flag', '--set', 'exclude-packages', i])
# Optional debugging
- # self._invoke_smart('config --set rpm-log-level=debug')
- # cmd = 'config --set rpm-log-file=/tmp/smart-debug-logfile'
+ # self._invoke_smart(['config', '--set', 'rpm-log-level=debug'])
+ # cmd = ['config', '--set', 'rpm-log-file=/tmp/smart-debug-logfile']
# self._invoke_smart(cmd)
ch_already_added = []
for canonical_arch in platform_extra:
@@ -1030,16 +1033,16 @@ class RpmPM(PackageManager):
if not arch in ch_already_added:
bb.note('Adding Smart channel %s (%s)' %
(arch, channel_priority))
- self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y'
- % (arch, arch_channel))
- self._invoke_smart('channel --set %s priority=%d' %
- (arch, channel_priority))
+ self._invoke_smart(['channel', '--add', arch, 'type=rpm-md',
+ 'baseurl=%s' % arch_channel, '-y'])
+ self._invoke_smart(['channel', '--set', arch, 'priority=%d' %
+ channel_priority])
channel_priority -= 5
ch_already_added.append(arch)
bb.note('adding Smart RPM DB channel')
- self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
+ self._invoke_smart(['channel', '--add', 'rpmsys', 'type=rpm-sys', '-y'])
# Construct install scriptlet wrapper.
# Scripts need to be ordered when executed, this ensures numeric order.
@@ -1102,15 +1105,15 @@ class RpmPM(PackageManager):
bb.note("configuring RPM cross-install scriptlet_wrapper")
os.chmod(self.scriptlet_wrapper, 0o755)
- cmd = 'config --set rpm-extra-macros._cross_scriptlet_wrapper=%s' % \
- self.scriptlet_wrapper
+ cmd = ['config', '--set', 'rpm-extra-macros._cross_scriptlet_wrapper=%s' %
+ self.scriptlet_wrapper]
self._invoke_smart(cmd)
# Debug to show smart config info
- # bb.note(self._invoke_smart('config --show'))
+ # bb.note(self._invoke_smart(['config', '--show']))
def update(self):
- self._invoke_smart('update rpmsys')
+ self._invoke_smart(['update', 'rpmsys'])
def get_rdepends_recursively(self, pkgs):
# pkgs will be changed during the loop, so use [:] to make a copy.
@@ -1207,20 +1210,19 @@ class RpmPM(PackageManager):
return
if not attempt_only:
bb.note('to be installed: %s' % ' '.join(pkgs))
- cmd = "%s %s install -y %s" % \
- (self.smart_cmd, self.smart_opt, ' '.join(pkgs))
- bb.note(cmd)
+ cmd = [self.smart_cmd] + self.smart_opt + ["install", "-y"] + pkgs
+ bb.note(' '.join(cmd))
else:
bb.note('installing attempt only packages...')
bb.note('Attempting %s' % ' '.join(pkgs))
- cmd = "%s %s install --attempt -y %s" % \
- (self.smart_cmd, self.smart_opt, ' '.join(pkgs))
+ cmd = [self.smart_cmd] + self.smart_opt + ["install", "--attempt",
+ "-y"] + pkgs
try:
- output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
bb.note(output)
except subprocess.CalledProcessError as e:
bb.fatal("Unable to install packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
'''
Remove pkgs with smart, the pkg name is smart/rpm format
@@ -1229,24 +1231,19 @@ class RpmPM(PackageManager):
bb.note('to be removed: ' + ' '.join(pkgs))
if not with_dependencies:
- cmd = "%s -e --nodeps " % self.rpm_cmd
- cmd += "--root=%s " % self.target_rootfs
- cmd += "--dbpath=/var/lib/rpm "
- cmd += "--define='_cross_scriptlet_wrapper %s' " % \
- self.scriptlet_wrapper
- cmd += "--define='_tmppath /%s/tmp' %s" % (self.install_dir_name, ' '.join(pkgs))
+ cmd = [self.rpm_cmd] + ["-e", "--nodeps", "--root=%s" %
+ self.target_rootfs, "--dbpath=/var/lib/rpm",
+ "--define='_cross_scriptlet_wrapper %s'" %
+ self.scriptlet_wrapper,
+ "--define='_tmppath /%s/tmp'" % self.install_dir_name] + pkgs
else:
# for pkg in pkgs:
# bb.note('Debug: What required: %s' % pkg)
- # bb.note(self._invoke_smart('query %s --show-requiredby' % pkg))
-
- cmd = "%s %s remove -y %s" % (self.smart_cmd,
- self.smart_opt,
- ' '.join(pkgs))
-
+ # bb.note(self._invoke_smart(['query', pkg, '--show-requiredby']))
+ cmd = [self.smart_cmd] + self.smart_opt + ["remove", "-y"] + pkgs
try:
- bb.note(cmd)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+ bb.note(' '.join(cmd))
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
bb.note(output)
except subprocess.CalledProcessError as e:
bb.note("Unable to remove packages. Command '%s' "
@@ -1254,7 +1251,7 @@ class RpmPM(PackageManager):
def upgrade(self):
bb.note('smart upgrade')
- self._invoke_smart('upgrade')
+ self._invoke_smart(['upgrade'])
def write_index(self):
result = self.indexer.write_index()
@@ -1307,16 +1304,13 @@ class RpmPM(PackageManager):
pkgs = self._pkg_translate_oe_to_smart(pkgs, False)
install_pkgs = list()
- cmd = "%s %s install -y --dump %s 2>%s" % \
- (self.smart_cmd,
- self.smart_opt,
- ' '.join(pkgs),
- self.solution_manifest)
+ cmd = [self.smart_cmd] + self.smart_opt + ['install', '-y', '--dump',
+ self.solution_manifest]
try:
# Disable rpmsys channel for the fake install
- self._invoke_smart('channel --disable rpmsys')
+ self._invoke_smart(['channel', '--disable', 'rpmsys'])
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT)
with open(self.solution_manifest, 'r') as manifest:
for pkg in manifest.read().split('\n'):
if '@' in pkg:
@@ -1325,7 +1319,7 @@ class RpmPM(PackageManager):
bb.note("Unable to dump install packages. Command '%s' "
"returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
# Recovery rpmsys channel
- self._invoke_smart('channel --enable rpmsys')
+ self._invoke_smart(['channel', '--enable', 'rpmsys'])
return install_pkgs
'''
@@ -1355,17 +1349,16 @@ class RpmPM(PackageManager):
def dump_all_available_pkgs(self):
available_manifest = self.d.expand('${T}/saved/available_pkgs.txt')
available_pkgs = list()
- cmd = "%s %s query --output %s" % \
- (self.smart_cmd, self.smart_opt, available_manifest)
+ cmd = [self.smart_cmd] + self.smart_opt + ['query', '--output', available_manifest]
try:
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT)
with open(available_manifest, 'r') as manifest:
for pkg in manifest.read().split('\n'):
if '@' in pkg:
available_pkgs.append(pkg.strip())
except subprocess.CalledProcessError as e:
bb.note("Unable to list all available packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
self.fullpkglist = available_pkgs
@@ -1404,11 +1397,11 @@ class RpmPM(PackageManager):
bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
True)
- self._invoke_smart('config --set rpm-nolinktos=1')
- self._invoke_smart('config --set rpm-noparentdirs=1')
+ self._invoke_smart(['config', '--set', 'rpm-nolinktos=1'])
+ self._invoke_smart(['config', '--set', 'rpm-noparentdirs=1'])
for i in self.d.getVar('BAD_RECOMMENDATIONS', True).split():
- self._invoke_smart('flag --set ignore-recommends %s' % i)
- self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
+ self._invoke_smart(['flag', '--set', 'ignore-recommends', i])
+ self._invoke_smart(['channel', '--add', 'rpmsys', 'type=rpm-sys', '-y'])
'''
The rpm db lock files were produced after invoking rpm to query on
@@ -1425,12 +1418,12 @@ class RpmPM(PackageManager):
Returns a dictionary with the package info.
"""
def package_info(self, pkg):
- cmd = "%s %s info --urls %s" % (self.smart_cmd, self.smart_opt, pkg)
+ cmd = [self.smart_cmd] + self.smart_opt + ['info', '--urls', pkg]
try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Unable to list available packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
# Set default values to avoid UnboundLocalError
arch = ""
@@ -1550,18 +1543,18 @@ class OpkgDpkgPM(PackageManager):
os.chdir(tmp_dir)
try:
- cmd = "%s x %s" % (ar_cmd, pkg_path)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
- cmd = "%s xf data.tar.*" % tar_cmd
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ cmd = [ar_cmd, 'x', pkg_path]
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ cmd = [tar_cmd, 'xf', 'data.tar.*']
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.utils.remove(tmp_dir, recurse=True)
bb.fatal("Unable to extract %s package. Command '%s' "
- "returned %d:\n%s" % (pkg_path, cmd, e.returncode, e.output.decode("utf-8")))
+ "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
except OSError as e:
bb.utils.remove(tmp_dir, recurse=True)
bb.fatal("Unable to extract %s package. Command '%s' "
- "returned %d:\n%s at %s" % (pkg_path, cmd, e.errno, e.strerror, e.filename))
+ "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
--
2.10.2
^ permalink raw reply related
* [PATCH V4] Cleanup subprocess calls
From: Stephano Cetola @ 2016-11-15 17:17 UTC (permalink / raw)
To: openembedded-core
Changed since V3:
Corrected commit summary by changing primary item worked on from
subprocess to package_manager.
Stephano Cetola (1):
package_manager: remove strings and migrate to direct arrays
meta/lib/oe/package.py | 13 +--
meta/lib/oe/package_manager.py | 229 ++++++++++++++++++++---------------------
2 files changed, 118 insertions(+), 124 deletions(-)
--
2.10.2
^ permalink raw reply
* Re: [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests
From: Burton, Ross @ 2016-11-15 17:16 UTC (permalink / raw)
To: jose.perez.carranza; +Cc: OE-core
In-Reply-To: <1479227073-13133-1-git-send-email-jose.perez.carranza@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
On 15 November 2016 at 16:24, <jose.perez.carranza@linux.intel.com> wrote:
> +class TestPackagesFilterOutSystem(oeSelfTest):
>
As the tests don't need anything special that oeSelfTest provides, can they
remain as testcase.TestCase instances? There's a lot of complication from
oeSelfTest that isn't required.
Ross
[-- Attachment #2: Type: text/html, Size: 767 bytes --]
^ permalink raw reply
* [PATCH V2] recipetool: add postinst to .deb import
From: Stephano Cetola @ 2016-11-15 17:02 UTC (permalink / raw)
To: openembedded-core
Changed since V1:
Removed unused variable and cleaned up commit message.
Stephano Cetola (1):
recipetool: add postinst to .deb import
scripts/lib/recipetool/create.py | 35 ++++++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
--
2.10.2
^ permalink raw reply
* [PATCH V2] recipetool: add postinst to .deb import
From: Stephano Cetola @ 2016-11-15 17:03 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <20161115170300.75978-1-stephano.cetola@linux.intel.com>
The .deb import feature did not import postinst, postrm, preinst, or
prerm functions. This change checks to see if those files exist, and
if so, adds the appropriate functions.
[ YOCTO #10421 ]
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
---
scripts/lib/recipetool/create.py | 35 ++++++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index cb1c804..ab26531 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -234,7 +234,8 @@ class RecipeHandler(object):
if deps:
values['DEPENDS'] = ' '.join(deps)
- def genfunction(self, outlines, funcname, content, python=False, forcespace=False):
+ @staticmethod
+ def genfunction(outlines, funcname, content, python=False, forcespace=False):
if python:
prefix = 'python '
else:
@@ -460,8 +461,8 @@ def create_recipe(args):
if pkgfile:
if pkgfile.endswith(('.deb', '.ipk')):
- stdout, _ = bb.process.run('ar x %s control.tar.gz' % pkgfile, cwd=tmpfdir)
- stdout, _ = bb.process.run('tar xf control.tar.gz ./control', cwd=tmpfdir)
+ stdout, _ = bb.process.run('ar x %s' % pkgfile, cwd=tmpfdir)
+ stdout, _ = bb.process.run('tar xf control.tar.gz', cwd=tmpfdir)
values = convert_debian(tmpfdir)
extravalues.update(values)
elif pkgfile.endswith(('.rpm', '.srpm')):
@@ -722,6 +723,15 @@ def create_recipe(args):
if not bbclassextend:
lines_after.append('BBCLASSEXTEND = "native"')
+ postinst = ("postinst", extravalues.pop('postinst', None))
+ postrm = ("postrm", extravalues.pop('postrm', None))
+ preinst = ("preinst", extravalues.pop('preinst', None))
+ prerm = ("prerm", extravalues.pop('prerm', None))
+ funcs = [postinst, postrm, preinst, prerm]
+ for func in funcs:
+ if func[1]:
+ RecipeHandler.genfunction(lines_after, 'pkg_%s_${PN}' % func[0], func[1])
+
outlines = []
outlines.extend(lines_before)
if classes:
@@ -1058,6 +1068,25 @@ def convert_debian(debpath):
varname = value_map.get(key, None)
if varname:
values[varname] = value
+ postinst = os.path.join(debpath, 'postinst')
+ postrm = os.path.join(debpath, 'postrm')
+ preinst = os.path.join(debpath, 'preinst')
+ prerm = os.path.join(debpath, 'prerm')
+ sfiles = [postinst, postrm, preinst, prerm]
+ for sfile in sfiles:
+ if os.path.isfile(sfile):
+ logger.info("Converting %s file to recipe function..." %
+ os.path.basename(sfile).upper())
+ content = []
+ with open(sfile) as f:
+ for line in f:
+ if "#!/" in line:
+ continue
+ line = line.rstrip("\n")
+ if line.strip():
+ content.append(line)
+ if content:
+ values[os.path.basename(f.name)] = content
#if depends:
# values['DEPENDS'] = ' '.join(depends)
--
2.10.2
^ permalink raw reply related
* [PATCH 00/45] Morty: Patch set review
From: Armin Kuster @ 2016-11-15 16:29 UTC (permalink / raw)
To: akuster, openembedded-core
Sending cover leter only:
I have pulled together a set of patches which seem to be appropriate for Morty.
Please review to see if a commit is inappropriate or missing.
The following changes since commit 6c9f6b5f70ab3ee194b2c2c6f3bd462c994848fa:
bitbake: toaster: buildinfohelper Handle regex paths (2016-11-03 17:41:15 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib akuster/morty-next
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akuster/morty-next
Alexander Kanavin (8):
lttng-tools: do not install shared libraries in ptest package
gnome-desktop3: fix dependencies
webkitgtk: remove lib_package inherit as executables are now installed
in libexecdir
rt-tests: fix the recipe version to match upstream
epiphany: remove unnecessary libwnck3 dependency
libwnck3: remove the recipe
libarchive: update to 3.2.2
valgrind: update to 3.12.0
Andre McCurdy (1):
gdb: update 7.11+git1a982b689c -> 7.11.1
André Draszik (2):
boost: disable 'wave' in MIPS16e mode
bash_3.2.x: update recipe version to match what we're shipping
Armin Kuster (2):
tzcode-native: update to 2016h
tzdata: Update to 2016h
Chen Qi (2):
rpm: fix file location of rpm2cpio.real
systemd: CVE-2016-7795
Dengke Du (1):
subversion: fix "svnadmin create" fail on x86
Dmitry Rozhkov (1):
openssl: rehash actual mozilla certificates inside rootfs
George McCollister (1):
uboot-sign: fix do_concat_dtb for .img, .rom
Juro Bystricky (1):
build-appliance-image: Fix incorrect PATH
Kai Kang (2):
qemu: supplementary fix of CVE-2016-5403
qemu: fix CVE-2016-7423 and CVE-2016-7908
Khem Raj (1):
binutils-2.27: Fix linker segfaults when linking binary files
Lukasz Nowak (1):
connman: fix bad file descriptor initialisation
Markus Lehtonen (1):
python: fix python-tests rdepends
Mike Looijmans (1):
busybox/mdev.conf: Ignore eMMC RPMB and boot block devices
Olaf Mandel (1):
texi2html: Allow compiling out-of-source
Paul Eggleton (5):
classes/license: fix handling of symlinks pointed to in
LIC_FILES_CHKSUM
classes/populate_sdk_base: fix usage of & character in SDK_TITLE
classes/nativesdk: set SDK_OLDEST_KERNEL appropriately
oe-setup-builddir: fix TEMPLATECONF error message
classes/populate_sdk_ext: prevent invalid TEMPLATECONF entering eSDK
Robert P. J. Day (2):
testsdk.bbclass: Clean up comments, clarify image choices.
oe-pkgdata-util: Use standard verb form in help info.
Robert Yang (2):
oe/copy_buildsystem.py: dereference symlink
insane.bbclass:buildpaths: open() file with 'rb'
Ross Burton (4):
slang: add PREMIRRORS to handle upstream moving tarballs
slang: clean up options and dependencies
util-linux: add su.1 to update-alternatives
shadow: add nologin.8 to alternatives
Samuli Piippo (1):
package_manager.py: correctly remove all dependent packages
Yi Zhao (5):
tiff: Security fix CVE-2016-3945
tiff: Security fix CVE-2016-3990
tiff: Security fix CVE-2016-3991
tiff: Security fix CVE-2016-3623
tiff: Security fix CVE-2016-3622
meta/classes/insane.bbclass | 4 +-
meta/classes/license.bbclass | 2 +
meta/classes/nativesdk.bbclass | 2 +
meta/classes/populate_sdk_base.bbclass | 7 +-
meta/classes/populate_sdk_ext.bbclass | 6 +-
meta/classes/testsdk.bbclass | 14 +-
meta/classes/uboot-sign.bbclass | 4 +-
meta/conf/bitbake.conf | 5 +
meta/conf/machine-sdk/i586.conf | 1 +
meta/conf/machine-sdk/i686.conf | 1 +
meta/conf/machine-sdk/x86_64.conf | 1 +
meta/lib/oe/copy_buildsystem.py | 6 +-
meta/lib/oe/package_manager.py | 2 +-
...ts-Fix-bad-file-descriptor-initialisation.patch | 102 ++++++++++++++
meta/recipes-connectivity/connman/connman_1.33.bb | 1 +
.../openssl/openssl/openssl-c_rehash.sh | 20 ++-
meta/recipes-core/busybox/files/mdev.conf | 2 +
.../images/build-appliance-image_15.0.0.bb | 2 +-
.../systemd/systemd/CVE-2016-7795.patch | 69 ++++++++++
meta/recipes-core/systemd/systemd_230.bb | 1 +
meta/recipes-core/util-linux/util-linux.inc | 8 +-
meta/recipes-devtools/binutils/binutils-2.27.inc | 1 +
...lt-in-ARM-linker-when-trying-to-parse-a-b.patch | 31 +++++
meta/recipes-devtools/gdb/gdb-7.11.1.inc | 22 +++
meta/recipes-devtools/gdb/gdb-7.11.inc | 9 --
meta/recipes-devtools/gdb/gdb-common.inc | 24 ----
...nadian_7.11.bb => gdb-cross-canadian_7.11.1.bb} | 0
.../gdb/{gdb-cross_7.11.bb => gdb-cross_7.11.1.bb} | 0
.../gdb/{gdb_7.11.bb => gdb_7.11.1.bb} | 0
.../python/python-2.7-manifest.inc | 2 +-
...0001-virtio-zero-vq-inuse-in-virtio_reset.patch | 57 ++++++++
.../qemu/qemu/0002-fix-CVE-2016-7423.patch | 45 +++++++
.../qemu/qemu/0003-fix-CVE-2016-7908.patch | 62 +++++++++
meta/recipes-devtools/qemu/qemu_2.7.0.bb | 3 +
meta/recipes-devtools/rpm/rpm_5.4.16.bb | 2 +-
.../0001-fix-svnadmin-create-fail-on-x86.patch | 56 ++++++++
.../subversion/subversion_1.9.4.bb | 1 +
.../valgrind/valgrind/11_mips-link-tool.patch | 37 ------
.../valgrind/valgrind/gcc5-port.patch | 64 ---------
.../{valgrind_3.11.0.bb => valgrind_3.12.0.bb} | 6 +-
.../{bash-3.2.48 => bash-3.2.57}/build-tests.patch | 0
...ont-include-target-CFLAGS-in-host-LDFLAGS.patch | 0
.../mkbuiltins_have_stringize.patch | 0
.../bash/{bash-3.2.48 => bash-3.2.57}/run-ptest | 0
.../string-format.patch | 0
.../{bash-3.2.48 => bash-3.2.57}/test-output.patch | 0
meta/recipes-extended/bash/bash_3.2.48.bb | 47 -------
meta/recipes-extended/bash/bash_3.2.57.bb | 18 +++
.../{libarchive_3.2.1.bb => libarchive_3.2.2.bb} | 4 +-
meta/recipes-extended/shadow/shadow.inc | 3 +-
meta/recipes-extended/slang/slang/no-x.patch | 14 ++
meta/recipes-extended/slang/slang_2.3.0.bb | 16 ++-
.../files/0001-Allow-compiling-out-of-source.patch | 39 ++++++
meta/recipes-extended/texi2html/texi2html_5.0.bb | 1 +
...code-native_2016g.bb => tzcode-native_2016h.bb} | 8 +-
.../tzdata/{tzdata_2016g.bb => tzdata_2016h.bb} | 4 +-
meta/recipes-gnome/epiphany/epiphany_3.20.3.bb | 4 +-
.../gnome-desktop/gnome-desktop3_3.20.2.bb | 2 +-
meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb | 19 ---
meta/recipes-kernel/lttng/lttng-tools_git.bb | 3 +
.../libtiff/files/CVE-2016-3622.patch | 129 ++++++++++++++++++
.../libtiff/files/CVE-2016-3623.patch | 52 ++++++++
.../libtiff/files/CVE-2016-3945.patch | 118 +++++++++++++++++
.../libtiff/files/CVE-2016-3990.patch | 66 +++++++++
.../libtiff/files/CVE-2016-3991.patch | 147 +++++++++++++++++++++
meta/recipes-multimedia/libtiff/tiff_4.0.6.bb | 5 +
.../{hwlatdetect_2.0.bb => hwlatdetect_1.1.bb} | 0
meta/recipes-rt/rt-tests/rt-tests.inc | 5 +-
.../rt-tests/{rt-tests_2.0.bb => rt-tests_1.1.bb} | 0
meta/recipes-sato/webkit/webkitgtk_2.12.5.bb | 2 +-
meta/recipes-support/boost/boost.inc | 2 +
scripts/oe-pkgdata-util | 2 +-
scripts/oe-setup-builddir | 2 +-
73 files changed, 1138 insertions(+), 256 deletions(-)
create mode 100644 meta/recipes-connectivity/connman/connman/0003-stats-Fix-bad-file-descriptor-initialisation.patch
create mode 100644 meta/recipes-core/systemd/systemd/CVE-2016-7795.patch
create mode 100644 meta/recipes-devtools/binutils/binutils/0016-Fix-seg-fault-in-ARM-linker-when-trying-to-parse-a-b.patch
create mode 100644 meta/recipes-devtools/gdb/gdb-7.11.1.inc
delete mode 100644 meta/recipes-devtools/gdb/gdb-7.11.inc
rename meta/recipes-devtools/gdb/{gdb-cross-canadian_7.11.bb => gdb-cross-canadian_7.11.1.bb} (100%)
rename meta/recipes-devtools/gdb/{gdb-cross_7.11.bb => gdb-cross_7.11.1.bb} (100%)
rename meta/recipes-devtools/gdb/{gdb_7.11.bb => gdb_7.11.1.bb} (100%)
create mode 100644 meta/recipes-devtools/qemu/qemu/0001-virtio-zero-vq-inuse-in-virtio_reset.patch
create mode 100644 meta/recipes-devtools/qemu/qemu/0002-fix-CVE-2016-7423.patch
create mode 100644 meta/recipes-devtools/qemu/qemu/0003-fix-CVE-2016-7908.patch
create mode 100644 meta/recipes-devtools/subversion/subversion/0001-fix-svnadmin-create-fail-on-x86.patch
delete mode 100644 meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch
delete mode 100644 meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch
rename meta/recipes-devtools/valgrind/{valgrind_3.11.0.bb => valgrind_3.12.0.bb} (95%)
rename meta/recipes-extended/bash/{bash-3.2.48 => bash-3.2.57}/build-tests.patch (100%)
rename meta/recipes-extended/bash/{bash-3.2.48 => bash-3.2.57}/dont-include-target-CFLAGS-in-host-LDFLAGS.patch (100%)
rename meta/recipes-extended/bash/{bash-3.2.48 => bash-3.2.57}/mkbuiltins_have_stringize.patch (100%)
rename meta/recipes-extended/bash/{bash-3.2.48 => bash-3.2.57}/run-ptest (100%)
rename meta/recipes-extended/bash/{bash-3.2.48 => bash-3.2.57}/string-format.patch (100%)
rename meta/recipes-extended/bash/{bash-3.2.48 => bash-3.2.57}/test-output.patch (100%)
delete mode 100644 meta/recipes-extended/bash/bash_3.2.48.bb
create mode 100644 meta/recipes-extended/bash/bash_3.2.57.bb
rename meta/recipes-extended/libarchive/{libarchive_3.2.1.bb => libarchive_3.2.2.bb} (94%)
create mode 100644 meta/recipes-extended/slang/slang/no-x.patch
create mode 100644 meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch
rename meta/recipes-extended/tzcode/{tzcode-native_2016g.bb => tzcode-native_2016h.bb} (69%)
rename meta/recipes-extended/tzdata/{tzdata_2016g.bb => tzdata_2016h.bb} (98%)
delete mode 100644 meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb
create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3622.patch
create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3623.patch
create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3945.patch
create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3990.patch
create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3991.patch
rename meta/recipes-rt/rt-tests/{hwlatdetect_2.0.bb => hwlatdetect_1.1.bb} (100%)
rename meta/recipes-rt/rt-tests/{rt-tests_2.0.bb => rt-tests_1.1.bb} (100%)
--
2.3.5
^ permalink raw reply
* [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests
From: jose.perez.carranza @ 2016-11-15 16:24 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <B6EBB6A4080>
From: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Currently the unittests for scripts on meta/lib/oe/tests are not being
executed by any suite hence the best option is migrate them to
meta/lib/oeqa/selftest/oelib-tests to be executed along with the selftest suite.
[YOCTO #7376]
Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
---
meta/lib/oe/tests/__init__.py | 0
meta/lib/oe/tests/test_elf.py | 21 ------
meta/lib/oe/tests/test_license.py | 68 -------------------
meta/lib/oe/tests/test_path.py | 89 -------------------------
meta/lib/oe/tests/test_types.py | 62 ------------------
meta/lib/oe/tests/test_utils.py | 51 ---------------
meta/lib/oeqa/selftest/oelib-tests/__init__.py | 0
meta/lib/oeqa/selftest/oelib-tests/elf.py | 22 +++++++
meta/lib/oeqa/selftest/oelib-tests/license.py | 69 ++++++++++++++++++++
meta/lib/oeqa/selftest/oelib-tests/path.py | 90 ++++++++++++++++++++++++++
meta/lib/oeqa/selftest/oelib-tests/types.py | 61 +++++++++++++++++
meta/lib/oeqa/selftest/oelib-tests/utils.py | 52 +++++++++++++++
12 files changed, 294 insertions(+), 291 deletions(-)
delete mode 100644 meta/lib/oe/tests/__init__.py
delete mode 100644 meta/lib/oe/tests/test_elf.py
delete mode 100644 meta/lib/oe/tests/test_license.py
delete mode 100644 meta/lib/oe/tests/test_path.py
delete mode 100644 meta/lib/oe/tests/test_types.py
delete mode 100644 meta/lib/oe/tests/test_utils.py
create mode 100644 meta/lib/oeqa/selftest/oelib-tests/__init__.py
create mode 100644 meta/lib/oeqa/selftest/oelib-tests/elf.py
create mode 100644 meta/lib/oeqa/selftest/oelib-tests/license.py
create mode 100644 meta/lib/oeqa/selftest/oelib-tests/path.py
create mode 100644 meta/lib/oeqa/selftest/oelib-tests/types.py
create mode 100644 meta/lib/oeqa/selftest/oelib-tests/utils.py
diff --git a/meta/lib/oe/tests/__init__.py b/meta/lib/oe/tests/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/meta/lib/oe/tests/test_elf.py b/meta/lib/oe/tests/test_elf.py
deleted file mode 100644
index 1f59037..0000000
--- a/meta/lib/oe/tests/test_elf.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import unittest
-import oe.qa
-
-class TestElf(unittest.TestCase):
- def test_machine_name(self):
- """
- Test elf_machine_to_string()
- """
- self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
- self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
- self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
- self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
- self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
- self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
- self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
- self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
- self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
-
- self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)")
- self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
- self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")
diff --git a/meta/lib/oe/tests/test_license.py b/meta/lib/oe/tests/test_license.py
deleted file mode 100644
index c388886..0000000
--- a/meta/lib/oe/tests/test_license.py
+++ /dev/null
@@ -1,68 +0,0 @@
-import unittest
-import oe.license
-
-class SeenVisitor(oe.license.LicenseVisitor):
- def __init__(self):
- self.seen = []
- oe.license.LicenseVisitor.__init__(self)
-
- def visit_Str(self, node):
- self.seen.append(node.s)
-
-class TestSingleLicense(unittest.TestCase):
- licenses = [
- "GPLv2",
- "LGPL-2.0",
- "Artistic",
- "MIT",
- "GPLv3+",
- "FOO_BAR",
- ]
- invalid_licenses = ["GPL/BSD"]
-
- @staticmethod
- def parse(licensestr):
- visitor = SeenVisitor()
- visitor.visit_string(licensestr)
- return visitor.seen
-
- def test_single_licenses(self):
- for license in self.licenses:
- licenses = self.parse(license)
- self.assertListEqual(licenses, [license])
-
- def test_invalid_licenses(self):
- for license in self.invalid_licenses:
- with self.assertRaises(oe.license.InvalidLicense) as cm:
- self.parse(license)
- self.assertEqual(cm.exception.license, license)
-
-class TestSimpleCombinations(unittest.TestCase):
- tests = {
- "FOO&BAR": ["FOO", "BAR"],
- "BAZ & MOO": ["BAZ", "MOO"],
- "ALPHA|BETA": ["ALPHA"],
- "BAZ&MOO|FOO": ["FOO"],
- "FOO&BAR|BAZ": ["FOO", "BAR"],
- }
- preferred = ["ALPHA", "FOO", "BAR"]
-
- def test_tests(self):
- def choose(a, b):
- if all(lic in self.preferred for lic in b):
- return b
- else:
- return a
-
- for license, expected in self.tests.items():
- licenses = oe.license.flattened_licenses(license, choose)
- self.assertListEqual(licenses, expected)
-
-class TestComplexCombinations(TestSimpleCombinations):
- tests = {
- "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"],
- "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"],
- "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"],
- "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-clause", "MIT"],
- }
- preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"]
diff --git a/meta/lib/oe/tests/test_path.py b/meta/lib/oe/tests/test_path.py
deleted file mode 100644
index 44d0681..0000000
--- a/meta/lib/oe/tests/test_path.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import unittest
-import oe, oe.path
-import tempfile
-import os
-import errno
-import shutil
-
-class TestRealPath(unittest.TestCase):
- DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm" ]
- FILES = [ "etc/passwd", "b/file" ]
- LINKS = [
- ( "bin", "/usr/bin", "/usr/bin" ),
- ( "binX", "usr/binX", "/usr/binX" ),
- ( "c", "broken", "/broken" ),
- ( "etc/passwd-1", "passwd", "/etc/passwd" ),
- ( "etc/passwd-2", "passwd-1", "/etc/passwd" ),
- ( "etc/passwd-3", "/etc/passwd-1", "/etc/passwd" ),
- ( "etc/shadow-1", "/etc/shadow", "/etc/shadow" ),
- ( "etc/shadow-2", "/etc/shadow-1", "/etc/shadow" ),
- ( "prog-A", "bin/prog-A", "/usr/bin/prog-A" ),
- ( "prog-B", "/bin/prog-B", "/usr/bin/prog-B" ),
- ( "usr/bin/prog-C", "../../sbin/prog-C", "/sbin/prog-C" ),
- ( "usr/bin/prog-D", "/sbin/prog-D", "/sbin/prog-D" ),
- ( "usr/binX/prog-E", "../sbin/prog-E", None ),
- ( "usr/bin/prog-F", "../../../sbin/prog-F", "/sbin/prog-F" ),
- ( "loop", "a/loop", None ),
- ( "a/loop", "../loop", None ),
- ( "b/test", "file/foo", "/b/file/foo" ),
- ]
-
- LINKS_PHYS = [
- ( "./", "/", "" ),
- ( "binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E" ),
- ]
-
- EXCEPTIONS = [
- ( "loop", errno.ELOOP ),
- ( "b/test", errno.ENOENT ),
- ]
-
- def __del__(self):
- try:
- #os.system("tree -F %s" % self.tmpdir)
- shutil.rmtree(self.tmpdir)
- except:
- pass
-
- def setUp(self):
- self.tmpdir = tempfile.mkdtemp(prefix = "oe-test_path")
- self.root = os.path.join(self.tmpdir, "R")
-
- os.mkdir(os.path.join(self.tmpdir, "_real"))
- os.symlink("_real", self.root)
-
- for d in self.DIRS:
- os.mkdir(os.path.join(self.root, d))
- for f in self.FILES:
- open(os.path.join(self.root, f), "w")
- for l in self.LINKS:
- os.symlink(l[1], os.path.join(self.root, l[0]))
-
- def __realpath(self, file, use_physdir, assume_dir = True):
- return oe.path.realpath(os.path.join(self.root, file), self.root,
- use_physdir, assume_dir = assume_dir)
-
- def test_norm(self):
- for l in self.LINKS:
- if l[2] == None:
- continue
-
- target_p = self.__realpath(l[0], True)
- target_l = self.__realpath(l[0], False)
-
- if l[2] != False:
- self.assertEqual(target_p, target_l)
- self.assertEqual(l[2], target_p[len(self.root):])
-
- def test_phys(self):
- for l in self.LINKS_PHYS:
- target_p = self.__realpath(l[0], True)
- target_l = self.__realpath(l[0], False)
-
- self.assertEqual(l[1], target_p[len(self.root):])
- self.assertEqual(l[2], target_l[len(self.root):])
-
- def test_loop(self):
- for e in self.EXCEPTIONS:
- self.assertRaisesRegex(OSError, r'\[Errno %u\]' % e[1],
- self.__realpath, e[0], False, False)
diff --git a/meta/lib/oe/tests/test_types.py b/meta/lib/oe/tests/test_types.py
deleted file mode 100644
index 367cc30..0000000
--- a/meta/lib/oe/tests/test_types.py
+++ /dev/null
@@ -1,62 +0,0 @@
-import unittest
-from oe.maketype import create, factory
-
-class TestTypes(unittest.TestCase):
- def assertIsInstance(self, obj, cls):
- return self.assertTrue(isinstance(obj, cls))
-
- def assertIsNot(self, obj, other):
- return self.assertFalse(obj is other)
-
- def assertFactoryCreated(self, value, type, **flags):
- cls = factory(type)
- self.assertIsNot(cls, None)
- self.assertIsInstance(create(value, type, **flags), cls)
-
-class TestBooleanType(TestTypes):
- def test_invalid(self):
- self.assertRaises(ValueError, create, '', 'boolean')
- self.assertRaises(ValueError, create, 'foo', 'boolean')
- self.assertRaises(TypeError, create, object(), 'boolean')
-
- def test_true(self):
- self.assertTrue(create('y', 'boolean'))
- self.assertTrue(create('yes', 'boolean'))
- self.assertTrue(create('1', 'boolean'))
- self.assertTrue(create('t', 'boolean'))
- self.assertTrue(create('true', 'boolean'))
- self.assertTrue(create('TRUE', 'boolean'))
- self.assertTrue(create('truE', 'boolean'))
-
- def test_false(self):
- self.assertFalse(create('n', 'boolean'))
- self.assertFalse(create('no', 'boolean'))
- self.assertFalse(create('0', 'boolean'))
- self.assertFalse(create('f', 'boolean'))
- self.assertFalse(create('false', 'boolean'))
- self.assertFalse(create('FALSE', 'boolean'))
- self.assertFalse(create('faLse', 'boolean'))
-
- def test_bool_equality(self):
- self.assertEqual(create('n', 'boolean'), False)
- self.assertNotEqual(create('n', 'boolean'), True)
- self.assertEqual(create('y', 'boolean'), True)
- self.assertNotEqual(create('y', 'boolean'), False)
-
-class TestList(TestTypes):
- def assertListEqual(self, value, valid, sep=None):
- obj = create(value, 'list', separator=sep)
- self.assertEqual(obj, valid)
- if sep is not None:
- self.assertEqual(obj.separator, sep)
- self.assertEqual(str(obj), obj.separator.join(obj))
-
- def test_list_nosep(self):
- testlist = ['alpha', 'beta', 'theta']
- self.assertListEqual('alpha beta theta', testlist)
- self.assertListEqual('alpha beta\ttheta', testlist)
- self.assertListEqual('alpha', ['alpha'])
-
- def test_list_usersep(self):
- self.assertListEqual('foo:bar', ['foo', 'bar'], ':')
- self.assertListEqual('foo:bar:baz', ['foo', 'bar', 'baz'], ':')
diff --git a/meta/lib/oe/tests/test_utils.py b/meta/lib/oe/tests/test_utils.py
deleted file mode 100644
index 5d9ac52..0000000
--- a/meta/lib/oe/tests/test_utils.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import unittest
-from oe.utils import packages_filter_out_system
-
-class TestPackagesFilterOutSystem(unittest.TestCase):
- def test_filter(self):
- """
- Test that oe.utils.packages_filter_out_system works.
- """
- try:
- import bb
- except ImportError:
- self.skipTest("Cannot import bb")
-
- d = bb.data_smart.DataSmart()
- d.setVar("PN", "foo")
-
- d.setVar("PACKAGES", "foo foo-doc foo-dev")
- pkgs = packages_filter_out_system(d)
- self.assertEqual(pkgs, [])
-
- d.setVar("PACKAGES", "foo foo-doc foo-data foo-dev")
- pkgs = packages_filter_out_system(d)
- self.assertEqual(pkgs, ["foo-data"])
-
- d.setVar("PACKAGES", "foo foo-locale-en-gb")
- pkgs = packages_filter_out_system(d)
- self.assertEqual(pkgs, [])
-
- d.setVar("PACKAGES", "foo foo-data foo-locale-en-gb")
- pkgs = packages_filter_out_system(d)
- self.assertEqual(pkgs, ["foo-data"])
-
-
-class TestTrimVersion(unittest.TestCase):
- def test_version_exception(self):
- with self.assertRaises(TypeError):
- trim_version(None, 2)
- with self.assertRaises(TypeError):
- trim_version((1, 2, 3), 2)
-
- def test_num_exception(self):
- with self.assertRaises(ValueError):
- trim_version("1.2.3", 0)
- with self.assertRaises(ValueError):
- trim_version("1.2.3", -1)
-
- def test_valid(self):
- self.assertEqual(trim_version("1.2.3", 1), "1")
- self.assertEqual(trim_version("1.2.3", 2), "1.2")
- self.assertEqual(trim_version("1.2.3", 3), "1.2.3")
- self.assertEqual(trim_version("1.2.3", 4), "1.2.3")
diff --git a/meta/lib/oeqa/selftest/oelib-tests/__init__.py b/meta/lib/oeqa/selftest/oelib-tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/meta/lib/oeqa/selftest/oelib-tests/elf.py b/meta/lib/oeqa/selftest/oelib-tests/elf.py
new file mode 100644
index 0000000..582d772
--- /dev/null
+++ b/meta/lib/oeqa/selftest/oelib-tests/elf.py
@@ -0,0 +1,22 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.decorators import testcase
+import oe.qa
+
+class TestElf(oeSelfTest):
+ def test_machine_name(self):
+ """
+ Test elf_machine_to_string()
+ """
+ self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
+ self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
+
+ self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)")
+ self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
+ self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")
diff --git a/meta/lib/oeqa/selftest/oelib-tests/license.py b/meta/lib/oeqa/selftest/oelib-tests/license.py
new file mode 100644
index 0000000..90bdf51
--- /dev/null
+++ b/meta/lib/oeqa/selftest/oelib-tests/license.py
@@ -0,0 +1,69 @@
+import oe.license
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.decorators import testcase
+
+class SeenVisitor(oe.license.LicenseVisitor):
+ def __init__(self):
+ self.seen = []
+ oe.license.LicenseVisitor.__init__(self)
+
+ def visit_Str(self, node):
+ self.seen.append(node.s)
+
+class TestSingleLicense(oeSelfTest):
+ licenses = [
+ "GPLv2",
+ "LGPL-2.0",
+ "Artistic",
+ "MIT",
+ "GPLv3+",
+ "FOO_BAR",
+ ]
+ invalid_licenses = ["GPL/BSD"]
+
+ @staticmethod
+ def parse(licensestr):
+ visitor = SeenVisitor()
+ visitor.visit_string(licensestr)
+ return visitor.seen
+
+ def test_single_licenses(self):
+ for license in self.licenses:
+ licenses = self.parse(license)
+ self.assertListEqual(licenses, [license])
+
+ def test_invalid_licenses(self):
+ for license in self.invalid_licenses:
+ with self.assertRaises(oe.license.InvalidLicense) as cm:
+ self.parse(license)
+ self.assertEqual(cm.exception.license, license)
+
+class TestSimpleCombinations(oeSelfTest):
+ tests = {
+ "FOO&BAR": ["FOO", "BAR"],
+ "BAZ & MOO": ["BAZ", "MOO"],
+ "ALPHA|BETA": ["ALPHA"],
+ "BAZ&MOO|FOO": ["FOO"],
+ "FOO&BAR|BAZ": ["FOO", "BAR"],
+ }
+ preferred = ["ALPHA", "FOO", "BAR"]
+
+ def test_tests(self):
+ def choose(a, b):
+ if all(lic in self.preferred for lic in b):
+ return b
+ else:
+ return a
+
+ for license, expected in self.tests.items():
+ licenses = oe.license.flattened_licenses(license, choose)
+ self.assertListEqual(licenses, expected)
+
+class TestComplexCombinations(TestSimpleCombinations):
+ tests = {
+ "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"],
+ "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"],
+ "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"],
+ "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-clause", "MIT"],
+ }
+ preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"]
diff --git a/meta/lib/oeqa/selftest/oelib-tests/path.py b/meta/lib/oeqa/selftest/oelib-tests/path.py
new file mode 100644
index 0000000..09b56cb
--- /dev/null
+++ b/meta/lib/oeqa/selftest/oelib-tests/path.py
@@ -0,0 +1,90 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.decorators import testcase
+import oe, oe.path
+import tempfile
+import os
+import errno
+import shutil
+
+class TestRealPath(oeSelfTest):
+ DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm" ]
+ FILES = [ "etc/passwd", "b/file" ]
+ LINKS = [
+ ( "bin", "/usr/bin", "/usr/bin" ),
+ ( "binX", "usr/binX", "/usr/binX" ),
+ ( "c", "broken", "/broken" ),
+ ( "etc/passwd-1", "passwd", "/etc/passwd" ),
+ ( "etc/passwd-2", "passwd-1", "/etc/passwd" ),
+ ( "etc/passwd-3", "/etc/passwd-1", "/etc/passwd" ),
+ ( "etc/shadow-1", "/etc/shadow", "/etc/shadow" ),
+ ( "etc/shadow-2", "/etc/shadow-1", "/etc/shadow" ),
+ ( "prog-A", "bin/prog-A", "/usr/bin/prog-A" ),
+ ( "prog-B", "/bin/prog-B", "/usr/bin/prog-B" ),
+ ( "usr/bin/prog-C", "../../sbin/prog-C", "/sbin/prog-C" ),
+ ( "usr/bin/prog-D", "/sbin/prog-D", "/sbin/prog-D" ),
+ ( "usr/binX/prog-E", "../sbin/prog-E", None ),
+ ( "usr/bin/prog-F", "../../../sbin/prog-F", "/sbin/prog-F" ),
+ ( "loop", "a/loop", None ),
+ ( "a/loop", "../loop", None ),
+ ( "b/test", "file/foo", "/b/file/foo" ),
+ ]
+
+ LINKS_PHYS = [
+ ( "./", "/", "" ),
+ ( "binX/prog-E", "/usr/sbin/prog-E", "/sbin/prog-E" ),
+ ]
+
+ EXCEPTIONS = [
+ ( "loop", errno.ELOOP ),
+ ( "b/test", errno.ENOENT ),
+ ]
+
+ def __del__(self):
+ try:
+ #os.system("tree -F %s" % self.tmpdir)
+ shutil.rmtree(self.tmpdir)
+ except:
+ pass
+
+ def setUp(self):
+ self.tmpdir = tempfile.mkdtemp(prefix = "oe-test_path")
+ self.root = os.path.join(self.tmpdir, "R")
+
+ os.mkdir(os.path.join(self.tmpdir, "_real"))
+ os.symlink("_real", self.root)
+
+ for d in self.DIRS:
+ os.mkdir(os.path.join(self.root, d))
+ for f in self.FILES:
+ open(os.path.join(self.root, f), "w")
+ for l in self.LINKS:
+ os.symlink(l[1], os.path.join(self.root, l[0]))
+
+ def __realpath(self, file, use_physdir, assume_dir = True):
+ return oe.path.realpath(os.path.join(self.root, file), self.root,
+ use_physdir, assume_dir = assume_dir)
+
+ def test_norm(self):
+ for l in self.LINKS:
+ if l[2] == None:
+ continue
+
+ target_p = self.__realpath(l[0], True)
+ target_l = self.__realpath(l[0], False)
+
+ if l[2] != False:
+ self.assertEqual(target_p, target_l)
+ self.assertEqual(l[2], target_p[len(self.root):])
+
+ def test_phys(self):
+ for l in self.LINKS_PHYS:
+ target_p = self.__realpath(l[0], True)
+ target_l = self.__realpath(l[0], False)
+
+ self.assertEqual(l[1], target_p[len(self.root):])
+ self.assertEqual(l[2], target_l[len(self.root):])
+
+ def test_loop(self):
+ for e in self.EXCEPTIONS:
+ self.assertRaisesRegex(OSError, r'\[Errno %u\]' % e[1],
+ self.__realpath, e[0], False, False)
diff --git a/meta/lib/oeqa/selftest/oelib-tests/types.py b/meta/lib/oeqa/selftest/oelib-tests/types.py
new file mode 100644
index 0000000..2613da9
--- /dev/null
+++ b/meta/lib/oeqa/selftest/oelib-tests/types.py
@@ -0,0 +1,61 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.decorators import testcase
+from oe.maketype import create, factory
+
+class TestTypes(oeSelfTest):
+ def assertIsInstance(self, obj, cls):
+ return self.assertTrue(isinstance(obj, cls))
+
+ def assertIsNot(self, obj, other):
+ return self.assertFalse(obj is other)
+
+ def assertFactoryCreated(self, value, type, **flags):
+ cls = factory(type)
+ self.assertIsNot(cls, None)
+ self.assertIsInstance(create(value, type, **flags), cls)
+
+ def assertListIsEqual(self, value, valid, sep=None):
+ obj = create(value, 'list', separator=sep)
+ self.assertListEqual(obj, valid)
+
+class TestBooleanType(TestTypes):
+ def test_invalid(self):
+ self.assertRaises(ValueError, create, '', 'boolean')
+ self.assertRaises(ValueError, create, 'foo', 'boolean')
+ self.assertRaises(TypeError, create, object(), 'boolean')
+
+ def test_true(self):
+ self.assertTrue(create('y', 'boolean'))
+ self.assertTrue(create('yes', 'boolean'))
+ self.assertTrue(create('1', 'boolean'))
+ self.assertTrue(create('t', 'boolean'))
+ self.assertTrue(create('true', 'boolean'))
+ self.assertTrue(create('TRUE', 'boolean'))
+ self.assertTrue(create('truE', 'boolean'))
+
+ def test_false(self):
+ self.assertFalse(create('n', 'boolean'))
+ self.assertFalse(create('no', 'boolean'))
+ self.assertFalse(create('0', 'boolean'))
+ self.assertFalse(create('f', 'boolean'))
+ self.assertFalse(create('false', 'boolean'))
+ self.assertFalse(create('FALSE', 'boolean'))
+ self.assertFalse(create('faLse', 'boolean'))
+
+ def test_bool_equality(self):
+ self.assertEqual(create('n', 'boolean'), False)
+ self.assertNotEqual(create('n', 'boolean'), True)
+ self.assertEqual(create('y', 'boolean'), True)
+ self.assertNotEqual(create('y', 'boolean'), False)
+
+class TestList(TestTypes):
+
+ def test_list_nosep(self):
+ testlist = ['alpha', 'beta', 'theta']
+ self.assertListIsEqual('alpha beta theta', testlist)
+ self.assertListIsEqual('alpha beta\ttheta', testlist)
+ self.assertListIsEqual('alpha', ['alpha'])
+
+ def test_list_usersep(self):
+ self.assertListIsEqual('foo:bar', ['foo', 'bar'], ':')
+ self.assertListIsEqual('foo:bar:baz', ['foo', 'bar', 'baz'], ':')
diff --git a/meta/lib/oeqa/selftest/oelib-tests/utils.py b/meta/lib/oeqa/selftest/oelib-tests/utils.py
new file mode 100644
index 0000000..25c60e1
--- /dev/null
+++ b/meta/lib/oeqa/selftest/oelib-tests/utils.py
@@ -0,0 +1,52 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.decorators import testcase
+from oe.utils import packages_filter_out_system, trim_version
+
+class TestPackagesFilterOutSystem(oeSelfTest):
+ def test_filter(self):
+ """
+ Test that oe.utils.packages_filter_out_system works.
+ """
+ try:
+ import bb
+ except ImportError:
+ self.skipTest("Cannot import bb")
+
+ d = bb.data_smart.DataSmart()
+ d.setVar("PN", "foo")
+
+ d.setVar("PACKAGES", "foo foo-doc foo-dev")
+ pkgs = packages_filter_out_system(d)
+ self.assertEqual(pkgs, [])
+
+ d.setVar("PACKAGES", "foo foo-doc foo-data foo-dev")
+ pkgs = packages_filter_out_system(d)
+ self.assertEqual(pkgs, ["foo-data"])
+
+ d.setVar("PACKAGES", "foo foo-locale-en-gb")
+ pkgs = packages_filter_out_system(d)
+ self.assertEqual(pkgs, [])
+
+ d.setVar("PACKAGES", "foo foo-data foo-locale-en-gb")
+ pkgs = packages_filter_out_system(d)
+ self.assertEqual(pkgs, ["foo-data"])
+
+
+class TestTrimVersion(oeSelfTest):
+ def test_version_exception(self):
+ with self.assertRaises(TypeError):
+ trim_version(None, 2)
+ with self.assertRaises(TypeError):
+ trim_version((1, 2, 3), 2)
+
+ def test_num_exception(self):
+ with self.assertRaises(ValueError):
+ trim_version("1.2.3", 0)
+ with self.assertRaises(ValueError):
+ trim_version("1.2.3", -1)
+
+ def test_valid(self):
+ self.assertEqual(trim_version("1.2.3", 1), "1")
+ self.assertEqual(trim_version("1.2.3", 2), "1.2")
+ self.assertEqual(trim_version("1.2.3", 3), "1.2.3")
+ self.assertEqual(trim_version("1.2.3", 4), "1.2.3")
--
2.1.4
^ permalink raw reply related
* Re: [PATCH] added recipe for libdbus-c++
From: thilo.cestonaro @ 2016-11-15 15:27 UTC (permalink / raw)
To: ross.burton@intel.com; +Cc: openembedded-core@lists.openembedded.org
In-Reply-To: <CAJTo0LY0_hUiFhYJKA3B+qouLoBhXd4W_ab=3T-gYDMPFUj7tw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
Am Dienstag, den 15.11.2016, 14:23 +0000 schrieb Burton, Ross:
>
> On 15 November 2016 at 13:46, Thilo Cestonaro <thilo.cestonaro@ts.fujitsu.com> wrote:
> > Signed-off-by: Thilo Cestonaro <thilo.cestonaro@ts.fujitsu.com>
> >
>
> As Alex said, please submit this to meta-oe as there's no strong rationale to keep it in oe-core, especially considering it's abandoned.
>
> The remove_CXX_FOR_BUILD-stuff patch can be trimmed to just modify configure.ac and tools/Makefile.am, the other files will be regenerated at do_configure and patching them can cause conflicts if
> upstream ever makes a new release.
>
> Also please explain clearly why that has to be removed in the patch header because usually we need to patch *in* the _FOR_BUILD macros: I was curious and ended up looking at the build to understand
> why. AFAICT it's because upstream if cross-compiling it refuses to build target tools and will only build host tools so the test suite can run, but disabling the tests and patching out CXX_FOR_BUILD
> we can build target tools. The downside is that we have no test suite, which is useful (see the ptest class).
Perhaps I will add ptest in another patch later. Will need to look into it.
Thanks for your comments!
>
> Thank you for being the first person in a long time to actually submit the recipe to the community!
>
> Ross
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3847 bytes --]
^ permalink raw reply
* [PATCH v2] libdbus-c++: added recipe for it
From: Thilo Cestonaro @ 2016-11-15 15:21 UTC (permalink / raw)
To: openembedded-core; +Cc: Thilo Cestonaro
From: Thilo Cestonaro <thilo@cestona.ro>
to fix the build, two patches where needed.
One which just adds an include of unistd.h, as the functions pipe, write and
close defined by this include, weren't defined.
The other patch enables the build to build the tools of libdbus-c++ for the
target, which, without the patch, will always be build for the host, even when
cross compiling.
Signed-off-by: Thilo Cestonaro <thilo@cestona.ro>
---
.../fix-missing-unistd.h-include.patch | 12 +++++++++++
.../remove-CXX_FOR_BUILD-stuff.patch | 24 ++++++++++++++++++++++
meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb | 24 ++++++++++++++++++++++
3 files changed, 60 insertions(+)
create mode 100644 meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
create mode 100644 meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
create mode 100644 meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb
changelog:
v2:
Stripped down the remove-CXX_FOR_BUILD-stuff patch, as Ross said, to only
include configure.ac and the tools/Makefile.am
Added description about the patches in the commit.
Patch goes into meta-oe of meta-openembedded.
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
new file mode 100644
index 0000000..5cb8096
--- /dev/null
+++ b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
@@ -0,0 +1,12 @@
+diff --git a/include/dbus-c++/eventloop-integration.h b/include/dbus-c++/eventloop-integration.h
+index 1b0302e..3e44304 100644
+--- a/include/dbus-c++/eventloop-integration.h
++++ b/include/dbus-c++/eventloop-integration.h
+@@ -26,6 +26,7 @@
+ #define __DBUSXX_EVENTLOOP_INTEGRATION_H
+
+ #include <errno.h>
++#include <unistd.h>
+ #include "api.h"
+ #include "dispatcher.h"
+ #include "util.h"
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
new file mode 100644
index 0000000..906470a
--- /dev/null
+++ b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
@@ -0,0 +1,24 @@
+diff -Naur libdbus-c++-0.9.0.ori/configure.ac libdbus-c++-0.9.0/configure.ac
+--- libdbus-c++-0.9.0.ori/configure.ac 2016-11-15 14:25:36.085882774 +0100
++++ libdbus-c++-0.9.0/configure.ac 2016-11-15 14:27:08.814568717 +0100
+@@ -64,9 +64,6 @@
+ AC_PROG_CC
+ AC_PROG_CXX
+
+-CXX_FOR_BUILD=${CXX_FOR_BUILD-${CXX}}
+-AC_SUBST(CXX_FOR_BUILD)
+-
+ AM_PROG_LIBTOOL
+
+ PKG_PROG_PKG_CONFIG
+diff -Naur libdbus-c++-0.9.0.ori/tools/Makefile.am libdbus-c++-0.9.0/tools/Makefile.am
+--- libdbus-c++-0.9.0.ori/tools/Makefile.am 2016-11-15 14:25:36.089882803 +0100
++++ libdbus-c++-0.9.0/tools/Makefile.am 2016-11-15 14:26:19.454203583 +0100
+@@ -1,7 +1,5 @@
+ # hacky, but ...
+
+-CXX = $(CXX_FOR_BUILD)
+-
+ AM_CPPFLAGS = \
+ $(dbus_CFLAGS) \
+ $(xml_CFLAGS) \
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb b/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb
new file mode 100644
index 0000000..7edaffc
--- /dev/null
+++ b/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb
@@ -0,0 +1,24 @@
+SUMMARY = "DBus-C++ Library"
+DESCRIPTION = "DBus-c++ attempts to provide a C++ API for D-BUS. The library has a glib and an Ecore mainloop integration. It also offers an optional own main loop."
+HOMEPAGE = "http://dbus-cplusplus.sourceforge.net"
+SECTION = "base"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+DEPENDS = "dbus glib-2.0 libpcre"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/dbus-cplusplus/dbus-c++/${PV}/${BPN}-${PV}.tar.gz \
+ file://fix-missing-unistd.h-include.patch \
+ file://remove-CXX_FOR_BUILD-stuff.patch"
+SRC_URI[md5sum] = "e752116f523fa88ef041e63d3dee4de2"
+SRC_URI[sha256sum] = "bc11ac297b3cb010be904c72789695543ee3fdf3d75cdc8225fd371385af4e61"
+
+EXTRA_OECONF = "--disable-ecore --disable-examples --disable-tests"
+
+inherit autotools pkgconfig
+
+PACKAGES += "${PN}-tools"
+
+FILES_${PN} = "${libdir}"
+FILES_${PN}-tools = "${bindir}"
+
+BBCLASSEXTEND = "native"
--
2.10.2
^ permalink raw reply related
* Re: [PATCH V3] subprocess: remove strings and migrate to direct arrays
From: Christopher Larson @ 2016-11-15 15:16 UTC (permalink / raw)
To: Stephano Cetola; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <20161115142842.75276-2-stephano.cetola@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 607 bytes --]
On Tue, Nov 15, 2016 at 7:28 AM, Stephano Cetola <
stephano.cetola@linux.intel.com> wrote:
> When using subprocess call and check_output, it is better to use arrays
> rather than strings when possible to avoid whitespace and quoting
> problems.
>
> [ YOCTO #9342 ]
>
> Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
>
The commi message summary isn’t prefixed the way the OE commit message
guidelines indicate.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 1116 bytes --]
^ permalink raw reply
* Re: [PATCH] package.bbclass: allow using EXCLUDE_FROM_SHLIBS for subpackages
From: Andrii Bordunov @ 2016-11-15 15:05 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <2f612347-5351-fc20-956e-1cf84a5189ff@cisco.com>
Ping-2. Guys? Anything?
Thank you,
Andrii
On 19.10.16 16:58, Andrii Bordunov wrote:
> Ping? Any comments?
>
>
>
> Thank you,
> Andrii
>
> On 10.10.16 20:02, Andrii Bordunov wrote:
>> Some packages containing shared libraries might be registered
>> as shlib providers when they shouldn't (for example, the lib is for
>> their private use and must not generate any dependency).
>>
>> EXCLUDE_FROM_SHLIBS is targeted at that, but it could be set
>> for entire recipe only.
>>
>> This patch expands EXCLUDE_FROM_SHLIBS usage, so now it's possible
>> to set it in a style similar with RDEPENDS. For example:
>> EXCLUDE_FROM_SHLIBS_${PN}-ptest = "1"
>>
>> Signed-off-by: Andrii Bordunov <aborduno@cisco.com>
>> ---
>> meta/classes/package.bbclass | 12 ++++++++++--
>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>> index a6f0a7a..9bf43dc 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -1499,6 +1499,14 @@ python package_do_shlibs() {
>> libdir_re = re.compile(".*/%s$" % d.getVar('baselib', True))
>>
>> packages = d.getVar('PACKAGES', True)
>> +
>> + shlib_pkgs = []
>> + for pkg in packages.split():
>> + if d.getVar('EXCLUDE_FROM_SHLIBS_' + pkg, 0):
>> + bb.note("not generating shlibs for %s" % pkg)
>> + else:
>> + shlib_pkgs.append(pkg)
>> +
>> targetos = d.getVar('TARGET_OS', True)
>>
>> workdir = d.getVar('WORKDIR', True)
>> @@ -1614,7 +1622,7 @@ python package_do_shlibs() {
>> needed = {}
>> shlib_provider = oe.package.read_shlib_providers(d)
>>
>> - for pkg in packages.split():
>> + for pkg in shlib_pkgs:
>> private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or
>> d.getVar('PRIVATE_LIBS', True) or ""
>> private_libs = private_libs.split()
>> needs_ldconfig = False
>> @@ -1684,7 +1692,7 @@ python package_do_shlibs() {
>>
>> libsearchpath = [d.getVar('libdir', True),
>> d.getVar('base_libdir', True)]
>>
>> - for pkg in packages.split():
>> + for pkg in shlib_pkgs:
>> bb.debug(2, "calculating shlib requirements for %s" % pkg)
>>
>> deps = list()
>>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox