diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-07-07 11:57:08 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-12 23:10:15 +0100 |
commit | f465039737112a3975ad3b224a9351e4ac780088 (patch) | |
tree | 9aa0c77eff754161014e7993405d6004ebf9d149 /scripts/lib/devtool | |
parent | 54486a1ac30ff47e44be188db7c56e0917413799 (diff) | |
download | poky-f465039737112a3975ad3b224a9351e4ac780088.tar.gz |
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>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r-- | scripts/lib/devtool/standard.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 645a61f25b..f2ba69976f 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -65,6 +65,10 @@ def add(args, config, basepath, workspace): | |||
65 | elif os.path.isdir(args.recipename): | 65 | elif os.path.isdir(args.recipename): |
66 | logger.warn('Ambiguous argument %s - assuming you mean it to be the recipe name') | 66 | logger.warn('Ambiguous argument %s - assuming you mean it to be the recipe name') |
67 | 67 | ||
68 | if args.srctree and os.path.isfile(args.srctree): | ||
69 | args.fetchuri = 'file://' + os.path.abspath(args.srctree) | ||
70 | args.srctree = '' | ||
71 | |||
68 | if args.fetch: | 72 | if args.fetch: |
69 | if args.fetchuri: | 73 | if args.fetchuri: |
70 | raise DevtoolError('URI specified as positional argument as well as -f/--fetch') | 74 | raise DevtoolError('URI specified as positional argument as well as -f/--fetch') |