summaryrefslogtreecommitdiff
path: root/poky/meta/lib/oe
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/oe')
-rw-r--r--poky/meta/lib/oe/__init__.py4
-rw-r--r--poky/meta/lib/oe/buildhistory_analysis.py4
-rw-r--r--poky/meta/lib/oe/cachedpath.py2
-rw-r--r--poky/meta/lib/oe/classextend.py4
-rw-r--r--poky/meta/lib/oe/classutils.py3
-rw-r--r--poky/meta/lib/oe/copy_buildsystem.py3
-rw-r--r--poky/meta/lib/oe/data.py4
-rw-r--r--poky/meta/lib/oe/distro_check.py4
-rw-r--r--poky/meta/lib/oe/elf.py4
-rw-r--r--poky/meta/lib/oe/gpg_sign.py4
-rw-r--r--poky/meta/lib/oe/license.py4
-rw-r--r--poky/meta/lib/oe/lsb.py4
-rw-r--r--poky/meta/lib/oe/maketype.py3
-rw-r--r--poky/meta/lib/oe/manifest.py4
-rw-r--r--poky/meta/lib/oe/package.py4
-rw-r--r--poky/meta/lib/oe/package_manager.py4
-rw-r--r--poky/meta/lib/oe/packagedata.py4
-rw-r--r--poky/meta/lib/oe/packagegroup.py4
-rw-r--r--poky/meta/lib/oe/patch.py15
-rw-r--r--poky/meta/lib/oe/path.py17
-rw-r--r--poky/meta/lib/oe/prservice.py3
-rw-r--r--poky/meta/lib/oe/qa.py4
-rw-r--r--poky/meta/lib/oe/recipeutils.py2
-rw-r--r--poky/meta/lib/oe/rootfs.py3
-rw-r--r--poky/meta/lib/oe/sdk.py4
-rw-r--r--poky/meta/lib/oe/sstatesig.py3
-rw-r--r--poky/meta/lib/oe/terminal.py3
-rw-r--r--poky/meta/lib/oe/types.py4
-rw-r--r--poky/meta/lib/oe/useradd.py3
-rw-r--r--poky/meta/lib/oe/utils.py11
30 files changed, 135 insertions, 4 deletions
diff --git a/poky/meta/lib/oe/__init__.py b/poky/meta/lib/oe/__init__.py
index 3ad9513f4..4e7c09da0 100644
--- a/poky/meta/lib/oe/__init__.py
+++ b/poky/meta/lib/oe/__init__.py
@@ -1,2 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
diff --git a/poky/meta/lib/oe/buildhistory_analysis.py b/poky/meta/lib/oe/buildhistory_analysis.py
index ad7fceb8b..62c7a2e58 100644
--- a/poky/meta/lib/oe/buildhistory_analysis.py
+++ b/poky/meta/lib/oe/buildhistory_analysis.py
@@ -3,6 +3,8 @@
# Copyright (C) 2012-2013, 2016-2017 Intel Corporation
# Author: Paul Eggleton <paul.eggleton@linux.intel.com>
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Note: requires GitPython 0.3.1+
#
# You can use this from the command line by running scripts/buildhistory-diff
@@ -127,7 +129,7 @@ class ChangeRecord:
removed = list(set(aitems) - set(bitems))
added = list(set(bitems) - set(aitems))
- if not removed and not added:
+ if not removed and not added and self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
depvera = bb.utils.explode_dep_versions2(self.oldvalue, sort=False)
depverb = bb.utils.explode_dep_versions2(self.newvalue, sort=False)
for i, j in zip(depvera.items(), depverb.items()):
diff --git a/poky/meta/lib/oe/cachedpath.py b/poky/meta/lib/oe/cachedpath.py
index 0840cc4c3..254257a83 100644
--- a/poky/meta/lib/oe/cachedpath.py
+++ b/poky/meta/lib/oe/cachedpath.py
@@ -1,4 +1,6 @@
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Based on standard python library functions but avoid
# repeated stat calls. Its assumed the files will not change from under us
# so we can cache stat calls.
diff --git a/poky/meta/lib/oe/classextend.py b/poky/meta/lib/oe/classextend.py
index 662707b85..e25122e81 100644
--- a/poky/meta/lib/oe/classextend.py
+++ b/poky/meta/lib/oe/classextend.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import collections
class ClassExtender(object):
diff --git a/poky/meta/lib/oe/classutils.py b/poky/meta/lib/oe/classutils.py
index 45cd5249b..08bb66b36 100644
--- a/poky/meta/lib/oe/classutils.py
+++ b/poky/meta/lib/oe/classutils.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
class ClassRegistryMeta(type):
"""Give each ClassRegistry their own registry"""
diff --git a/poky/meta/lib/oe/copy_buildsystem.py b/poky/meta/lib/oe/copy_buildsystem.py
index 7cb784cf8..5b96121dd 100644
--- a/poky/meta/lib/oe/copy_buildsystem.py
+++ b/poky/meta/lib/oe/copy_buildsystem.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This class should provide easy access to the different aspects of the
# buildsystem such as layers, bitbake location, etc.
#
diff --git a/poky/meta/lib/oe/data.py b/poky/meta/lib/oe/data.py
index b8901e63f..602130a90 100644
--- a/poky/meta/lib/oe/data.py
+++ b/poky/meta/lib/oe/data.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import json
import oe.maketype
diff --git a/poky/meta/lib/oe/distro_check.py b/poky/meta/lib/oe/distro_check.py
index e775c3a6e..88e46c354 100644
--- a/poky/meta/lib/oe/distro_check.py
+++ b/poky/meta/lib/oe/distro_check.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
def create_socket(url, d):
import urllib
from bb.utils import export_proxies
diff --git a/poky/meta/lib/oe/elf.py b/poky/meta/lib/oe/elf.py
index 4cc9a9a09..2562cea1d 100644
--- a/poky/meta/lib/oe/elf.py
+++ b/poky/meta/lib/oe/elf.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
def machine_dict(d):
# TARGET_OS TARGET_ARCH MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
machdata = {
diff --git a/poky/meta/lib/oe/gpg_sign.py b/poky/meta/lib/oe/gpg_sign.py
index ccd5aee42..a95d2ba34 100644
--- a/poky/meta/lib/oe/gpg_sign.py
+++ b/poky/meta/lib/oe/gpg_sign.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
"""Helper module for GPG signing"""
import os
diff --git a/poky/meta/lib/oe/license.py b/poky/meta/lib/oe/license.py
index 04f5b316a..c1274a61d 100644
--- a/poky/meta/lib/oe/license.py
+++ b/poky/meta/lib/oe/license.py
@@ -1,4 +1,6 @@
-# vi:sts=4:sw=4:et
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
"""Code for parsing OpenEmbedded license strings"""
import ast
diff --git a/poky/meta/lib/oe/lsb.py b/poky/meta/lib/oe/lsb.py
index 71c0992c5..4f2b419ed 100644
--- a/poky/meta/lib/oe/lsb.py
+++ b/poky/meta/lib/oe/lsb.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
def get_os_release():
"""Get all key-value pairs from /etc/os-release as a dict"""
from collections import OrderedDict
diff --git a/poky/meta/lib/oe/maketype.py b/poky/meta/lib/oe/maketype.py
index c36e7b560..d929c8b3e 100644
--- a/poky/meta/lib/oe/maketype.py
+++ b/poky/meta/lib/oe/maketype.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
"""OpenEmbedded variable typing support
Types are defined in the metadata by name, using the 'type' flag on a
diff --git a/poky/meta/lib/oe/manifest.py b/poky/meta/lib/oe/manifest.py
index 674303c86..f7c88f9a0 100644
--- a/poky/meta/lib/oe/manifest.py
+++ b/poky/meta/lib/oe/manifest.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from abc import ABCMeta, abstractmethod
import os
import re
diff --git a/poky/meta/lib/oe/package.py b/poky/meta/lib/oe/package.py
index 6e83f01f1..b59513227 100644
--- a/poky/meta/lib/oe/package.py
+++ b/poky/meta/lib/oe/package.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import stat
import mmap
import subprocess
diff --git a/poky/meta/lib/oe/package_manager.py b/poky/meta/lib/oe/package_manager.py
index 2835c1ddf..06feb4def 100644
--- a/poky/meta/lib/oe/package_manager.py
+++ b/poky/meta/lib/oe/package_manager.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from abc import ABCMeta, abstractmethod
import os
import glob
diff --git a/poky/meta/lib/oe/packagedata.py b/poky/meta/lib/oe/packagedata.py
index 32e5c82a9..cbde380b0 100644
--- a/poky/meta/lib/oe/packagedata.py
+++ b/poky/meta/lib/oe/packagedata.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import codecs
import os
diff --git a/poky/meta/lib/oe/packagegroup.py b/poky/meta/lib/oe/packagegroup.py
index 4bc5d3e4b..2419cbb6d 100644
--- a/poky/meta/lib/oe/packagegroup.py
+++ b/poky/meta/lib/oe/packagegroup.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import itertools
def is_optional(feature, d):
diff --git a/poky/meta/lib/oe/patch.py b/poky/meta/lib/oe/patch.py
index f43cf047c..2b1eee100 100644
--- a/poky/meta/lib/oe/patch.py
+++ b/poky/meta/lib/oe/patch.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import oe.path
import oe.types
@@ -847,6 +851,7 @@ def src_patches(d, all=False, expand=True):
def should_apply(parm, d):
+ import bb.utils
if "mindate" in parm or "maxdate" in parm:
pn = d.getVar('PN')
srcdate = d.getVar('SRCDATE_%s' % pn)
@@ -883,5 +888,15 @@ def should_apply(parm, d):
if srcrev and parm["notrev"] in srcrev:
return False, "doesn't apply to revision"
+ if "maxver" in parm:
+ pv = d.getVar('PV')
+ if bb.utils.vercmp_string_op(pv, parm["maxver"], ">"):
+ return False, "applies to earlier version"
+
+ if "minver" in parm:
+ pv = d.getVar('PV')
+ if bb.utils.vercmp_string_op(pv, parm["minver"], "<"):
+ return False, "applies to later version"
+
return True, None
diff --git a/poky/meta/lib/oe/path.py b/poky/meta/lib/oe/path.py
index 1e24d0586..fa209b979 100644
--- a/poky/meta/lib/oe/path.py
+++ b/poky/meta/lib/oe/path.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import errno
import glob
import shutil
@@ -90,7 +94,7 @@ def copytree(src, dst):
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
def copyhardlinktree(src, dst):
- """ Make the hard link when possible, otherwise copy. """
+ """Make a tree of hard links when possible, otherwise copy."""
bb.utils.mkdirhier(dst)
if os.path.isdir(src) and not len(os.listdir(src)):
return
@@ -114,6 +118,17 @@ def copyhardlinktree(src, dst):
else:
copytree(src, dst)
+def copyhardlink(src, dst):
+ """Make a hard link when possible, otherwise copy."""
+
+ # We need to stat the destination directory as the destination file probably
+ # doesn't exist yet.
+ dstdir = os.path.dirname(dst)
+ if os.stat(src).st_dev == os.stat(dstdir).st_dev:
+ os.link(src, dst)
+ else:
+ shutil.copy(src, dst)
+
def remove(path, recurse=True):
"""
Equivalent to rm -f or rm -rf
diff --git a/poky/meta/lib/oe/prservice.py b/poky/meta/lib/oe/prservice.py
index 32dfc15e8..b1132ccb1 100644
--- a/poky/meta/lib/oe/prservice.py
+++ b/poky/meta/lib/oe/prservice.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
def prserv_make_conn(d, check = False):
import prserv.serv
diff --git a/poky/meta/lib/oe/qa.py b/poky/meta/lib/oe/qa.py
index 59c72ce58..21066c4dc 100644
--- a/poky/meta/lib/oe/qa.py
+++ b/poky/meta/lib/oe/qa.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import os, struct, mmap
class NotELFFileError(Exception):
diff --git a/poky/meta/lib/oe/recipeutils.py b/poky/meta/lib/oe/recipeutils.py
index 4ca200d83..1e5b9a49f 100644
--- a/poky/meta/lib/oe/recipeutils.py
+++ b/poky/meta/lib/oe/recipeutils.py
@@ -4,6 +4,8 @@
#
# Copyright (C) 2013-2017 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import sys
import os
diff --git a/poky/meta/lib/oe/rootfs.py b/poky/meta/lib/oe/rootfs.py
index b7c0b9c24..9358f562c 100644
--- a/poky/meta/lib/oe/rootfs.py
+++ b/poky/meta/lib/oe/rootfs.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
from abc import ABCMeta, abstractmethod
from oe.utils import execute_pre_post_process
from oe.package_manager import *
diff --git a/poky/meta/lib/oe/sdk.py b/poky/meta/lib/oe/sdk.py
index 878ee1647..b4fbdb799 100644
--- a/poky/meta/lib/oe/sdk.py
+++ b/poky/meta/lib/oe/sdk.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
from abc import ABCMeta, abstractmethod
from oe.utils import execute_pre_post_process
from oe.manifest import *
diff --git a/poky/meta/lib/oe/sstatesig.py b/poky/meta/lib/oe/sstatesig.py
index a83af519e..417943db9 100644
--- a/poky/meta/lib/oe/sstatesig.py
+++ b/poky/meta/lib/oe/sstatesig.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import bb.siggen
import oe
diff --git a/poky/meta/lib/oe/terminal.py b/poky/meta/lib/oe/terminal.py
index e4045559f..9bda3efdc 100644
--- a/poky/meta/lib/oe/terminal.py
+++ b/poky/meta/lib/oe/terminal.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import logging
import oe.classutils
import shlex
diff --git a/poky/meta/lib/oe/types.py b/poky/meta/lib/oe/types.py
index 1eebba5a3..77ee7ee54 100644
--- a/poky/meta/lib/oe/types.py
+++ b/poky/meta/lib/oe/types.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import errno
import re
import os
diff --git a/poky/meta/lib/oe/useradd.py b/poky/meta/lib/oe/useradd.py
index 179ac76b5..bedfe0ecb 100644
--- a/poky/meta/lib/oe/useradd.py
+++ b/poky/meta/lib/oe/useradd.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import argparse
import re
diff --git a/poky/meta/lib/oe/utils.py b/poky/meta/lib/oe/utils.py
index a4fd79ccb..d686ce1bf 100644
--- a/poky/meta/lib/oe/utils.py
+++ b/poky/meta/lib/oe/utils.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import subprocess
import multiprocessing
import traceback
@@ -324,7 +328,12 @@ def multiprocess_launch(target, items, d, extraargs=None):
if errors:
msg = ""
for (e, tb) in errors:
- msg = msg + str(e) + ": " + str(tb) + "\n"
+ if isinstance(e, subprocess.CalledProcessError) and e.output:
+ msg = msg + str(e) + "\n"
+ msg = msg + "Subprocess output:"
+ msg = msg + e.output.decode("utf-8", errors="ignore")
+ else:
+ msg = msg + str(e) + ": " + str(tb) + "\n"
bb.fatal("Fatal errors occurred in subprocesses:\n%s" % msg)
return results