summaryrefslogtreecommitdiff
path: root/poky/bitbake
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2021-02-13 00:55:30 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2021-02-25 23:15:06 +0300
commit706d5aacd7ab7b37c00df1a1b210e4ced06119e1 (patch)
treeed0bec373424d01accfb2e9c895c177a3e2d7abe /poky/bitbake
parentac970dd705934286df062e0f1501f776dc2ef01d (diff)
downloadopenbmc-706d5aacd7ab7b37c00df1a1b210e4ced06119e1.tar.xz
Reset poky to before our libpam hacks
Things got a bit out of synch with openbmc-config due to the libpam issues and the migration from the meta-* layers. Revert the two previous commits and then put the latest poky in with the libpam revert and get openbmc-config right again. Revert "Revert "libpam: update 1.3.1 -> 1.5.1"" This reverts commit 87ddd3eab4df68e624b5350ccaab28b3b97547c0. Revert "poky: subtree update:796be0593a..10c69538c0" This reverts commit c723b72979bfac6362509cf1fe086900f6641f28. Change-Id: I3a1f405193aee6a21fe0cd24be9927c143a23d9a Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/bitbake')
-rw-r--r--poky/bitbake/lib/bb/cache.py4
-rw-r--r--poky/bitbake/lib/bb/cooker.py4
-rw-r--r--poky/bitbake/lib/bb/data_smart.py2
-rw-r--r--poky/bitbake/lib/bb/fetch2/git.py7
-rw-r--r--poky/bitbake/lib/bb/tests/fetch.py92
-rw-r--r--poky/bitbake/lib/bb/utils.py38
6 files changed, 36 insertions, 111 deletions
diff --git a/poky/bitbake/lib/bb/cache.py b/poky/bitbake/lib/bb/cache.py
index 36270d0093..b8054e028b 100644
--- a/poky/bitbake/lib/bb/cache.py
+++ b/poky/bitbake/lib/bb/cache.py
@@ -26,7 +26,7 @@ import re
logger = logging.getLogger("BitBake.Cache")
-__cache_version__ = "154"
+__cache_version__ = "153"
def getCacheFile(path, filename, mc, data_hash):
mcspec = ''
@@ -94,7 +94,6 @@ class CoreRecipeInfo(RecipeInfoCommon):
if not self.packages:
self.packages.append(self.pn)
self.packages_dynamic = self.listvar('PACKAGES_DYNAMIC', metadata)
- self.rprovides_pkg = self.pkgvar('RPROVIDES', self.packages, metadata)
self.skipreason = self.getvar('__SKIPPED', metadata)
if self.skipreason:
@@ -121,6 +120,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
self.depends = self.depvar('DEPENDS', metadata)
self.rdepends = self.depvar('RDEPENDS', metadata)
self.rrecommends = self.depvar('RRECOMMENDS', metadata)
+ self.rprovides_pkg = self.pkgvar('RPROVIDES', self.packages, metadata)
self.rdepends_pkg = self.pkgvar('RDEPENDS', self.packages, metadata)
self.rrecommends_pkg = self.pkgvar('RRECOMMENDS', self.packages, metadata)
self.inherits = self.getvar('__inherit_cache', metadata, expand=False)
diff --git a/poky/bitbake/lib/bb/cooker.py b/poky/bitbake/lib/bb/cooker.py
index 83cfee7fb4..1f4cc1e96d 100644
--- a/poky/bitbake/lib/bb/cooker.py
+++ b/poky/bitbake/lib/bb/cooker.py
@@ -73,9 +73,7 @@ class SkippedPackage:
self.pn = info.pn
self.skipreason = info.skipreason
self.provides = info.provides
- self.rprovides = info.packages + info.rprovides
- for package in info.packages:
- self.rprovides += info.rprovides_pkg[package]
+ self.rprovides = info.rprovides
elif reason:
self.skipreason = reason
diff --git a/poky/bitbake/lib/bb/data_smart.py b/poky/bitbake/lib/bb/data_smart.py
index 2328c334ac..c559102cf5 100644
--- a/poky/bitbake/lib/bb/data_smart.py
+++ b/poky/bitbake/lib/bb/data_smart.py
@@ -1005,7 +1005,7 @@ class DataSmart(MutableMapping):
else:
data.update({key:value})
- varflags = d.getVarFlags(key, internalflags = True, expand=["vardepvalue"])
+ varflags = d.getVarFlags(key, internalflags = True)
if not varflags:
continue
for f in varflags:
diff --git a/poky/bitbake/lib/bb/fetch2/git.py b/poky/bitbake/lib/bb/fetch2/git.py
index df9538a60d..490d57fbbf 100644
--- a/poky/bitbake/lib/bb/fetch2/git.py
+++ b/poky/bitbake/lib/bb/fetch2/git.py
@@ -220,12 +220,7 @@ class Git(FetchMethod):
ud.shallow = False
if ud.usehead:
- # When usehead is set let's associate 'HEAD' with the unresolved
- # rev of this repository. This will get resolved into a revision
- # later. If an actual revision happens to have also been provided
- # then this setting will be overridden.
- for name in ud.names:
- ud.unresolvedrev[name] = 'HEAD'
+ ud.unresolvedrev['default'] = 'HEAD'
ud.basecmd = d.getVar("FETCHCMD_git") or "git -c core.fsyncobjectfiles=0"
diff --git a/poky/bitbake/lib/bb/tests/fetch.py b/poky/bitbake/lib/bb/tests/fetch.py
index 1452d76151..da17d7f281 100644
--- a/poky/bitbake/lib/bb/tests/fetch.py
+++ b/poky/bitbake/lib/bb/tests/fetch.py
@@ -654,58 +654,6 @@ class FetcherLocalTest(FetcherTest):
with self.assertRaises(bb.fetch2.UnpackError):
self.fetchUnpack(['file://a;subdir=/bin/sh'])
- def test_local_gitfetch_usehead(self):
- # Create dummy local Git repo
- src_dir = tempfile.mkdtemp(dir=self.tempdir,
- prefix='gitfetch_localusehead_')
- src_dir = os.path.abspath(src_dir)
- bb.process.run("git init", cwd=src_dir)
- bb.process.run("git commit --allow-empty -m'Dummy commit'",
- cwd=src_dir)
- # Use other branch than master
- bb.process.run("git checkout -b my-devel", cwd=src_dir)
- bb.process.run("git commit --allow-empty -m'Dummy commit 2'",
- cwd=src_dir)
- stdout = bb.process.run("git rev-parse HEAD", cwd=src_dir)
- orig_rev = stdout[0].strip()
-
- # Fetch and check revision
- self.d.setVar("SRCREV", "AUTOINC")
- url = "git://" + src_dir + ";protocol=file;usehead=1"
- fetcher = bb.fetch.Fetch([url], self.d)
- fetcher.download()
- fetcher.unpack(self.unpackdir)
- stdout = bb.process.run("git rev-parse HEAD",
- cwd=os.path.join(self.unpackdir, 'git'))
- unpack_rev = stdout[0].strip()
- self.assertEqual(orig_rev, unpack_rev)
-
- def test_local_gitfetch_usehead_withname(self):
- # Create dummy local Git repo
- src_dir = tempfile.mkdtemp(dir=self.tempdir,
- prefix='gitfetch_localusehead_')
- src_dir = os.path.abspath(src_dir)
- bb.process.run("git init", cwd=src_dir)
- bb.process.run("git commit --allow-empty -m'Dummy commit'",
- cwd=src_dir)
- # Use other branch than master
- bb.process.run("git checkout -b my-devel", cwd=src_dir)
- bb.process.run("git commit --allow-empty -m'Dummy commit 2'",
- cwd=src_dir)
- stdout = bb.process.run("git rev-parse HEAD", cwd=src_dir)
- orig_rev = stdout[0].strip()
-
- # Fetch and check revision
- self.d.setVar("SRCREV", "AUTOINC")
- url = "git://" + src_dir + ";protocol=file;usehead=1;name=newName"
- fetcher = bb.fetch.Fetch([url], self.d)
- fetcher.download()
- fetcher.unpack(self.unpackdir)
- stdout = bb.process.run("git rev-parse HEAD",
- cwd=os.path.join(self.unpackdir, 'git'))
- unpack_rev = stdout[0].strip()
- self.assertEqual(orig_rev, unpack_rev)
-
class FetcherNoNetworkTest(FetcherTest):
def setUp(self):
super().setUp()
@@ -896,21 +844,35 @@ class FetcherNetworkTest(FetcherTest):
self.assertRaises(bb.fetch.FetchError, self.gitfetcher, url1, url2)
@skipIfNoNetwork()
- def test_gitfetch_usehead(self):
- # Since self.gitfetcher() sets SRCREV we expect this to override
- # `usehead=1' and instead fetch the specified SRCREV. See
- # test_local_gitfetch_usehead() for a positive use of the usehead
- # feature.
- url = "git://git.openembedded.org/bitbake;usehead=1"
- self.assertRaises(bb.fetch.ParameterError, self.gitfetcher, url, url)
+ def test_gitfetch_localusehead(self):
+ # Create dummy local Git repo
+ src_dir = tempfile.mkdtemp(dir=self.tempdir,
+ prefix='gitfetch_localusehead_')
+ src_dir = os.path.abspath(src_dir)
+ bb.process.run("git init", cwd=src_dir)
+ bb.process.run("git commit --allow-empty -m'Dummy commit'",
+ cwd=src_dir)
+ # Use other branch than master
+ bb.process.run("git checkout -b my-devel", cwd=src_dir)
+ bb.process.run("git commit --allow-empty -m'Dummy commit 2'",
+ cwd=src_dir)
+ stdout = bb.process.run("git rev-parse HEAD", cwd=src_dir)
+ orig_rev = stdout[0].strip()
+
+ # Fetch and check revision
+ self.d.setVar("SRCREV", "AUTOINC")
+ url = "git://" + src_dir + ";protocol=file;usehead=1"
+ fetcher = bb.fetch.Fetch([url], self.d)
+ fetcher.download()
+ fetcher.unpack(self.unpackdir)
+ stdout = bb.process.run("git rev-parse HEAD",
+ cwd=os.path.join(self.unpackdir, 'git'))
+ unpack_rev = stdout[0].strip()
+ self.assertEqual(orig_rev, unpack_rev)
@skipIfNoNetwork()
- def test_gitfetch_usehead_withname(self):
- # Since self.gitfetcher() sets SRCREV we expect this to override
- # `usehead=1' and instead fetch the specified SRCREV. See
- # test_local_gitfetch_usehead() for a positive use of the usehead
- # feature.
- url = "git://git.openembedded.org/bitbake;usehead=1;name=newName"
+ def test_gitfetch_remoteusehead(self):
+ url = "git://git.openembedded.org/bitbake;usehead=1"
self.assertRaises(bb.fetch.ParameterError, self.gitfetcher, url, url)
@skipIfNoNetwork()
diff --git a/poky/bitbake/lib/bb/utils.py b/poky/bitbake/lib/bb/utils.py
index 5c775bd8a8..f73d31fb73 100644
--- a/poky/bitbake/lib/bb/utils.py
+++ b/poky/bitbake/lib/bb/utils.py
@@ -129,7 +129,6 @@ def vercmp(ta, tb):
return r
def vercmp_string(a, b):
- """ Split version strings and compare them """
ta = split_version(a)
tb = split_version(b)
return vercmp(ta, tb)
@@ -248,12 +247,6 @@ def explode_dep_versions2(s, *, sort=True):
return r
def explode_dep_versions(s):
- """
- Take an RDEPENDS style string of format:
- "DEPEND1 (optional version) DEPEND2 (optional version) ..."
- skip null value and items appeared in dependancy string multiple times
- and return a dictionary of dependencies and versions.
- """
r = explode_dep_versions2(s)
for d in r:
if not r[d]:
@@ -699,7 +692,7 @@ def remove(path, recurse=False, ionice=False):
raise
def prunedir(topdir, ionice=False):
- """ Delete everything reachable from the directory named in 'topdir'. """
+ # Delete everything reachable from the directory named in 'topdir'.
# CAUTION: This is dangerous!
if _check_unsafe_delete_path(topdir):
raise Exception('bb.utils.prunedir: called with dangerous path "%s", refusing to delete!' % topdir)
@@ -710,10 +703,8 @@ def prunedir(topdir, ionice=False):
# but thats possibly insane and suffixes is probably going to be small
#
def prune_suffix(var, suffixes, d):
- """
- See if var ends with any of the suffixes listed and
- remove it if found
- """
+ # See if var ends with any of the suffixes listed and
+ # remove it if found
for suffix in suffixes:
if suffix and var.endswith(suffix):
return var[:-len(suffix)]
@@ -965,10 +956,6 @@ def umask(new_mask):
os.umask(current_mask)
def to_boolean(string, default=None):
- """
- Check input string and return boolean value True/False/None
- depending upon the checks
- """
if not string:
return default
@@ -1012,23 +999,6 @@ def contains(variable, checkvalues, truevalue, falsevalue, d):
return falsevalue
def contains_any(variable, checkvalues, truevalue, falsevalue, d):
- """Check if a variable contains any values specified.
-
- Arguments:
-
- variable -- the variable name. This will be fetched and expanded (using
- d.getVar(variable)) and then split into a set().
-
- checkvalues -- if this is a string it is split on whitespace into a set(),
- otherwise coerced directly into a set().
-
- truevalue -- the value to return if checkvalues is a subset of variable.
-
- falsevalue -- the value to return if variable is empty or if checkvalues is
- not a subset of variable.
-
- d -- the data store.
- """
val = d.getVar(variable)
if not val:
return falsevalue
@@ -1590,8 +1560,8 @@ def set_process_name(name):
except:
pass
+# export common proxies variables from datastore to environment
def export_proxies(d):
- """ export common proxies variables from datastore to environment """
import os
variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY',