Don't add a newline to stderr dumps on failing commands, the logger does
that already. And don't print success messages if the fetch command
actually failed.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
With Sphinx it is possible to create the command line documentation
automatically if there is a function that returns just the command line
parser.
Currently the creation of the argument parser is rather entangled with
the rest of kas. This patches seperates this.
Signed-off-by: Claudius Heine <ch@denx.de>
When updating the previously used version of pylint 1.6.5 to 1.7.2
some new issues where found.
This patch fixes these issues:
************* Module kas.config
E:402, 0: Bad option value 'redefined-variable-type' (bad-option-value)
************* Module kas.includehandler
E: 33, 0: No name 'version' in module 'distutils' (no-name-in-module)
E: 33, 0: Unable to import 'distutils.version' (import-error)
R:239,12: Unnecessary "else" after "return" (no-else-return)
************* Module kas.libkas
C:214, 7: Do not use `len(SEQUENCE)` as condition value
(len-as-condition)
************* Module kas.repos
R: 54,12: Unnecessary "else" after "return" (no-else-return)
Signed-off-by: Claudius Heine <ch@denx.de>
Building on top of run_cmd_async, this reworks repo_fetch to a
repository list fetcher repos_fetch that runs those operations in
parallel.
The two users, ReposFetch and ConfigStatic, are converted to exploit
this parallelization.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Enhance _stream_subprocess to run_cmd_async, a co-routine variant of
run_cmd that the caller can use to parallelize command execution.
run_cmd becomes a simple wrapper that waits for the async variant to
complete.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Instead of writing "commit", issue a more telling log message if some
repo already contains the required hash.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The two code paths are unfortunate. Factor out the difference and use a
single run_cmd invocation. This also adds the forgotten -q when using
a reference directory.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The current implementation did some more hackish solution to work
around some of kas infrastructure, without changing to much.
This patch cleans this up and therefor remove the more obsure part
of the include mechansim.
Signed-off-by: Claudius Heine <ch@denx.de>
Isar allows to build Debian-based images using bitbake and the usual
layer structures. It's very similar to OE, we just need to account for
a different init script name.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Currently the shell provided via the 'shell' command is always '/bin/sh'
and does not have a TERM variable set. This is a rather spartan shell
experience.
With this patch we add the TERM variable to the whitelist, so that
pagers work better and made the shell binary dependent from the SHELL
environment variable. If no such variable is set, we fall back to using
'/bin/sh'.
Signed-off-by: Claudius Heine <ch@denx.de>
The ssh-agent environment variables of an ssh-agent that is running
outside the kas build system are not transfered to the bitbake
environment. This causes fetching of private git repositories to
fail.
This patch adds those variables to the environment whitelist.
Signed-off-by: Claudius Heine <ch@denx.de>