| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This rips out any remaining order-preserving code and instead uses the
yaml dumper from morphloader.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think that it's confusing for both strata and chunk morphologies to
have a 'chunks' field, with the former listing sources and the latter
listing rules for splitting this source into artifacts.
The design for splitting strata has roughly the same idea, but operating
on chunk artifact names, rather than file names, so a name that can be
used for both was chosen.
Splits and artifacts weren't satisfactory names, so they're now called
'products'.
It was decided to break backwards compatibility of chunk morphologies
being able to specify 'chunks', since the format has changed, so extra
code would be required to translate the format, and the only users of
the 'chunks' field was the test suite, since there was no way to select
from the system, which chunk artifacts were included.
|
| |
|
| |
|
|
|
|
| |
Add the necessary tests to keep CoverageTestRunner happy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
morphlib/morph2.py
|
| |
| |
| |
| |
| |
| |
| |
| | |
We already have configure-commands. Add pre-configure-commands and
post-configure-commands. Likewise for build-command, test-commands,
and install-commands.
Added-to-pacify: Rob Kendrick
|
| |
| |
| |
| |
| |
| | |
Remove the special case hacks we had and do a proper comparison
between original and new in-memory dict when writing updates to
user morphologies.
|
| | |
|
|/
|
|
|
|
|
|
|
| |
If given an empty string to parse yamlparse.load() will return None,
but this breaks code further down that expects to be dealing with a
dict. Raise an exception to avoid crashing.
Also, avoid catching 'Exception' when we only want to catch JSON
parse errors.
|
|
|
|
|
| |
This can go away when we have made a release with yaml in it, and its
staging filler.
|
|
|
|
|
|
|
|
| |
Invalid text changed to be something that doesn't parse as YAML
either, and catch convert the YAMLError to the expected exception.
Ideally there wouldn't be any `#pragma: no cover`s, but I could not
trigger these code paths.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ssh://git.baserock.org/baserock/baserock/morph
This includes the following fixups:
- altering the bootstrap script to install ordereddict and simplejson.
- Adding a comment to clarify that it is intentional to use simplejson
if collections does not have OrderedDict
- Amending the copyright years to include 2013
|
|/
|
|
|
| |
As we use ordererdict for python < 2.7 as well
See 37f8d84d7ab356169bf7c04bdecb39a61b85c88d
|
|
|
|
|
|
|
|
|
|
| |
This requires disabling the feature that retains the original order of
fields in a morphlogy when it gets overwritten. The implementation relies
on features that are not available in Python 2.6. We need to support
Morph on Debian squeeze, for bootstrapping purposes, and therefore need
to have it work with Python 2.6. However, the morphology rewriting is
only relevant for system branching and merging, and that isn't needed
for bootstrapping, so we disable the affected tests on Python 2.6.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to modify morphologies in place and then write them back to
disk in system branches (e.g. when running "morph edit"), we need to
have access to the dicts that store references to strata in system
morphologies and chunks in stratum morphologies, respectively.
Therefor, the previous triplet-returning child lookup is replaced
with a new internal method to ensure uniqueness of names in
morphologies and a new method to lookup children in this commit.
The unit tests are adjusted to cover everything in appropriate ways.
|
|
|
|
|
|
| |
This requires that we enforce uniqueness.
New method: Morphology.lookup_morphology_by_name()
|
|
|
|
| |
Rename "sources" field of stratum morphologies to "chunks".
|
|
|
|
|
|
|
|
|
| |
This was done with the aid of the pep8 script, available by running
`easy_install pep8`.
It may be worth making this part of ./check, but that will require
putting pep8 into the development tools stratum.
This should be easy, given pep8 has no external dependencies.
|
| |
|
| |
|
| |
|
|
The old morphlib.morphology.Morphlogy class is entangled by having
treeish and requires reading from an open file. This is a bad design
for the class: the treeish is unnecessary coupling, and the open file
makes is harder than necessary to parse a morphology which we don't
have as a file on disk.
The new class gets the text of the morphology and does not care about
treeishes at all. It also acts more like a dictionary, giving more
uniform access to the various items, while reducing the amount of
code we have in the class.
The old class will remain until all uses of it have been eradicated.
|