| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This wasn't working, since the build-without-push code works by including
morphologies that have had their ref changed to the branch's name.
This is not done by edit if it is null, since the extra ref resolution
can cause interesting issues.
Instead of changing edit to continue to alter the ref, build will now
allow null meaning this current repo/ref.
This has the side-effect of also checking morphologies referred to by
a null ref, even if they aren't altered, but it still works correctly.
|
|\
| |
| |
| |
| | |
Reviewed by: Lars Wirzenius
Reviewed by: Pedro Alvarezwq
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed by Lars Wirzenius
Reviewd by Richard Ipsum
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Richard Maw
|
| | |/
| |/| |
|
|\ \ \
| |/ /
|/| |
| | | |
Changed the error (exception) to list all obsolete fields.
|
| | | |
|
| | | |
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
Reviewed-by: Jonathan Maw <jonathan.maw@codethink.co.uk>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changes the interface of branch-from-image to only take 1 parameter,
the name of the new system branch, as the root repository is loaded from
the metadata.
This was also what the previous version of branch-from-image did, but
that silently ignored the parameter.
Given there are not many users of branch-from-image, I felt it was a
reasonable change.
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This creates an object that the with statement can use to handle the
context and clean up the workspace if the body raises an exception.
This is roughly equivalent to having a function that takes a callback of
what to do while the branch is being initialized, but with less
boilerplate at the call site.
contextlib is used to create a context manager from a generator
function. This is less verbose than defining a class with __enter__
and __exit__ methods.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This does three things:
1. It makes sure that the native-bootstrap script terminates if
any steps fail.
2. It installs files to a temporary directory, then copies them out,
so that builds don't break in cases where we delete files from
DESTDIR.
3. It makes appropriate minor fixes so that a cross-bootstrap build
can happen from beginning to end.
Note: native-bootstrap does not succeed in every case. It has been
observed to fail in an x86_64 virtual machine.
|
| |
|
| |
|
| |
|
|
|
|
| |
The previous status is currently still available as old-status.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This currently performs the workspace-wide status, but not the
system-branch status functionality of the older status subcommand.
A quick estimate showed the new code to be 5x faster, comparing
# time (echo 2 >/proc/sys/vm/drop_caches; morph status)
System branches in current workspace:
baserock/richardmaw/S8537/ssh-copy-id
baserock/richardmaw/S8564/ro-staging-area
baserock/richardmaw/S8591/lzo-shared
baserock/richardmaw/cliapp-pipefail
baserock/richardmaw/malformed-strata-test
master
tutorial-1/tutorial/master
tutorial-1/tutorial/update-ssh
real 0m2.517s
user 0m0.998s
sys 0m1.482s
# time (echo 2 >/proc/sys/vm/drop_caches; morph new-status)
System branches in current workspace:
baserock/richardmaw/S8537/ssh-copy-id
baserock/richardmaw/S8564/ro-staging-area
baserock/richardmaw/S8591/lzo-shared
baserock/richardmaw/cliapp-pipefail
baserock/richardmaw/malformed-strata-test
master
tutorial-1/tutorial/master
tutorial-1/tutorial/update-ssh
real 0m0.506s
user 0m0.207s
sys 0m0.233s
|
|\
| |
| |
| |
| |
| |
| |
| | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Daniel Silverstone
Daniel gave his +1 with the caveat that he would like tests for
petrifying a system branch other than master.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This also undoes the test suite change to keep it using the old petrify.
Petrify and Unpetrify have the same structure:
1. Set up
2. Load all the morphologies
3. Make changes to the morphologies
4. Write back any changes
This suggests some re-use in the form of passing a function callback to
a morphology visitor.
|
| |
| |
| |
| |
| | |
This includes amending the test suite to use the old petrify, since the
old unpetrify depends on some implementation details of it.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test suite checks the output of the foreach command, this requires
repositories to be returned in a stable order.
The order returned from os.listdir differs by the filesystem used.
btrfs returns roughly in insertion order, tmpfs alphabetically.
This allowed the failure to sort pass through unchecked, since I was
testing on btrfs, but people discovered issues when using /tmp, which
is a tmpfs.
To fix this, foreach sorts the result of list_git_directories() by
directory name.
The previous code would always return the root repository first, this
was a unnecessary complication, so now everything is returned
asciibetically and the tests amended to reflect this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous version attempted to separate the output of the commands
run with newlines by printing a newline at the beginning if it wasn't
the first repository.
The check it used was for the first repository was flawed by assuming
that the root repository was the first repository processed.
Since the complication was not worth keeping the output identical, it
has been changed to separate by printing a newline after every command
and the test output has been amended to include the extra trailing
newline.
|
|
|
|
|
|
|
|
| |
This also amends the test suite.
The git apply command to alter the stratum proved inflexible when
anything changed, so it has been replaced by a small in-line python
script.
|
|
|
|
|
| |
It's nicer to get a clean error message explaining what's wrong than a
stack trace.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2dc382a2a9ae977b1158002cd2631ec5593959c1, reversing
changes made to 89a019af088ff62459699a6efdadf8ac8fe35dd9.
We decided to restore the old commands for the release, as we weren't
confident the new implementations were correct yet.
To gain that confidence we need to use them, so the old versions are no
longer available, and the new edit code is used when the edit subcommand
is invoked.
Doing so also requires the test suite to use the edit command instead of
new-edit.
|
|
|
|
|
|
|
|
|
| |
Most of the subcommands are available as "old-foo". The exception is
edit, for which we've decided to stick with the old implementation by
default. Thus the new implementation is "new-edit".
This is all meant to be a safety net so that for BR10 we are not stuck
in limbo in case the new implementations are broken in unexpected ways.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From now on, `morph deploy` will work to only accept a cluster
morphology as argument. A cluster morphology defines a list of
systems to built, and for each system a list of ways to deploy
them. We will not support the old syntax anymore.
- Update `morph deploy` docstring with the new syntax, including
an explanation of cluster morphologies (also document `tar`
deployments).
- Fix tests that used the old syntax.
- Add tests for cluster deployments.
|
|
|
|
| |
Add the necessary tests to keep CoverageTestRunner happy.
|
| |
|
|
|
|
| |
Suggested by Richard Maw
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a bug fix. The code would previously blithely load the
morphology from the currently checked out ref (plus any local,
uncommitted changes). This is obviously wrong. However, we can't
check out the right ref, either, so the right thing to do is to
"git cat-file" it. But only when the right ref is not checked out.
This is fairly complex behaviour which may not be obvious to users
either. But we'll worry about that later, this is what needs to
happen now, and I don't want to make big behavioural changes in
the middle of a refactoring.
Bug found based on suggestion by Richard Maw.
|
|
|
|
|
|
| |
Test suite currently fails because MorphologyLoader validates differently
from the old MorphologyFactory code, and because MorphSet changes refs
more correctly (including, it seems, build-dependency refs).
|
| |
|
|
|
|
|
| |
For some reason, there was an unused argument in the method. Remove it
from the definition and all call sites.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a configuration extension or write extension fails, then it should
abort then, not continue to run other configuration extensions.
There was a period where this didn't happen, due to a missing feature
of cliapp that was assumed to be there, so failure to run these
extensions was not noticed.
This has since been fixed, but this would cause deploy to fail to
clean up its temporary directories.
Now it will cleanup the contents of the temporary directory after
any failures after it has been created.
A small amount of re-ordering was performed to make this easier.
|
|
|
|
|
|
|
|
| |
It's a waste of time to unpack the rootfs, only to have to clean it up
again when you find out that you messed up the command line arguments.
This also has the benefit of reducing the amount of resources that have
to be considered for cleanup.
|
|
|
|
| |
It is now a tested helper function in morphlib.util
|
|
|
|
|
|
|
|
|
| |
We can't assume an extension cleans up after itself, as they can be
arbitrary shell scripts, and the best shell has to offer for cleanup is
`trap`, which is difficult to use.
So now, anything created with `mktemp` will get automatically cleaned
up by morph.
|
|
|
|
|
|
|
|
| |
It's rather easy to accidentally try to create a system branch of
the `morph` repository rather than the `morphs` repository.
This commit verifies that a checked out branch contains system
morphologies, otherwise it aborts and cleans up.
|
|
|
|
| |
Reviewed-by: Lars Wirzenius and Jonathan Maw on IRC
|
| |
|
| |
|
| |
|