@@ -34,6 +34,7 @@ def main():
parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
parser.add_argument('-F', '--force', help='Force add without recipe parse verification', action='store_true')
+ parser.add_argument('-T', '--notinfoil', help='Force run without tinfoil, this might fail.', action='store_true')
parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR')
global_args, unparsed_args = parser.parse_known_args()
@@ -59,16 +60,21 @@ def main():
plugins = []
tinfoil = bb.tinfoil.Tinfoil(tracking=True)
tinfoil.logger.setLevel(logger.getEffectiveLevel())
- try:
+ if global_args.notinfoil:
+ bbpath_string = []
+ else:
tinfoil.prepare(True)
- for path in ([topdir] +
- tinfoil.config_data.getVar('BBPATH').split(':')):
+ bbpath_string = tinfoil.config_data.getVar('BBPATH').split(':')
+ print(bbpath_string)
+
+ try:
+ for path in ([topdir] + bbpath_string):
pluginpath = os.path.join(path, 'lib', 'bblayers')
bb.utils.load_plugins(logger, plugins, pluginpath)
-
registered = False
+
for plugin in plugins:
- if hasattr(plugin, 'tinfoil_init'):
+ if hasattr(plugin, 'tinfoil_init') and not global_args.notinfoil:
plugin.tinfoil_init(tinfoil)
if hasattr(plugin, 'register_commands'):
registered = True
@@ -50,8 +50,8 @@ class ActionPlugin(LayerPlugin):
try:
notadded, _ = bb.utils.edit_bblayers_conf(bblayers_conf, layerdirs, None)
- self.tinfoil.modified_files()
- if not (args.force or notadded):
+ if not (args.force or notadded or args.notinfoil):
+ self.tinfoil.modified_files()
try:
self.tinfoil.run_command('parseConfiguration')
except (bb.tinfoil.TinfoilUIException, bb.BBHandledException):
@@ -83,6 +83,8 @@ class ActionPlugin(LayerPlugin):
layerdir = os.path.abspath(item)
layerdirs.append(layerdir)
(_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdirs)
+ if args.notinfoil:
+ return 0
self.tinfoil.modified_files()
if notremoved:
for item in notremoved: