diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2020-04-13 21:39:40 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-05-05 16:30:44 +0300 |
commit | 82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch) | |
tree | 38caf00263451b5036435cdc36e035b25d32e623 /poky/bitbake/lib/bblayers/layerindex.py | |
parent | 83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff) | |
download | openbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz |
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them
and OpenBMC changes:
meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7
The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:
meta-openembedded:d0748372d2
cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
mpv: Remove X11 dependency
poky:9052e5b32a
package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
pbzip2: Fix license warning
Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/bitbake/lib/bblayers/layerindex.py')
-rw-r--r-- | poky/bitbake/lib/bblayers/layerindex.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/poky/bitbake/lib/bblayers/layerindex.py b/poky/bitbake/lib/bblayers/layerindex.py index 57cd9027f..95b67a662 100644 --- a/poky/bitbake/lib/bblayers/layerindex.py +++ b/poky/bitbake/lib/bblayers/layerindex.py @@ -24,7 +24,7 @@ class LayerIndexPlugin(ActionPlugin): This class inherits ActionPlugin to get do_add_layer. """ - def get_fetch_layer(self, fetchdir, url, subdir, fetch_layer): + def get_fetch_layer(self, fetchdir, url, subdir, fetch_layer, branch, shallow=False): layername = self.get_layer_name(url) if os.path.splitext(layername)[1] == '.git': layername = os.path.splitext(layername)[0] @@ -32,9 +32,15 @@ class LayerIndexPlugin(ActionPlugin): layerdir = os.path.join(repodir, subdir) if not os.path.exists(repodir): if fetch_layer: - result = subprocess.call(['git', 'clone', url, repodir]) + cmd = ['git', 'clone'] + if shallow: + cmd.extend(['--depth', '1']) + if branch: + cmd.extend(['-b' , branch]) + cmd.extend([url, repodir]) + result = subprocess.call(cmd) if result: - logger.error("Failed to download %s" % url) + logger.error("Failed to download %s (%s)" % (url, branch)) return None, None, None else: return subdir, layername, layerdir @@ -171,7 +177,9 @@ class LayerIndexPlugin(ActionPlugin): subdir, name, layerdir = self.get_fetch_layer(fetchdir, layerBranch.layer.vcs_url, layerBranch.vcs_subdir, - not args.show_only) + not args.show_only, + layerBranch.actual_branch, + args.shallow) if not name: # Error already shown return 1 @@ -204,6 +212,7 @@ class LayerIndexPlugin(ActionPlugin): parser_layerindex_fetch = self.add_command(sp, 'layerindex-fetch', self.do_layerindex_fetch, parserecipes=False) parser_layerindex_fetch.add_argument('-n', '--show-only', help='show dependencies and do nothing else', action='store_true') parser_layerindex_fetch.add_argument('-b', '--branch', help='branch name to fetch') + parser_layerindex_fetch.add_argument('-s', '--shallow', help='do only shallow clones (--depth=1)', action='store_true') parser_layerindex_fetch.add_argument('-i', '--ignore', help='assume the specified layers do not need to be fetched/added (separate multiple layers with commas, no spaces)', metavar='LAYER') parser_layerindex_fetch.add_argument('layername', nargs='+', help='layer to fetch') |