mirror of
https://git.yoctoproject.org/poky
synced 2026-07-17 04:07:06 +00:00
recipetool: create: support specifying a file as the local source
It is currently possible to specify a file (e.g. a tarball) on the local disk as the source, but you have to know to put file:// in front of it. There's really no need to force users to jump through that hoop if they really want to do this so check if the specified source is a file and prefix it with file:// if that's the case. Also ensure the same works for "devtool add" at the same time. (From OE-Core rev: 71350003790c38e84b0e525a71a2fe5d24e3d083) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
54486a1ac3
commit
f465039737
@@ -65,6 +65,10 @@ def add(args, config, basepath, workspace):
|
||||
elif os.path.isdir(args.recipename):
|
||||
logger.warn('Ambiguous argument %s - assuming you mean it to be the recipe name')
|
||||
|
||||
if args.srctree and os.path.isfile(args.srctree):
|
||||
args.fetchuri = 'file://' + os.path.abspath(args.srctree)
|
||||
args.srctree = ''
|
||||
|
||||
if args.fetch:
|
||||
if args.fetchuri:
|
||||
raise DevtoolError('URI specified as positional argument as well as -f/--fetch')
|
||||
|
||||
Reference in New Issue
Block a user