| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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 saves a check (and an indentation) in the deployment plugin,
making the code a tiny bit simpler.
Suggested-By: Sam Thursfield
|
|
|
|
|
| |
This can go away when we have made a release with yaml in it, and its
staging filler.
|
|
|
|
|
| |
Tests are currently broken, one because invalid JSON
can be valid YAML, and coverage is incomplete.
|
|
|
|
|
|
|
|
| |
This way everyone who needs json or an OrderedDict doesn't have to worry
about it.
Currently morph2 is the only one that needs this complex behaviour,
other users of the json module don't need object_pairs_hook.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/ |
|
|
|
|
|
| |
'morph edit' is for editing source code, not built artifacts, so we
should use the source morphology name.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This helps us avoid writing out meaningless fields when we want to
edit a morphology and write it back to disk.
|
|
|
|
|
|
| |
This is needed for being able to write morphologies to disk
programmatically after making automatic changes to them using
morph.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an ugly, ugly way to do this, but time is pressing.
SystemBuilder checks what arch is defined in the morphology, if
it is an x86 (or None for compatibility) then it will do the syslinux
install stuff.
This hack is needed because syslinux is x86 specific and arm
often has different requirements for where the kernel must be loaded
from, sometimes it is flash, sometimes it is a different partition.
This will likely become board specific, but for a qemu-system-arm,
the kernel should be a separate file, to be passed on the command line.
Having a different 'kind' for each architecture would be a nicer way,
but would require more changes, since there are various checks for
morphology['kind'] == 'system'
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Builder checks whether commands need to be chosen from the build
system by if the morphology has no commands, the check is whether
the commands are None, rather than an empty list, so that it is
possible to override a build system's commands with an empty list.
However this means that the default of an empty list means that the
build system is ignored and commands aren't run.
|
| |
|
|
|
|
|
|
|
|
|
| |
We will almost always want to look up sources based on the data we find
in morphologies (e.g. chunk sources found in a stratum or strata found
in a system). For that we need to remember the original_ref in addition
to the resolved SHA1 and look up sources using this original ref. The
original ref is therefore also used as part of the hash key in
SourcePool now.
|
| |
|
|
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.
|