diff options
| -rwxr-xr-x | bitbake/bin/bitbake-setup | 83 | ||||
| -rw-r--r-- | bitbake/lib/bb/tests/setup.py | 46 | ||||
| -rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3_3.24.51.bb | 12 |
3 files changed, 83 insertions, 58 deletions
diff --git a/bitbake/bin/bitbake-setup b/bitbake/bin/bitbake-setup index 3cd67805fe..29fdf11892 100755 --- a/bitbake/bin/bitbake-setup +++ b/bitbake/bin/bitbake-setup | |||
| @@ -18,6 +18,7 @@ import configparser | |||
| 18 | import datetime | 18 | import datetime |
| 19 | import glob | 19 | import glob |
| 20 | import subprocess | 20 | import subprocess |
| 21 | import copy | ||
| 21 | 22 | ||
| 22 | default_registry = os.path.normpath(os.path.dirname(__file__) + "/../default-registry") | 23 | default_registry = os.path.normpath(os.path.dirname(__file__) + "/../default-registry") |
| 23 | 24 | ||
| @@ -57,9 +58,15 @@ def get_config_name(config): | |||
| 57 | else: | 58 | else: |
| 58 | raise Exception("Config file {} does not end with {}, please rename the file.".format(config, suffix)) | 59 | raise Exception("Config file {} does not end with {}, please rename the file.".format(config, suffix)) |
| 59 | 60 | ||
| 60 | def write_config(config, config_dir): | 61 | def write_upstream_config(config_dir, config_data): |
| 61 | with open(os.path.join(config_dir, "config-upstream.json"),'w') as s: | 62 | with open(os.path.join(config_dir, "config-upstream.json"),'w') as s: |
| 62 | json.dump(config, s, sort_keys=True, indent=4) | 63 | json.dump(config_data, s, sort_keys=True, indent=4) |
| 64 | |||
| 65 | def write_sources_fixed_revisions(config_dir, config_data): | ||
| 66 | sources = {} | ||
| 67 | sources['sources'] = config_data | ||
| 68 | with open(os.path.join(config_dir, "sources-fixed-revisions.json"),'w') as s: | ||
| 69 | json.dump(sources, s, sort_keys=True, indent=4) | ||
| 63 | 70 | ||
| 64 | def commit_config(config_dir): | 71 | def commit_config(config_dir): |
| 65 | bb.process.run("git -C {} add .".format(config_dir)) | 72 | bb.process.run("git -C {} add .".format(config_dir)) |
| @@ -76,6 +83,7 @@ def _write_layer_list(dest, repodirs): | |||
| 76 | json.dump({"version":"1.0","layers":layers}, f, sort_keys=True, indent=4) | 83 | json.dump({"version":"1.0","layers":layers}, f, sort_keys=True, indent=4) |
| 77 | 84 | ||
| 78 | def checkout_layers(layers, layerdir, d): | 85 | def checkout_layers(layers, layerdir, d): |
| 86 | layers_fixed_revisions = copy.deepcopy(layers) | ||
| 79 | repodirs = [] | 87 | repodirs = [] |
| 80 | oesetupbuild = None | 88 | oesetupbuild = None |
| 81 | print("Fetching layer/tool repositories into {}".format(layerdir)) | 89 | print("Fetching layer/tool repositories into {}".format(layerdir)) |
| @@ -90,14 +98,18 @@ def checkout_layers(layers, layerdir, d): | |||
| 90 | remotes = r_remote['remotes'] | 98 | remotes = r_remote['remotes'] |
| 91 | 99 | ||
| 92 | for remote in remotes: | 100 | for remote in remotes: |
| 93 | type,host,path,user,pswd,params = bb.fetch.decodeurl(remotes[remote]["uri"]) | 101 | prot,host,path,user,pswd,params = bb.fetch.decodeurl(remotes[remote]["uri"]) |
| 94 | fetchuri = bb.fetch.encodeurl(('git',host,path,user,pswd,params)) | 102 | fetchuri = bb.fetch.encodeurl(('git',host,path,user,pswd,params)) |
| 95 | print(" {}".format(r_name)) | 103 | print(" {}".format(r_name)) |
| 96 | if branch: | 104 | if branch: |
| 97 | fetcher = bb.fetch.Fetch(["{};protocol={};rev={};branch={};destsuffix={}".format(fetchuri,type,rev,branch,repodir)], d) | 105 | src_uri = f"{fetchuri};protocol={prot};rev={rev};branch={branch};destsuffix={repodir}" |
| 98 | else: | 106 | else: |
| 99 | fetcher = bb.fetch.Fetch(["{};protocol={};rev={};nobranch=1;destsuffix={}".format(fetchuri,type,rev,repodir)], d) | 107 | src_uri = f"{fetchuri};protocol={prot};rev={rev};nobranch=1;destsuffix={repodir}" |
| 108 | fetcher = bb.fetch.Fetch([src_uri], d) | ||
| 100 | do_fetch(fetcher, layerdir) | 109 | do_fetch(fetcher, layerdir) |
| 110 | urldata = fetcher.ud[src_uri] | ||
| 111 | revision = urldata.revision | ||
| 112 | layers_fixed_revisions[r_name]['git-remote']['rev'] = revision | ||
| 101 | 113 | ||
| 102 | if os.path.exists(os.path.join(layerdir, repodir, 'scripts/oe-setup-build')): | 114 | if os.path.exists(os.path.join(layerdir, repodir, 'scripts/oe-setup-build')): |
| 103 | oesetupbuild = os.path.join(layerdir, repodir, 'scripts/oe-setup-build') | 115 | oesetupbuild = os.path.join(layerdir, repodir, 'scripts/oe-setup-build') |
| @@ -114,22 +126,27 @@ def checkout_layers(layers, layerdir, d): | |||
| 114 | os.remove(symlink) | 126 | os.remove(symlink) |
| 115 | os.symlink(os.path.relpath(t,layerdir),symlink) | 127 | os.symlink(os.path.relpath(t,layerdir),symlink) |
| 116 | 128 | ||
| 129 | return layers_fixed_revisions | ||
| 130 | |||
| 117 | def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): | 131 | def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): |
| 118 | def _setup_build_conf(layers, build_conf_dir): | 132 | def _setup_build_conf(layers, relative_layers, build_conf_dir): |
| 119 | os.makedirs(build_conf_dir) | 133 | os.makedirs(build_conf_dir) |
| 120 | layers_s = [] | 134 | layers_s = [] |
| 135 | |||
| 121 | for l in layers: | 136 | for l in layers: |
| 122 | if l.startswith("{THISDIR}/"): | 137 | l = os.path.join(layerdir, l) |
| 123 | if thisdir: | 138 | layers_s.append(" {} \\".format(l)) |
| 124 | l = l.format(THISDIR=thisdir) | 139 | |
| 125 | else: | 140 | for l in relative_layers: |
| 126 | raise Exception("Configuration is using {THISDIR} to specify " \ | 141 | if thisdir: |
| 127 | "a layer path relative to itself. This can be done only " \ | 142 | l = os.path.join(thisdir, l) |
| 128 | "when the configuration is specified by its path on local " \ | 143 | else: |
| 129 | "disk, not when it's in a registry or is fetched over http.") | 144 | raise Exception("Configuration is using bb-layers-relative to specify " \ |
| 130 | if not os.path.isabs(l): | 145 | "a layer path relative to itself. This can be done only " \ |
| 131 | l = os.path.join(layerdir, l) | 146 | "when the configuration is specified by its path on local " \ |
| 147 | "disk, not when it's in a registry or is fetched over http.") | ||
| 132 | layers_s.append(" {} \\".format(l)) | 148 | layers_s.append(" {} \\".format(l)) |
| 149 | |||
| 133 | layers_s = "\n".join(layers_s) | 150 | layers_s = "\n".join(layers_s) |
| 134 | bblayers_conf = """BBLAYERS ?= " \\ | 151 | bblayers_conf = """BBLAYERS ?= " \\ |
| 135 | {} | 152 | {} |
| @@ -206,7 +223,8 @@ def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): | |||
| 206 | os.rename(bitbake_confdir, backup_bitbake_confdir) | 223 | os.rename(bitbake_confdir, backup_bitbake_confdir) |
| 207 | 224 | ||
| 208 | if layers: | 225 | if layers: |
| 209 | _setup_build_conf(layers, bitbake_confdir) | 226 | relative_layers = bitbake_config.get("bb-layers-relative") or [] |
| 227 | _setup_build_conf(layers, relative_layers, bitbake_confdir) | ||
| 210 | 228 | ||
| 211 | if template: | 229 | if template: |
| 212 | bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) | 230 | bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) |
| @@ -268,15 +286,16 @@ def get_registry_config(registry_path, id): | |||
| 268 | raise Exception("Unable to find {} in available configurations; use 'list' sub-command to see what is available".format(id)) | 286 | raise Exception("Unable to find {} in available configurations; use 'list' sub-command to see what is available".format(id)) |
| 269 | 287 | ||
| 270 | def update_build(config, confdir, setupdir, layerdir, d): | 288 | def update_build(config, confdir, setupdir, layerdir, d): |
| 271 | layer_config = config["data"]["sources"] | 289 | layer_config = copy.deepcopy(config["data"]["sources"]) |
| 272 | layer_overrides = config["source-overrides"]["sources"] | 290 | layer_overrides = config["source-overrides"]["sources"] |
| 273 | for k,v in layer_overrides.items(): | 291 | for k,v in layer_overrides.items(): |
| 274 | if k in layer_config: | 292 | if k in layer_config: |
| 275 | layer_config[k]["git-remote"] = v["git-remote"] | 293 | layer_config[k]["git-remote"] = v["git-remote"] |
| 276 | checkout_layers(layer_config, layerdir, d) | 294 | sources_fixed_revisions = checkout_layers(layer_config, layerdir, d) |
| 277 | bitbake_config = config["bitbake-config"] | 295 | bitbake_config = config["bitbake-config"] |
| 278 | thisdir = os.path.dirname(config["path"]) if config["type"] == 'local' else None | 296 | thisdir = os.path.dirname(config["path"]) if config["type"] == 'local' else None |
| 279 | setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir) | 297 | setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir) |
| 298 | write_sources_fixed_revisions(confdir, sources_fixed_revisions) | ||
| 280 | 299 | ||
| 281 | def int_input(allowed_values): | 300 | def int_input(allowed_values): |
| 282 | n = None | 301 | n = None |
| @@ -469,9 +488,9 @@ def init_config(top_dir, settings, args, d): | |||
| 469 | 488 | ||
| 470 | bb.event.register("bb.build.TaskProgress", handle_task_progress, data=d) | 489 | bb.event.register("bb.build.TaskProgress", handle_task_progress, data=d) |
| 471 | 490 | ||
| 472 | write_config(upstream_config, confdir) | 491 | write_upstream_config(confdir, upstream_config) |
| 473 | commit_config(confdir) | ||
| 474 | update_build(upstream_config, confdir, setupdir, layerdir, d) | 492 | update_build(upstream_config, confdir, setupdir, layerdir, d) |
| 493 | commit_config(confdir) | ||
| 475 | 494 | ||
| 476 | bb.event.remove("bb.build.TaskProgress", None) | 495 | bb.event.remove("bb.build.TaskProgress", None) |
| 477 | 496 | ||
| @@ -526,7 +545,7 @@ def build_status(top_dir, settings, args, d, update=False): | |||
| 526 | source_overrides = current_upstream_config["source-overrides"] | 545 | source_overrides = current_upstream_config["source-overrides"] |
| 527 | new_upstream_config = obtain_config(top_dir, settings, args, source_overrides, d) | 546 | new_upstream_config = obtain_config(top_dir, settings, args, source_overrides, d) |
| 528 | 547 | ||
| 529 | write_config(new_upstream_config, confdir) | 548 | write_upstream_config(confdir, new_upstream_config) |
| 530 | config_diff = bb.process.run('git -C {} diff'.format(confdir))[0] | 549 | config_diff = bb.process.run('git -C {} diff'.format(confdir))[0] |
| 531 | 550 | ||
| 532 | if config_diff: | 551 | if config_diff: |
| @@ -634,9 +653,6 @@ def install_buildtools(top_dir, settings, args, d): | |||
| 634 | print("Buildtools archive is downloaded into {} and its content installed into {}".format(buildtools_download_dir, buildtools_install_dir)) | 653 | print("Buildtools archive is downloaded into {} and its content installed into {}".format(buildtools_download_dir, buildtools_install_dir)) |
| 635 | subprocess.check_call("{} -d {} --downloads-directory {}".format(install_buildtools, buildtools_install_dir, buildtools_download_dir), shell=True) | 654 | subprocess.check_call("{} -d {} --downloads-directory {}".format(install_buildtools, buildtools_install_dir, buildtools_download_dir), shell=True) |
| 636 | 655 | ||
| 637 | def default_settings_path(top_dir): | ||
| 638 | return os.path.join(top_dir, 'settings.conf') | ||
| 639 | |||
| 640 | def create_siteconf(top_dir, non_interactive=True): | 656 | def create_siteconf(top_dir, non_interactive=True): |
| 641 | siteconfpath = os.path.join(top_dir, 'site.conf') | 657 | siteconfpath = os.path.join(top_dir, 'site.conf') |
| 642 | print('A common site.conf file will be created, please edit or replace before running builds\n {}\n'.format(siteconfpath)) | 658 | print('A common site.conf file will be created, please edit or replace before running builds\n {}\n'.format(siteconfpath)) |
| @@ -653,6 +669,9 @@ def create_siteconf(top_dir, non_interactive=True): | |||
| 653 | with open(siteconfpath, 'w') as siteconffile: | 669 | with open(siteconfpath, 'w') as siteconffile: |
| 654 | siteconffile.write('# This file is intended for build host-specific bitbake settings\n') | 670 | siteconffile.write('# This file is intended for build host-specific bitbake settings\n') |
| 655 | 671 | ||
| 672 | def topdir_settings_path(top_dir): | ||
| 673 | return os.path.join(top_dir, 'settings.conf') | ||
| 674 | |||
| 656 | def global_settings_path(args): | 675 | def global_settings_path(args): |
| 657 | return os.path.abspath(args.global_settings) if args.global_settings else os.path.join(os.path.expanduser('~'), '.config', 'bitbake-setup', 'settings.conf') | 676 | return os.path.abspath(args.global_settings) if args.global_settings else os.path.join(os.path.expanduser('~'), '.config', 'bitbake-setup', 'settings.conf') |
| 658 | 677 | ||
| @@ -667,7 +686,7 @@ def change_setting(top_dir, args): | |||
| 667 | if vars(args)['global']: | 686 | if vars(args)['global']: |
| 668 | settings_path = global_settings_path(args) | 687 | settings_path = global_settings_path(args) |
| 669 | else: | 688 | else: |
| 670 | settings_path = default_settings_path(top_dir) | 689 | settings_path = topdir_settings_path(top_dir) |
| 671 | settings = load_settings(settings_path) | 690 | settings = load_settings(settings_path) |
| 672 | 691 | ||
| 673 | if args.subcommand == 'set': | 692 | if args.subcommand == 'set': |
| @@ -709,7 +728,7 @@ def get_top_dir(args, settings): | |||
| 709 | setup_dir_via_bbpath = get_setup_dir_via_bbpath() | 728 | setup_dir_via_bbpath = get_setup_dir_via_bbpath() |
| 710 | if setup_dir_via_bbpath: | 729 | if setup_dir_via_bbpath: |
| 711 | top_dir = os.path.dirname(setup_dir_via_bbpath) | 730 | top_dir = os.path.dirname(setup_dir_via_bbpath) |
| 712 | if os.path.exists(default_settings_path(top_dir)): | 731 | if os.path.exists(topdir_settings_path(top_dir)): |
| 713 | return top_dir | 732 | return top_dir |
| 714 | 733 | ||
| 715 | if hasattr(args, 'setup_dir'): | 734 | if hasattr(args, 'setup_dir'): |
| @@ -720,15 +739,19 @@ def get_top_dir(args, settings): | |||
| 720 | top_dir_name = settings['default']['top-dir-name'] | 739 | top_dir_name = settings['default']['top-dir-name'] |
| 721 | return os.path.join(top_dir_prefix, top_dir_name) | 740 | return os.path.join(top_dir_prefix, top_dir_name) |
| 722 | 741 | ||
| 723 | def merge_settings(builtin_settings, global_settings, local_settings, cmdline_settings): | 742 | def merge_settings(builtin_settings, global_settings, topdir_settings, cmdline_settings): |
| 724 | all_settings = builtin_settings | 743 | all_settings = builtin_settings |
| 725 | 744 | ||
| 726 | for s in (global_settings, local_settings): | 745 | for s in (global_settings, topdir_settings): |
| 727 | for section, section_settings in s.items(): | 746 | for section, section_settings in s.items(): |
| 728 | for setting, value in section_settings.items(): | 747 | for setting, value in section_settings.items(): |
| 748 | if section not in all_settings.keys(): | ||
| 749 | all_settings[section] = {} | ||
| 729 | all_settings[section][setting] = value | 750 | all_settings[section][setting] = value |
| 730 | 751 | ||
| 731 | for (section, setting, value) in cmdline_settings: | 752 | for (section, setting, value) in cmdline_settings: |
| 753 | if section not in all_settings.keys(): | ||
| 754 | all_settings[section] = {} | ||
| 732 | all_settings[section][setting] = value | 755 | all_settings[section][setting] = value |
| 733 | 756 | ||
| 734 | return all_settings | 757 | return all_settings |
| @@ -841,7 +864,7 @@ def main(): | |||
| 841 | # This cannot be set with the rest of the builtin settings as top_dir needs to be determined first | 864 | # This cannot be set with the rest of the builtin settings as top_dir needs to be determined first |
| 842 | builtin_settings['default']['dl-dir'] = os.path.join(top_dir, '.bitbake-setup-downloads') | 865 | builtin_settings['default']['dl-dir'] = os.path.join(top_dir, '.bitbake-setup-downloads') |
| 843 | 866 | ||
| 844 | topdir_settings = load_settings(default_settings_path(top_dir)) | 867 | topdir_settings = load_settings(topdir_settings_path(top_dir)) |
| 845 | all_settings = merge_settings(builtin_settings, global_settings, topdir_settings, args.cmdline_settings) | 868 | all_settings = merge_settings(builtin_settings, global_settings, topdir_settings, args.cmdline_settings) |
| 846 | 869 | ||
| 847 | if args.func == settings_func: | 870 | if args.func == settings_func: |
diff --git a/bitbake/lib/bb/tests/setup.py b/bitbake/lib/bb/tests/setup.py index a17b8ac46a..ba2a90009d 100644 --- a/bitbake/lib/bb/tests/setup.py +++ b/bitbake/lib/bb/tests/setup.py | |||
| @@ -148,9 +148,10 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 148 | "oe-fragments": ["test-fragment-2"] | 148 | "oe-fragments": ["test-fragment-2"] |
| 149 | }, | 149 | }, |
| 150 | { | 150 | { |
| 151 | "name": "gizmo-notemplate-with-thisdir", | 151 | "name": "gizmo-notemplate-with-relative-layers", |
| 152 | "description": "Gizmo notemplate configuration using THISDIR", | 152 | "description": "Gizmo notemplate configuration using relative layers", |
| 153 | "bb-layers": ["layerC","layerD/meta-layer","{THISDIR}/layerE/meta-layer"], | 153 | "bb-layers": ["layerC","layerD/meta-layer"], |
| 154 | "bb-layers-relative": ["layerE/meta-layer"], | ||
| 154 | "oe-fragments": ["test-fragment-2"] | 155 | "oe-fragments": ["test-fragment-2"] |
| 155 | } | 156 | } |
| 156 | ] | 157 | ] |
| @@ -177,14 +178,22 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 177 | self.git('add {}'.format(name), cwd=self.testrepopath) | 178 | self.git('add {}'.format(name), cwd=self.testrepopath) |
| 178 | self.git('commit -m "Adding {}"'.format(name), cwd=self.testrepopath) | 179 | self.git('commit -m "Adding {}"'.format(name), cwd=self.testrepopath) |
| 179 | 180 | ||
| 180 | def check_setupdir_files(self, setuppath, test_file_content, json_config): | 181 | def check_setupdir_files(self, setuppath, test_file_content): |
| 182 | with open(os.path.join(setuppath, 'config', "config-upstream.json")) as f: | ||
| 183 | config_upstream = json.load(f) | ||
| 181 | with open(os.path.join(setuppath, 'layers', 'test-repo', 'test-file')) as f: | 184 | with open(os.path.join(setuppath, 'layers', 'test-repo', 'test-file')) as f: |
| 182 | self.assertEqual(f.read(), test_file_content) | 185 | self.assertEqual(f.read(), test_file_content) |
| 183 | bitbake_config = json_config["bitbake-config"] | 186 | bitbake_config = config_upstream["bitbake-config"] |
| 184 | bb_build_path = os.path.join(setuppath, 'build') | 187 | bb_build_path = os.path.join(setuppath, 'build') |
| 185 | bb_conf_path = os.path.join(bb_build_path, 'conf') | 188 | bb_conf_path = os.path.join(bb_build_path, 'conf') |
| 186 | self.assertTrue(os.path.exists(os.path.join(bb_build_path, 'init-build-env'))) | 189 | self.assertTrue(os.path.exists(os.path.join(bb_build_path, 'init-build-env'))) |
| 187 | 190 | ||
| 191 | with open(os.path.join(setuppath, 'config', "sources-fixed-revisions.json")) as f: | ||
| 192 | sources_fixed_revisions = json.load(f) | ||
| 193 | self.assertTrue('test-repo' in sources_fixed_revisions['sources'].keys()) | ||
| 194 | revision = self.git('rev-parse HEAD', cwd=self.testrepopath).strip() | ||
| 195 | self.assertEqual(revision, sources_fixed_revisions['sources']['test-repo']['git-remote']['rev']) | ||
| 196 | |||
| 188 | if "oe-template" in bitbake_config: | 197 | if "oe-template" in bitbake_config: |
| 189 | with open(os.path.join(bb_conf_path, 'conf-summary.txt')) as f: | 198 | with open(os.path.join(bb_conf_path, 'conf-summary.txt')) as f: |
| 190 | self.assertEqual(f.read(), bitbake_config["oe-template"]) | 199 | self.assertEqual(f.read(), bitbake_config["oe-template"]) |
| @@ -196,14 +205,13 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 196 | with open(os.path.join(bb_conf_path, 'bblayers.conf')) as f: | 205 | with open(os.path.join(bb_conf_path, 'bblayers.conf')) as f: |
| 197 | bblayers = f.read() | 206 | bblayers = f.read() |
| 198 | for l in bitbake_config["bb-layers"]: | 207 | for l in bitbake_config["bb-layers"]: |
| 199 | if l.startswith('{THISDIR}/'): | 208 | self.assertIn(os.path.join(setuppath, "layers", l), bblayers) |
| 200 | thisdir_layer = os.path.join( | 209 | for l in bitbake_config.get("bb-layers-relative") or []: |
| 201 | os.path.dirname(json_config["path"]), | 210 | relative_layer = os.path.join( |
| 202 | l.removeprefix("{THISDIR}/"), | 211 | os.path.dirname(config_upstream["path"]), |
| 212 | l, | ||
| 203 | ) | 213 | ) |
| 204 | self.assertIn(thisdir_layer, bblayers) | 214 | self.assertIn(relative_layer, bblayers) |
| 205 | else: | ||
| 206 | self.assertIn(os.path.join(setuppath, "layers", l), bblayers) | ||
| 207 | 215 | ||
| 208 | if 'oe-fragment' in bitbake_config.keys(): | 216 | if 'oe-fragment' in bitbake_config.keys(): |
| 209 | for f in bitbake_config["oe-fragments"]: | 217 | for f in bitbake_config["oe-fragments"]: |
| @@ -290,15 +298,13 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 290 | 'gizmo-env-passthrough', | 298 | 'gizmo-env-passthrough', |
| 291 | 'gizmo-no-fragment', | 299 | 'gizmo-no-fragment', |
| 292 | 'gadget-notemplate','gizmo-notemplate', | 300 | 'gadget-notemplate','gizmo-notemplate', |
| 293 | 'gizmo-notemplate-with-thisdir')} | 301 | 'gizmo-notemplate-with-relative-layers')} |
| 294 | } | 302 | } |
| 295 | for cf, v in test_configurations.items(): | 303 | for cf, v in test_configurations.items(): |
| 296 | for c in v['buildconfigs']: | 304 | for c in v['buildconfigs']: |
| 297 | out = self.runbbsetup("init --non-interactive {} {}".format(v['cmdline'], c)) | 305 | out = self.runbbsetup("init --non-interactive {} {}".format(v['cmdline'], c)) |
| 298 | setuppath = os.path.join(self.tempdir, 'bitbake-builds', '{}-{}'.format(cf, c)) | 306 | setuppath = os.path.join(self.tempdir, 'bitbake-builds', '{}-{}'.format(cf, c)) |
| 299 | with open(os.path.join(setuppath, 'config', "config-upstream.json")) as f: | 307 | self.check_setupdir_files(setuppath, test_file_content) |
| 300 | config_upstream = json.load(f) | ||
| 301 | self.check_setupdir_files(setuppath, test_file_content, config_upstream) | ||
| 302 | os.environ['BBPATH'] = os.path.join(setuppath, 'build') | 308 | os.environ['BBPATH'] = os.path.join(setuppath, 'build') |
| 303 | out = self.runbbsetup("status") | 309 | out = self.runbbsetup("status") |
| 304 | self.assertIn("Configuration in {} has not changed".format(setuppath), out[0]) | 310 | self.assertIn("Configuration in {} has not changed".format(setuppath), out[0]) |
| @@ -327,9 +333,7 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 327 | if c in ('gadget', 'gizmo'): | 333 | if c in ('gadget', 'gizmo'): |
| 328 | self.assertIn("Existing bitbake configuration directory renamed to {}/build/conf-backup.".format(setuppath), out[0]) | 334 | self.assertIn("Existing bitbake configuration directory renamed to {}/build/conf-backup.".format(setuppath), out[0]) |
| 329 | self.assertIn('-{}+{}'.format(prev_test_file_content, test_file_content), out[0]) | 335 | self.assertIn('-{}+{}'.format(prev_test_file_content, test_file_content), out[0]) |
| 330 | with open(os.path.join(setuppath, 'config', "config-upstream.json")) as f: | 336 | self.check_setupdir_files(setuppath, test_file_content) |
| 331 | config_upstream = json.load(f) | ||
| 332 | self.check_setupdir_files(setuppath, test_file_content, config_upstream) | ||
| 333 | 337 | ||
| 334 | # make a new branch in the test layer repo, change a file on that branch, | 338 | # make a new branch in the test layer repo, change a file on that branch, |
| 335 | # make a new commit, update the top level json config to refer to that branch, | 339 | # make a new commit, update the top level json config to refer to that branch, |
| @@ -353,6 +357,4 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) | |||
| 353 | if c in ('gadget', 'gizmo'): | 357 | if c in ('gadget', 'gizmo'): |
| 354 | self.assertIn("Existing bitbake configuration directory renamed to {}/build/conf-backup.".format(setuppath), out[0]) | 358 | self.assertIn("Existing bitbake configuration directory renamed to {}/build/conf-backup.".format(setuppath), out[0]) |
| 355 | self.assertIn('-{}+{}'.format(prev_test_file_content, test_file_content), out[0]) | 359 | self.assertIn('-{}+{}'.format(prev_test_file_content, test_file_content), out[0]) |
| 356 | with open(os.path.join(setuppath, 'config', "config-upstream.json")) as f: | 360 | self.check_setupdir_files(setuppath, test_file_content) |
| 357 | config_upstream = json.load(f) | ||
| 358 | self.check_setupdir_files(setuppath, test_file_content, config_upstream) | ||
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.24.51.bb b/meta/recipes-gnome/gtk+/gtk+3_3.24.51.bb index d4fe121733..690d5a2dcd 100644 --- a/meta/recipes-gnome/gtk+/gtk+3_3.24.51.bb +++ b/meta/recipes-gnome/gtk+/gtk+3_3.24.51.bb | |||
| @@ -15,15 +15,16 @@ DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf gdk-pixbuf-native" | |||
| 15 | 15 | ||
| 16 | LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later" | 16 | LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later" |
| 17 | 17 | ||
| 18 | inherit meson gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection | 18 | GNOMEBN = "gtk" |
| 19 | 19 | ||
| 20 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" | 20 | inherit gettext gnomebase gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection |
| 21 | SRC_URI = "${GNOME_MIRROR}/gtk/${MAJ_VER}/gtk-${PV}.tar.xz \ | 21 | |
| 22 | SRC_URI += "\ | ||
| 22 | file://opengl.patch \ | 23 | file://opengl.patch \ |
| 23 | " | 24 | " |
| 24 | SRC_URI[sha256sum] = "0013877c6bd23c2dbe42ad7c70a053d0e449be66736574e37867c49c5f905a4f" | 25 | SRC_URI[archive.sha256sum] = "0013877c6bd23c2dbe42ad7c70a053d0e449be66736574e37867c49c5f905a4f" |
| 25 | 26 | ||
| 26 | S = "${UNPACKDIR}/gtk-${PV}" | 27 | S = "${UNPACKDIR}/${GNOMEBN}-${PV}" |
| 27 | 28 | ||
| 28 | BBCLASSEXTEND = "native nativesdk" | 29 | BBCLASSEXTEND = "native nativesdk" |
| 29 | 30 | ||
| @@ -104,7 +105,6 @@ FILES:${PN}:append = " ${bindir}/gtk-update-icon-cache-3.0 \ | |||
| 104 | ${bindir}/gtk-query-immodules-3.0 \ | 105 | ${bindir}/gtk-query-immodules-3.0 \ |
| 105 | ${bindir}/gtk-launch \ | 106 | ${bindir}/gtk-launch \ |
| 106 | ${datadir}/themes ${datadir}/gtk-3.0/emoji \ | 107 | ${datadir}/themes ${datadir}/gtk-3.0/emoji \ |
| 107 | ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ | ||
| 108 | ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ | 108 | ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ |
| 109 | ${libdir}/gtk-3.0/modules/*.so" | 109 | ${libdir}/gtk-3.0/modules/*.so" |
| 110 | 110 | ||
