summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
authorJuan M Cruz Alcaraz <juan.m.cruz.alcaraz@linux.intel.com>2017-09-08 06:34:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-13 22:07:42 +0100
commit688e0894aa664090a88614e7cf9b77acadf42940 (patch)
treecae6d201b00fce27d476689ad046c75094e58bab /scripts/lib/recipetool/create.py
parent6cfb161ed9413783569df684dff7a96a19904bf8 (diff)
downloadpoky-688e0894aa664090a88614e7cf9b77acadf42940.tar.gz
devtool/standard: set a preferred provider when adding a new recipe with devtool
A recipe added with "devtool add" requires to be able to take precedence on recipes previously defined with PREFERRED_PROVIDER. By adding the parameter "--provides" to "devtool add" it is possible to specify an element to be provided by the recipe. A devtool recipe can override a previous PREFERRED_PROVIDER using the layer configuration file in the workspace. E.g. devtool add my-libgl git@git://my-libgl-repository --provides virtual/libgl [YOCTO #10415] (From OE-Core rev: adeea2fe6895898a5e6006e798898f0f5dabd890) Signed-off-by: Juan M Cruz Alcaraz <juan.m.cruz.alcaraz@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/recipetool/create.py')
-rw-r--r--scripts/lib/recipetool/create.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 4788691cff..ca474fce99 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -699,6 +699,8 @@ def create_recipe(args):
699 (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree) 699 (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
700 srcrev = stdout.rstrip() 700 srcrev = stdout.rstrip()
701 lines_before.append('SRCREV = "%s"' % srcrev) 701 lines_before.append('SRCREV = "%s"' % srcrev)
702 if args.provides:
703 lines_before.append('PROVIDES = "%s"' % args.provides)
702 lines_before.append('') 704 lines_before.append('')
703 705
704 if srcsubdir and not args.binary: 706 if srcsubdir and not args.binary:
@@ -1300,6 +1302,7 @@ def register_commands(subparsers):
1300 description='Creates a new recipe from a source tree') 1302 description='Creates a new recipe from a source tree')
1301 parser_create.add_argument('source', help='Path or URL to source') 1303 parser_create.add_argument('source', help='Path or URL to source')
1302 parser_create.add_argument('-o', '--outfile', help='Specify filename for recipe to create') 1304 parser_create.add_argument('-o', '--outfile', help='Specify filename for recipe to create')
1305 parser_create.add_argument('-p', '--provides', help='Specify an alias for the item provided by the recipe')
1303 parser_create.add_argument('-m', '--machine', help='Make recipe machine-specific as opposed to architecture-specific', action='store_true') 1306 parser_create.add_argument('-m', '--machine', help='Make recipe machine-specific as opposed to architecture-specific', action='store_true')
1304 parser_create.add_argument('-x', '--extract-to', metavar='EXTRACTPATH', help='Assuming source is a URL, fetch it and extract it to the directory specified as %(metavar)s') 1307 parser_create.add_argument('-x', '--extract-to', metavar='EXTRACTPATH', help='Assuming source is a URL, fetch it and extract it to the directory specified as %(metavar)s')
1305 parser_create.add_argument('-N', '--name', help='Name to use within recipe (PN)') 1308 parser_create.add_argument('-N', '--name', help='Name to use within recipe (PN)')