diff options
Diffstat (limited to 'poky/bitbake')
-rw-r--r-- | poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 16 | ||||
-rw-r--r-- | poky/bitbake/lib/bb/fetch2/__init__.py | 25 | ||||
-rw-r--r-- | poky/bitbake/lib/bb/fetch2/git.py | 16 | ||||
-rw-r--r-- | poky/bitbake/lib/bb/fetch2/gitsm.py | 21 | ||||
-rw-r--r-- | poky/bitbake/toaster-requirements.txt | 2 |
5 files changed, 69 insertions, 11 deletions
diff --git a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index 95a8b95b1..0ca532161 100644 --- a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml @@ -432,7 +432,7 @@ The variable <filename>FOO</filename> becomes " 789 123456 " and <filename>FOO2</filename> becomes - " jkl abcdef ". + " abcdef ". </para> <para> @@ -2565,15 +2565,17 @@ </para> <para> - You might want to not only have BitBake look for - dependencies of those tasks, but also have BitBake look - for build-time and runtime dependencies of the dependent - tasks as well. - If that is the case, you need to reference the task name - itself in the task list: + BitBake allows a task to recursively depend on itself by + referencing itself in the task list: <literallayout class='monospaced'> do_a[recrdeptask] = "do_a do_b" </literallayout> + In the same way as before, this means that the <filename>do_a</filename> + and <filename>do_b</filename> tasks of the current recipe and all + recipes reachable (by way of dependencies) from the recipe + must run before the <filename>do_a</filename> task can run. In this + case BitBake will ignore the current recipe's <filename>do_a</filename> + task circular dependency on itself. </para> </section> diff --git a/poky/bitbake/lib/bb/fetch2/__init__.py b/poky/bitbake/lib/bb/fetch2/__init__.py index eb112f069..756f60212 100644 --- a/poky/bitbake/lib/bb/fetch2/__init__.py +++ b/poky/bitbake/lib/bb/fetch2/__init__.py @@ -1617,6 +1617,13 @@ class FetchMethod(object): return True return False + def implicit_urldata(self, ud, d): + """ + Get a list of FetchData objects for any implicit URLs that will also + be downloaded when we fetch the given URL. + """ + return [] + class Fetch(object): def __init__(self, urls, d, cache = True, localonly = False, connection_cache = None): if localonly and cache: @@ -1842,6 +1849,24 @@ class Fetch(object): if ud.lockfile: bb.utils.unlockfile(lf) + def expanded_urldata(self, urls=None): + """ + Get an expanded list of FetchData objects covering both the given + URLS and any additional implicit URLs that are added automatically by + the appropriate FetchMethod. + """ + + if not urls: + urls = self.urls + + urldata = [] + for url in urls: + ud = self.ud[url] + urldata.append(ud) + urldata += ud.method.implicit_urldata(ud, self.d) + + return urldata + class FetchConnectionCache(object): """ A class which represents an container for socket connections. diff --git a/poky/bitbake/lib/bb/fetch2/git.py b/poky/bitbake/lib/bb/fetch2/git.py index 5b3793a70..dbf871567 100644 --- a/poky/bitbake/lib/bb/fetch2/git.py +++ b/poky/bitbake/lib/bb/fetch2/git.py @@ -475,6 +475,9 @@ class Git(FetchMethod): need_lfs = ud.parm.get("lfs", "1") == "1" + if not need_lfs: + ud.basecmd = "GIT_LFS_SKIP_SMUDGE=1 " + ud.basecmd + source_found = False source_error = [] @@ -506,7 +509,7 @@ class Git(FetchMethod): if self._contains_lfs(ud, d, destdir): if need_lfs and not self._find_git_lfs(d): raise bb.fetch2.FetchError("Repository %s has LFS content, install git-lfs on host to download (or set lfs=0 to ignore it)" % (repourl)) - else: + elif not need_lfs: bb.note("Repository %s has LFS content but it is not being fetched" % (repourl)) if not ud.nocheckout: @@ -563,8 +566,15 @@ class Git(FetchMethod): """ Check if the repository has 'lfs' (large file) content """ - cmd = "%s grep lfs HEAD:.gitattributes | wc -l" % ( - ud.basecmd) + + if not ud.nobranch: + branchname = ud.branches[ud.names[0]] + else: + branchname = "master" + + cmd = "%s grep lfs origin/%s:.gitattributes | wc -l" % ( + ud.basecmd, ud.branches[ud.names[0]]) + try: output = runfetchcmd(cmd, d, quiet=True, workdir=wd) if int(output) > 0: diff --git a/poky/bitbake/lib/bb/fetch2/gitsm.py b/poky/bitbake/lib/bb/fetch2/gitsm.py index e7083001d..56bd5f048 100644 --- a/poky/bitbake/lib/bb/fetch2/gitsm.py +++ b/poky/bitbake/lib/bb/fetch2/gitsm.py @@ -223,3 +223,24 @@ class GitSM(Git): # up the configuration and checks out the files. The main project config should remain # unmodified, and no download from the internet should occur. runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) + + def implicit_urldata(self, ud, d): + import shutil, subprocess, tempfile + + urldata = [] + def add_submodule(ud, url, module, modpath, workdir, d): + url += ";bareclone=1;nobranch=1" + newfetch = Fetch([url], d, cache=False) + urldata.extend(newfetch.expanded_urldata()) + + # If we're using a shallow mirror tarball it needs to be unpacked + # temporarily so that we can examine the .gitmodules file + if ud.shallow and os.path.exists(ud.fullshallow) and ud.method.need_update(ud, d): + tmpdir = tempfile.mkdtemp(dir=d.getVar("DL_DIR")) + subprocess.check_call("tar -xzf %s" % ud.fullshallow, cwd=tmpdir, shell=True) + self.process_submodules(ud, tmpdir, add_submodule, d) + shutil.rmtree(tmpdir) + else: + self.process_submodules(ud, ud.clonedir, add_submodule, d) + + return urldata diff --git a/poky/bitbake/toaster-requirements.txt b/poky/bitbake/toaster-requirements.txt index a682b085d..735b61454 100644 --- a/poky/bitbake/toaster-requirements.txt +++ b/poky/bitbake/toaster-requirements.txt @@ -1,3 +1,3 @@ -Django>1.8,<1.12 +Django>2.2,<2.3 beautifulsoup4>=4.4.0 pytz |