pylint has been a great tool to get the initial code base into shape
but since then we mostely false postives. All those warnings needed to
be annonated.
This allong wouldn't be reason enough to remove it. The main problem
is that the pylint version on gitlab is updated in the back and
suddenly we get new warnings which are bogus.
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
Divide the SetupRepos command into three parts: init, step and finish
Build a macro-based loop with the step part of the function.
Rewrite this in build.py and shell.py
Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
To keep the macro style of the program flow and explicitely state the
command sequence with Macro.add, we need a mechanism that repeats
several steps of the Macro depending on a given condition. This will be
used by the repo checkout logic.
Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
If a kas-file inside a repo includes another kas-file form a repo
which is not checked-out, and this 2nd repo can only be checked-out
with an SSH-key, kas fails. This is, because the constructor of
the Config class used to fetch missing repos already before the
SSH-Agent was setup.
This patch refactors the way in which kas checks-out repositories. This
also required the Config class to be split into Context and Config,
where the new Context is the build-Context, i.e. containing the
environment of commands executed by kas and the new Config is the Config
of kas itself, i.e. containing the repo dictionary.
This way it is possible to initialize the context needed for SSH setup
independently of the kas configuration.
The commands ReposFetch and ReposCheckout are refactored into a
SetupRepos command. This command parses the include files and
successively checks-out needed repos and updates the config as long
as repos are missing. The logic is taken directly from the constructor
of the former Config class (with minor adaptations).
Further refactoring will be needed to clean up the conceptual
programming patterns (i.e. to keep the Macro-Style consistent),
and to re-add the macro pattern regarding the above ReposFetch.
Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
Copying the .gitconfig failes if the current user doesn't have one,
since the commits that are done within kas, will not be pushed or
merged anywhere, we can just create a minimal .gitconfig in the temp
home directory of kas.
Signed-off-by: Claudius Heine <ch@denx.de>
With this commit its now possible to patch 3rd party repos before bitbake is started.
Example:
This is our repo:
.
├── kas.yml
├── first-patch.patch
└── quilt-patches
├── second-patch.patch
├── third-patch.patch
└── series
Content of kas.yml:
header:
version: 8
repos:
my:
third-party:
url: "git://example.com/third-party.git"
refspec: "35adf4...34"
patches:
01-first:
repo: my
path: "first-patch.patch"
02-second:
repo: my
path: "quilt-patches"
Currently only 'git' repositories can be patched.
Signed-off-by: Claudius Heine <ch@denx.de>
Otherwise we cannot overwrite them in mulitconfig files. It's not
expected that anything else in the layer config files sets those
variable, thus shadows our setting in local.conf.
Something changed in latest bitbake to reveal this issue. We first see
it in Isar since bitbake moved to f8126aaf7741.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This could happen if you use kas to checkout repos that do not contain
the directory. i.e. repos that are not actually bb layers
Signed-off-by: Henning Schild <henning.schild@siemens.com>
This patch adds multiconfig support to kas by defining the
"BBMULTICONFIG" variable in the "local.conf" file.
Signed-off-by: Claudius Heine <ch@denx.de>
9e136e532d ("config: Remove dynamic configuration variant")
removed the posibility to add pre and post hooks. Remove the remaining
bits from libcmds.
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
Sort the header sections by their keys and the layers by their names.
This will re-enable writing deterministic config files, and bitbake can
use its cache again, accelerating rebuild startup times a lot.
While at it, indent the layers in bblayers.conf nicely.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
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>
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>