| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is better to test whether a straum is empty here, since it will be
noticed earlier in the build, as soon as the morphologies are loaded,
rather than after they have all been parsed.
It is also conceptually nicer to put it here, since the morphologyfactory
was written to perform this kind of validation.
On a more practical note, the validation is moved here so that the test
for this error isn't masked by the test for no build dependencies.
To ensure tests still pass, we alter the stratum morphology used by
other unit tests to no longer be empty, and add an empty one to test.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This creates a small exception hierarchy for failures to validate
stratum morphologies. This is currently a line rather than a tree,
but it will be expanded later in the patch series.
This also adds test coverage for chunk build dependencies being
omitted.
|
|/
|
|
| |
Reviewed-by: Lars Wirzenius and Jonathan Maw on IRC
|
|\
| |
| |
| | |
Reviewed-by: various
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This is a helper to avoid having the same code in other places. Have
it in the one place it belongs.
|
| | |
|
| |
| |
| |
| |
| | |
This will be useful later, when we start creating system branch
directories.
|
| |
| |
| |
| |
| |
| |
| | |
These will be used to find workspace and system branch root directories.
Also accidentally removed some whitespace from ends of lines. Too lazy
to split that into a separate commit.
|
|\ \
| |/
|/|
| | |
'origin/baserock/richardmaw/S8530/atomic-hl-cache-creation'
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This uses the same logic as when a build fails, so it's been
consolidated into `StagingArea.abort()`.
You could argue that if a build fails before any commands are run,
then there's nothing interesting to see, but it will be useful if the
hardlink/tarball extract algorithm fails in some corner case.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Paul had file system problems which led to a partially constructed
chunk hardlink cache, which caused later builds to fail, since they
got a partially extracted chunk.
This patch fixes the case where the failed extract caused unreproducible
builds, but it's possible to corrupt the hardlink cache in other ways.
Read-only btrfs subvolumes would fix this, but either tie us further to
btrfs, or complicates the codebase with fallback logic.
|
|/
|
|
|
|
|
|
| |
It is expected that the Application creates directories that will
be used, to keep the code for using them cleaner.
The FakeApplication wasn't updated to do this, as it was not yet needed,
but changes for atomicity require it to exist.
|
|\ |
|
| | |
|
|\ \
| |/
|/|
| | |
Reviewed-by: Daniel Silverstone
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Put new implementation into new branch and merge plugin, and remove
old implementation from the old plugin.
Also change the error message for the NotInWorkspace exception, so that
it matches what the test suite expects. It's a crappy error message, I
think, but I don't want to change external behaviour during refactoring.
|
| |
| |
| |
| |
| |
| |
| | |
Move "morph init" into a plugin, and remove it from the previously
existing plugin. This keeps all the old, tricky code in the old
plugin, and moves new, clean code into a new plugin. Eventually the
old plugin can be removed, since it'll be empty.
|
|/ |
|
|\
| |
| |
| |
| | |
Briefly reviewed by Jonathan Maw and Tiago Gomes, but all responsibility
is mine.
|
| |
| |
| |
| | |
Reported-by: Tiago Gomes
|
| |
| |
| |
| | |
Reported-by: Jonathan Maw
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These scenarios test the basics of most of the subcommands the
branch and merge plugin provides. They don't purport to be complete,
but give some indication that things work, and form a basis upon
which further things can be built. Yarn also isn't included in a
Baserock release yet, so we need to keep the cmdtests until Baserock
10 has been released.
The existing cmdtest tests are not modified by this: they are left
intact, until they can analysed in detail for things to be added to
the scenarios. After that, the cmdtest tests will start to go away.
Merging is not covered by these tests: it is not clear how merge should
work, and the current code is known to do the wrong thing in many cases.
Scenarios for merge will be added later.
Building is also not covered. Testing builds well needs some additional,
careful thinking, and that isn't ready for this patch series. It will
be added later.
|
| | |
|
|\ \ |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Cross-bootstrap is a way to build baserock on an architecture that
does not currently have Baserock. It can be used by `morph
cross-bootstrap <ARCH> <REPO> <REF> <MORPH>`, and will build an artifact
that can be used as a root filesystem with a basic build environment
with a script named `native-bootstrap` which will build and install
every chunk in the system.
If done with a devel system, this will give you a suitable environment
for building a proper Baserock system.
This does not currently provide a kernel for the target architecture.
Apart from adding the cross-bootstrap plugin, it also makes the
following changes:
* Moves the lit of valid_archs into morphlib (instead of locally-scoped
in MorphologyFactory)
* BuildCommand takes an extra argument, build_env
* split BuildCommand's get_artifact_object into create_source_pool and
resolve_artifacts (plus changes things that use get_artifact_object to
use the new way)
* setup_mounts finds out whether to do so by whether build_mode is
'staging', instead of by whether the setting 'staging-chroot' is true.
* Makes ChunkBuilder's get_sources use the
morphlib.builder2.extract_sources() method, and moved
set_mtime_recursively into morphlib.builder2, since it's not currently
used anywhere else.
* moved ChunkBuilder's get_commands into the Morphology class (plus
changes to anything that used get_commands)
|
|\ \
| |/
|/|
| | |
Reviewed-by: Richard Maw <richard.maw@codethink.co.uk>
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
Pre-reviewed by Daniel Silverstone.
|
|/ |
|
|\
| |
| |
| | |
Reviewed-by: Daniel Silverstone
|
| |
| |
| |
| |
| |
| |
| | |
We do not currently install an /etc/hosts in Baserock, and thus the name
localhost is not guaranteed to resolve as expected. This patch changes
the tests to use 127.0.0.1 instead, since that is the IP address we want
localhost to resolve to.
|
| | |
|
| | |
|
|\ \
| |/
|/|
| | |
Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
|
| | |
|
| | |
|
|\ \ |
|
|/ / |
|
|/ |
|
|\
| |
| |
| |
| | |
Reviewed by most of the team. This has their feedback
incorporated.
|
| | |
|