diff options
| -rwxr-xr-x | bitbake/lib/bb/main.py | 135 |
1 files changed, 69 insertions, 66 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index c1f14be285..3978a1bc3c 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py | |||
| @@ -137,103 +137,106 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): | |||
| 137 | It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which | 137 | It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which |
| 138 | will provide the layer, BBFILES and other configuration information.""") | 138 | will provide the layer, BBFILES and other configuration information.""") |
| 139 | 139 | ||
| 140 | parser.add_option("-b", "--buildfile", help="Execute tasks from a specific .bb recipe directly. WARNING: Does not handle any dependencies from other recipes.", | 140 | parser.add_option("-b", "--buildfile", action="store", dest="buildfile", default=None, |
| 141 | action="store", dest="buildfile", default=None) | 141 | help="Execute tasks from a specific .bb recipe directly. WARNING: Does not handle any dependencies from other recipes.") |
| 142 | parser.add_option("-k", "--continue", action="store_false", dest="abort", default=True, | ||
| 143 | help="Continue as much as possible after an error. While the target that failed and anything depending on it cannot be built, as much as possible will be built before stopping.") | ||
| 142 | 144 | ||
| 143 | parser.add_option("-k", "--continue", help="Continue as much as possible after an error. While the target that failed and anything depending on it cannot be built, as much as possible will be built before stopping.", | 145 | parser.add_option("-a", "--tryaltconfigs", action="store_true", dest="tryaltconfigs", default=False, |
| 144 | action="store_false", dest="abort", default=True) | 146 | help="Continue with builds by trying to use alternative providers where possible.") |
| 145 | 147 | ||
| 146 | parser.add_option("-a", "--tryaltconfigs", help="Continue with builds by trying to use alternative providers where possible.", | 148 | parser.add_option("-f", "--force", action="store_true", dest="force", default=False, |
| 147 | action="store_true", dest="tryaltconfigs", default=False) | 149 | help="Force the specified targets/task to run (invalidating any existing stamp file).") |
| 148 | 150 | ||
| 149 | parser.add_option("-f", "--force", help="Force the specified targets/task to run (invalidating any existing stamp file).", | 151 | parser.add_option("-c", "--cmd", action="store", dest="cmd", |
| 150 | action="store_true", dest="force", default=False) | 152 | help="Specify the task to execute. The exact options available depend on the metadata. Some examples might be 'compile' or 'populate_sysroot' or 'listtasks' may give a list of the tasks available.") |
| 151 | 153 | ||
| 152 | parser.add_option("-c", "--cmd", help="Specify the task to execute. The exact options available depend on the metadata. Some examples might be 'compile' or 'populate_sysroot' or 'listtasks' may give a list of the tasks available.", | 154 | parser.add_option("-C", "--clear-stamp", action="store", dest="invalidate_stamp", |
| 153 | action="store", dest="cmd") | 155 | help="Invalidate the stamp for the specified task such as 'compile' and then run the default task for the specified target(s).") |
| 154 | 156 | ||
| 155 | parser.add_option("-C", "--clear-stamp", help="Invalidate the stamp for the specified task such as 'compile' and then run the default task for the specified target(s).", | 157 | parser.add_option("-r", "--read", action="append", dest="prefile", default=[], |
| 156 | action="store", dest="invalidate_stamp") | 158 | help="Read the specified file before bitbake.conf.") |
| 157 | 159 | ||
| 158 | parser.add_option("-r", "--read", help="Read the specified file before bitbake.conf.", | 160 | parser.add_option("-R", "--postread", action="append", dest="postfile", default=[], |
| 159 | action="append", dest="prefile", default=[]) | 161 | help="Read the specified file after bitbake.conf.") |
| 160 | 162 | ||
| 161 | parser.add_option("-R", "--postread", help="Read the specified file after bitbake.conf.", | 163 | parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, |
| 162 | action="append", dest="postfile", default=[]) | 164 | help="Output more log message data to the terminal.") |
| 163 | 165 | ||
| 164 | parser.add_option("-v", "--verbose", help="Output more log message data to the terminal.", | 166 | parser.add_option("-D", "--debug", action="count", dest="debug", default=0, |
| 165 | action="store_true", dest="verbose", default=False) | 167 | help="Increase the debug level. You can specify this more than once.") |
| 166 | 168 | ||
| 167 | parser.add_option("-D", "--debug", help="Increase the debug level. You can specify this more than once.", | 169 | parser.add_option("-n", "--dry-run", action="store_true", dest="dry_run", default=False, |
| 168 | action="count", dest="debug", default=0) | 170 | help="Don't execute, just go through the motions.") |
| 169 | 171 | ||
| 170 | parser.add_option("-n", "--dry-run", help="Don't execute, just go through the motions.", | 172 | parser.add_option("-S", "--dump-signatures", action="append", dest="dump_signatures", |
| 171 | action="store_true", dest="dry_run", default=False) | 173 | default=[], metavar="SIGNATURE_HANDLER", |
| 174 | help="Dump out the signature construction information, with no task execution. The SIGNATURE_HANDLER parameter is passed to the handler. Two common values are none and printdiff but the handler may define more/less. none means only dump the signature, printdiff means compare the dumped signature with the cached one.") | ||
| 172 | 175 | ||
| 173 | parser.add_option("-S", "--dump-signatures", help="Dump out the signature construction information, with no task execution. The SIGNATURE_HANDLER parameter is passed to the handler. Two common values are none and printdiff but the handler may define more/less. none means only dump the signature, printdiff means compare the dumped signature with the cached one.", | 176 | parser.add_option("-p", "--parse-only", action="store_true", dest="parse_only", default=False, |
| 174 | action="append", dest="dump_signatures", default=[], metavar="SIGNATURE_HANDLER") | 177 | help="Quit after parsing the BB recipes.") |
| 175 | 178 | ||
| 176 | parser.add_option("-p", "--parse-only", help="Quit after parsing the BB recipes.", | 179 | parser.add_option("-s", "--show-versions", action="store_true", dest="show_versions", default=False, |
| 177 | action="store_true", dest="parse_only", default=False) | 180 | help="Show current and preferred versions of all recipes.") |
| 178 | 181 | ||
| 179 | parser.add_option("-s", "--show-versions", help="Show current and preferred versions of all recipes.", | 182 | parser.add_option("-e", "--environment", action="store_true", dest="show_environment", default=False, |
| 180 | action="store_true", dest="show_versions", default=False) | 183 | help="Show the global or per-recipe environment complete with information about where variables were set/changed.") |
| 181 | 184 | ||
| 182 | parser.add_option("-e", "--environment", help="Show the global or per-recipe environment complete with information about where variables were set/changed.", | 185 | parser.add_option("-g", "--graphviz", action="store_true", dest="dot_graph", default=False, |
| 183 | action="store_true", dest="show_environment", default=False) | 186 | help="Save dependency tree information for the specified targets in the dot syntax.") |
| 184 | 187 | ||
| 185 | parser.add_option("-g", "--graphviz", help="Save dependency tree information for the specified targets in the dot syntax.", | 188 | parser.add_option("-I", "--ignore-deps", action="append", dest="extra_assume_provided", default=[], |
| 186 | action="store_true", dest="dot_graph", default=False) | 189 | help="""Assume these dependencies don't exist and are already provided (equivalent to ASSUME_PROVIDED). Useful to make dependency graphs more appealing""") |
| 187 | 190 | ||
| 188 | parser.add_option("-I", "--ignore-deps", help="""Assume these dependencies don't exist and are already provided (equivalent to ASSUME_PROVIDED). Useful to make dependency graphs more appealing""", | 191 | parser.add_option("-l", "--log-domains", action="append", dest="debug_domains", default=[], |
| 189 | action="append", dest="extra_assume_provided", default=[]) | 192 | help="""Show debug logging for the specified logging domains""") |
| 190 | 193 | ||
| 191 | parser.add_option("-l", "--log-domains", help="""Show debug logging for the specified logging domains""", | 194 | parser.add_option("-P", "--profile", action="store_true", dest="profile", default=False, |
| 192 | action="append", dest="debug_domains", default=[]) | 195 | help="Profile the command and save reports.") |
| 193 | |||
| 194 | parser.add_option("-P", "--profile", help="Profile the command and save reports.", | ||
| 195 | action="store_true", dest="profile", default=False) | ||
| 196 | 196 | ||
| 197 | # @CHOICES@ is substituted out by BitbakeHelpFormatter above | 197 | # @CHOICES@ is substituted out by BitbakeHelpFormatter above |
| 198 | parser.add_option("-u", "--ui", help="The user interface to use (@CHOICES@ - default %default).", | 198 | parser.add_option("-u", "--ui", action="store", dest="ui", default=os.environ.get('BITBAKE_UI', 'knotty'), |
| 199 | action="store", dest="ui", default=os.environ.get('BITBAKE_UI', 'knotty')) | 199 | help="The user interface to use (@CHOICES@ - default %default).") |
| 200 | 200 | ||
| 201 | # @CHOICES@ is substituted out by BitbakeHelpFormatter above | 201 | # @CHOICES@ is substituted out by BitbakeHelpFormatter above |
| 202 | parser.add_option("-t", "--servertype", help="Choose which server type to use (@CHOICES@ - default %default).", | 202 | parser.add_option("-t", "--servertype", action="store", dest="servertype", |
| 203 | action="store", dest="servertype", default=["process", "xmlrpc"]["BBSERVER" in os.environ]) | 203 | default=["process", "xmlrpc"]["BBSERVER" in os.environ], |
| 204 | help="Choose which server type to use (@CHOICES@ - default %default).") | ||
| 204 | 205 | ||
| 205 | parser.add_option("", "--token", help="Specify the connection token to be used when connecting to a remote server.", | 206 | parser.add_option("", "--token", action="store", dest="xmlrpctoken", default=os.environ.get("BBTOKEN"), |
| 206 | action="store", dest="xmlrpctoken", default=os.environ.get("BBTOKEN")) | 207 | help="Specify the connection token to be used when connecting to a remote server.") |
| 207 | 208 | ||
| 208 | parser.add_option("", "--revisions-changed", help="Set the exit code depending on whether upstream floating revisions have changed or not.", | 209 | parser.add_option("", "--revisions-changed", action="store_true", dest="revisions_changed", default=False, |
| 209 | action="store_true", dest="revisions_changed", default=False) | 210 | help="Set the exit code depending on whether upstream floating revisions have changed or not.") |
| 210 | 211 | ||
| 211 | parser.add_option("", "--server-only", help="Run bitbake without a UI, only starting a server (cooker) process.", | 212 | parser.add_option("", "--server-only", action="store_true", dest="server_only", default=False, |
| 212 | action="store_true", dest="server_only", default=False) | 213 | help="Run bitbake without a UI, only starting a server (cooker) process.") |
| 213 | 214 | ||
| 214 | parser.add_option("-B", "--bind", help="The name/address for the bitbake server to bind to.", | 215 | parser.add_option("-B", "--bind", action="store", dest="bind", default=False, |
| 215 | action="store", dest="bind", default=False) | 216 | help="The name/address for the bitbake server to bind to.") |
| 216 | 217 | ||
| 217 | parser.add_option("", "--no-setscene", help="Do not run any setscene tasks. sstate will be ignored and everything needed, built.", | 218 | parser.add_option("", "--no-setscene", action="store_true", dest="nosetscene", default=False, |
| 218 | action="store_true", dest="nosetscene", default=False) | 219 | help="Do not run any setscene tasks. sstate will be ignored and everything needed, built.") |
| 219 | 220 | ||
| 220 | parser.add_option("", "--setscene-only", help="Only run setscene tasks, don't run any real tasks.", | 221 | parser.add_option("", "--setscene-only", action="store_true", dest="setsceneonly", default=False, |
| 221 | action="store_true", dest="setsceneonly", default=False) | 222 | help="Only run setscene tasks, don't run any real tasks.") |
| 222 | 223 | ||
| 223 | parser.add_option("", "--remote-server", help="Connect to the specified server.", | 224 | parser.add_option("", "--remote-server", action="store", dest="remote_server", |
| 224 | action="store", dest="remote_server", default=os.environ.get("BBSERVER")) | 225 | default=os.environ.get("BBSERVER"), |
| 226 | help="Connect to the specified server.") | ||
| 225 | 227 | ||
| 226 | parser.add_option("-m", "--kill-server", help="Terminate the remote server.", | 228 | parser.add_option("-m", "--kill-server", action="store_true", dest="kill_server", default=False, |
| 227 | action="store_true", dest="kill_server", default=False) | 229 | help="Terminate the remote server.") |
| 228 | 230 | ||
| 229 | parser.add_option("", "--observe-only", help="Connect to a server as an observing-only client.", | 231 | parser.add_option("", "--observe-only", action="store_true", dest="observe_only", default=False, |
| 230 | action="store_true", dest="observe_only", default=False) | 232 | help="Connect to a server as an observing-only client.") |
| 231 | 233 | ||
| 232 | parser.add_option("", "--status-only", help="Check the status of the remote bitbake server.", | 234 | parser.add_option("", "--status-only", action="store_true", dest="status_only", default=False, |
| 233 | action="store_true", dest="status_only", default=False) | 235 | help="Check the status of the remote bitbake server.") |
| 234 | 236 | ||
| 235 | parser.add_option("-w", "--write-log", help="Writes the event log of the build to a bitbake event json file. Use '' (empty string) to assign the name automatically.", | 237 | parser.add_option("-w", "--write-log", action="store", dest="writeeventlog", |
| 236 | action="store", dest="writeeventlog", default=os.environ.get("BBEVENTLOG")) | 238 | default=os.environ.get("BBEVENTLOG"), |
| 239 | help="Writes the event log of the build to a bitbake event json file. Use '' (empty string) to assign the name automatically.") | ||
| 237 | 240 | ||
| 238 | options, targets = parser.parse_args(argv) | 241 | options, targets = parser.parse_args(argv) |
| 239 | 242 | ||
| @@ -365,7 +368,7 @@ def bitbake_main(configParams, configuration): | |||
| 365 | configuration.debug = level | 368 | configuration.debug = level |
| 366 | 369 | ||
| 367 | bb.msg.init_msgconfig(configParams.verbose, configuration.debug, | 370 | bb.msg.init_msgconfig(configParams.verbose, configuration.debug, |
| 368 | configuration.debug_domains) | 371 | configuration.debug_domains) |
| 369 | 372 | ||
| 370 | # Ensure logging messages get sent to the UI as events | 373 | # Ensure logging messages get sent to the UI as events |
| 371 | handler = bb.event.LogHandler() | 374 | handler = bb.event.LogHandler() |
