Bug 7512

Summary: recipetool: -m option doesn't work
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Yi Zhao <yi.zhao>
Component: meta-yoctoAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED NOTABUG QA Contact: Alexandru Georgescu <alexandru.c.georgescu>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, ke.zou, poky.bs.watcher, poky.watcher, zhangle.yang
Version: 1.8   
Target Milestone: 1.8 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: New (Never tested)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yi Zhao 2015-03-25 02:51:48 UTC
Git rev: master/369932178fe9e7aa4a6d0e2ef1e2e539be701d02

Steps:
Run command:

recipetool create -m qemuarm -o snake_0.11.1.bb -x /tmp/snake-0.11.1 https://fedorahosted.org/releases/s/n/snake/snake-0.11.1.tar.bz2

I got the following error:
####################
usage: recipetool [-h] [-d] [-q] [--color COLOR] <subcommand> ...
recipetool: error: unrecognized arguments: https://fedorahosted.org/releases/s/n/snake/snake-0.11.1.tar.bz2
####################

If I removed the -m option, the command worked well:

recipetool create -o snake_0.11.1.bb -x /tmp/snake-0.11.1 https://fedorahosted.org/releases/s/n/snake/snake-0.11.1.tar.bz2

NOTE: Fetching https://fedorahosted.org/releases/s/n/snake/snake-0.11.1.tar.bz2...
NOTE: Scanning the entire source tree, as one or more of the following setup keywords are non-literal: py_modules, scripts, packages.
NOTE: Scanning paths for packages & dependencies: .
NOTE: Recipe snake_0.11.1.bb has been created; further editing may be required to make it fully functional
Comment 1 Paul Eggleton 2015-03-28 05:09:20 UTC
The -m option doesn't accept an argument (a recipe is either machine-specific or it isn't, it's not a case of specifying the actual machine) therefore it's being handled as a positional argument, hence the error.
Comment 2 Alexandru Georgescu 2015-03-30 08:14:32 UTC
(In reply to comment #1)
> The -m option doesn't accept an argument (a recipe is either
> machine-specific or it isn't, it's not a case of specifying the actual
> machine) therefore it's being handled as a positional argument, hence the
> error.

Verified as per above comment.