aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus/dbus/CVE-2019-12749.patch
blob: 393c70ca21cd45d3e0b3a3ac5006c911b57ce713 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
generated by cgit 1.2.3-korg (git 2.39.0) at 2024-04-28 05:20:55 +0000
 


="o">='subcommands', metavar='<subcommand>')
    subparsers.required = True

    if global_args.debug:
        logger.setLevel(logging.DEBUG)
    elif global_args.quiet:
        logger.setLevel(logging.ERROR)

    import scriptpath
    bitbakepath = scriptpath.add_bitbake_lib_path()
    if not bitbakepath:
        logger.error("Unable to find bitbake by searching parent directory of this script or PATH")
        sys.exit(1)
    logger.debug('Found bitbake path: %s' % bitbakepath)
    scriptpath.add_oe_lib_path()

    scriptutils.logger_setup_color(logger, global_args.color)

    tinfoil = tinfoil_init(False)
    try:
        for path in (tinfoil.config_data.getVar('BBPATH').split(':')
                     + [scripts_path]):
            pluginpath = os.path.join(path, 'lib', 'recipetool')
            scriptutils.load_plugins(logger, plugins, pluginpath)

        registered = False
        for plugin in plugins:
            if hasattr(plugin, 'register_commands'):
                registered = True
                plugin.register_commands(subparsers)
            elif hasattr(plugin, 'register_command'):
                # Legacy function name
                registered = True
                plugin.register_command(subparsers)
            if hasattr(plugin, 'tinfoil_init'):
                plugin.tinfoil_init(tinfoil)

        if not registered:
            logger.error("No commands registered - missing plugins?")
            sys.exit(1)

        args = parser.parse_args(unparsed_args, namespace=global_args)

        try:
            if getattr(args, 'parserecipes', False):
                tinfoil.config_data.disableTracking()
                tinfoil.parseRecipes()
                tinfoil.config_data.enableTracking()
            ret = args.func(args)
        except bb.BBHandledException:
            ret = 1
    finally:
        tinfoil.shutdown()

    return ret


if __name__ == "__main__":
    try:
        ret = main()
    except Exception:
        ret = 1
        import traceback
        traceback.print_exc()
    sys.exit(ret)