for fn in os.listdir(tempdir):
shutil.move(os.path.join(tempdir, fn), recipedir)
else:
- raise DevtoolError('Command \'%s\' did not create any recipe file:\n%s' % (e.command, e.stdout))
+ raise DevtoolError(f'Failed to create a recipe file for source {source}')
attic_recipe = os.path.join(config.workspace_path, 'attic', recipename, os.path.basename(recipefile))
if os.path.exists(attic_recipe):
logger.warning('A modified recipe from a previous invocation exists in %s - you may wish to move this over the top of the new recipe if you had changes in it that you want to continue with' % attic_recipe)
tempbasedir = d.getVar('WORKDIR')
bb.utils.mkdirhier(tempbasedir)
tempdir = tempfile.mkdtemp(prefix='devtooltmp-', dir=tempbasedir)
+ appendbackup = None
try:
tinfoil.logger.setLevel(logging.WARNING)
appendbackup = os.path.join(tempdir, os.path.basename(appendfile) + '.bak')
shutil.copyfile(appendfile, appendbackup)
else:
- appendbackup = None
bb.utils.mkdirhier(os.path.dirname(appendfile))
logger.debug('writing append file %s' % appendfile)
with open(appendfile, 'a') as f:
origfnver = ''
recipefilemd5 = None
+ newrecipefilemd5 = None
tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
try:
rd = parse_recipe(config, tinfoil, args.recipename, True)
# Rename source tree if it's the default path
appendmd5 = None
+ newappendmd5 = None
if not args.no_srctree:
srctree = workspace[args.recipename]['srctree']
if os.path.abspath(srctree) == os.path.join(config.workspace_path, 'sources', args.recipename):
# values, but they ought to be anyway...
new_basename = seqpatch_re.match(new_patch).group(2)
match_name = None
+ old_patch = None
for old_patch in existing_patches:
old_basename = seqpatch_re.match(old_patch).group(2)
old_basename_splitext = os.path.splitext(old_basename)
local_files_dir = tempfile.mkdtemp(dir=tempdir)
srctreebase = workspace[recipename]['srctreebase']
upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
+ removedentries = {}
if not no_remove:
# Find list of existing patches in recipe file
patches_dir = tempfile.mkdtemp(dir=tempdir)
for basepath, param in upd_p.items():
path = param['path']
patchdir = param.get('patchdir', ".")
+ patchdir_param = {}
if patchdir != "." :
patchdir_param = dict(patchdir_params)
if patchdir_param: