summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update morphloader_test.pyFrancisco Redondo Marchena2014-08-151-12/+13
|
* Set chunk static default to Nonebaserock/franred/fixes-needed-for-organize-definitionsFrancisco Redondo Marchena2014-08-151-12/+12
|
* Add system-integration to chunk _static_defaultsFrancisco Redondo Marchena2014-08-151-0/+1
|
* Add deploy-defaults before deploy in the MorphologyDumper keyorderFrancisco Redondo Marchena2014-08-151-0/+1
|
* Merge branch 'baserock/richardmaw/james/writeexts_support_jetson'James Thomas2014-08-142-22/+83
|\ | | | | | | | | Reviewed by: Richard Maw <richard.maw@codethink.co.uk> Merged by: James Thomas <james.thomas@codethink.co.uk>
| * Merge remote-tracking branch 'origin/baserock/james/writeexts_support_jetson'baserock/richardmaw/james/writeexts_support_jetsonRichard Maw2014-08-122-22/+83
| |\
| | * Add support for a device tree to be set using DTB_PATHbaserock/james/writeexts_support_jetsonJames Thomas2014-08-031-0/+21
| | |
| | * Make bootloader config/install more genericJames Thomas2014-08-031-17/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the BOOTLOADER environment variable and instead favour BOOTLOADER_CONFIG_FORMAT to set the desired bootloader format, and BOOTLOADER_INSTALL to set the type of bootloader to install. For example, since u-boot can boot using extlinux.conf files, it's conceivable that someone might want to do CONFIG_FORMAT=extlinux.conf, INSTALL=u-boot. However, for most platforms you would want to set INSTALL to "none"
| | * Support setting a different root device using ROOT_DEVICEJames Thomas2014-08-031-2/+5
| |/
* | Merge branch 'baserock/adamcoldrick/remove-morph2-tweaked'Adam Coldrick2014-08-1450-2212/+1016
|\ \ | | | | | | | | | | | | Reviewed-by: Richard Maw
| * | Rename morph3 to morphologyAdam Coldrick2014-08-146-57/+57
| | | | | | | | | | | | | | | | | | Instead of leaving morph3 with a potentially confusing name, rename it to `morphology` since it is now the only implementation of the Morphology class.
| * | Revert "Ensure that none of the _orig_* fields are in the cache key"Adam Coldrick2014-08-141-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4124c50b8dc3dfb0ffb933153d0fe6385edf389c. This commit is no longer needed now that morph2 is gone. Conflicts: morphlib/cachekeycomputer.py
| * | Remove morph2 and its testsAdam Coldrick2014-08-143-705/+0
| | | | | | | | | | | | This commit removes the now unneeded morph2 and its associated tests.
| * | edit-morph: Use morphloader rather than morph2Adam Coldrick2014-08-141-52/+8
| | | | | | | | | | | | | | | | | | Update the edit-morph script used in the test suite to use morphloader for saving/loading morphologies rather than morph2. Also remove some unused code.
| * | cmdtests: Use YAML not JSON to represent morphologiesAdam Coldrick2014-08-1421-867/+549
| | |
| * | cmdtests: Change the error messages to be detectedAdam Coldrick2014-08-144-4/+4
| | |
| * | unittests: Make the unittests use morphloaderAdam Coldrick2014-08-146-297/+254
| | | | | | | | | | | | | | | This commit removes all use of morph2 from the unittests, replacing it with morphloader/morph3. It also converts the test morphologies to YAML.
| * | buildsystem: Generate a Morphology not textAdam Coldrick2014-08-144-30/+29
| | | | | | | | | | | | | | | Rather than generating the text of a morphology which is later loaded, generate a Morphology object and return that.
| * | morphologyfactory: Use morphloader not morph2Adam Coldrick2014-08-142-166/+75
| | | | | | | | | | | | | | | | | | | | | | | | This commit reworks morphologyfactory to stop using morph2. It removes the validation that is already handled by morphloader, and uses morphloader to load the morphology rather than using morph2. The unit tests are also changed to turn the example morphologies into YAML, and also to check for the correct exceptions.
| * | morphloader: Get commands when loading morphologyAdam Coldrick2014-08-144-3/+14
| | | | | | | | | | | | | | | | | | Rather than having a `get_commands` method to obtain missing commands from the build system when they are needed, get the commands when loading a morphology.
| * | morphloader: Add and remove some default valuesAdam Coldrick2014-08-142-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit stops morphloader setting the `morph` field in chunk specs, and also makes it set defaults for the prefix and build-mode fields. Not setting the `morph` field is necessary as its presence in chunk specs is used by `traverse_morphs` to mean that the morphology file is in the definitions repository, not the chunk source repository. If we set a default value here, we end up looking for files which do not exist.
| * | morphset: Don't expect to be able to find `morph` or `name`Adam Coldrick2014-08-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Currently, morphloader sets the morph field in chunk specs by default. A later commit will remove this behaviour, so morphset needs to stop expecting the `morph` field to exist in morphology specs. However, stratum specs don't have a `name` field so we can't expect to be able to find that either.
| * | show-dependencies: Use sanitise_morphology_path instead of stripping `.morph`Adam Coldrick2014-08-142-3/+3
| | |
| * | cachedrepo: Remove unused load_morphology methodAdam Coldrick2014-08-142-13/+0
|/ /
* | Merge branch 'baserock/richardmaw/misc-fixups'baserock/richardmaw/tmpRichard Maw2014-08-1225-848/+105
|\ \ | | | | | | | | | | | | Reviewed-by: Daniel Silverstone Reviewed-by: Pedro Alvarez
| * | Fix `morph edit` when repo has the same ref as system branchRichard Maw2014-08-123-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a check in it to see whether it needed to do the git branch and git checkout based on whether the name of the branch matched that in the morphology. This had a couple of problems: 1. Now that we aren't always building from HEAD, we need to be able to roll its commit back, so using the existing branch isn't always the best idea. 2. It only checks the "ref" field, not "unpetrify-ref", so even though we clone the right ref in there, it's checking the commit id against the system branch name, so would always try to re-create the branch, and fail when it already exists. So now, we remove the original ref and re-create it with our preferred HEAD. A better solution might be to change the clone logic to not automatically checkout HEAD, and instead require an explicit branch then checkout, but the initial clone logic is shared with build, and I didn't feel like tracking down all the different places that it was used.
| * | Make morph show-branch-root print the pathRichard Maw2014-08-1210-114/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | The help for the show-branch-root command said it returns a path, but the command and the yarns just showed the aliased url it was cloned from. Given I found myself needing the path in some scripts, not the repo url, I think it's more useful to reconcile the difference this way.
| * | yarns: Start from petrified refsRichard Maw2014-08-124-30/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is closer to our current workflow, where we are always petrified and update the ref field when we need to update a component. This required rearranging the operations to create the chunk repository before the definitions repository, and remove a check that assumes we weren't already petrified.
| * | Remove petrify and unpetrify commandsRichard Maw2014-08-1215-698/+1
|/ / | | | | | | | | | | | | We don't use this any more, and instead prefer to always keep definitions.git petrified, and update the refs ourselves. branch-from-image still uses some of the remaining petrify code.
* | Merge remote-tracking branch ↵Richard Maw2014-08-1210-133/+403
|\ \ | |/ |/| | | | | | | 'origin/baserock/richardmaw/S11416/no-unnecessary-temp-branches' Reviewed-by: Daniel Silverstone
| * Add yarns for checking the state of temporary build branchesbaserock/richardmaw/S11416/no-unnecessary-temp-branchesRichard Maw2014-08-122-0/+239
| |
| * Yarns: Preserve the output of morph foo in out-fooRichard Maw2014-08-121-2/+3
| |
| * Yarns: implement pushing a whole system branchRichard Maw2014-08-121-2/+1
| |
| * Yarns: misc fixesRichard Maw2014-08-122-3/+3
| |
| * Avoid creating and pushing temporary build branches when they aren't necessary.Richard Maw2014-08-124-99/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sorry about the big lump, I can split it into a nicer set of changes, but they didn't naturally emerge in a nice series. This creates a pushed_build_branch context manager, to eliminate code duplication between build and deploy. Rather than the build branch being constructed knowing whether it needs to push the branch, it infers that from the state of the repositories, and whether a local build would be possible. If there are no uncommitted changes and all local branches are pushed, then it doesn't create temporary branches or push them, and instead uses what it already has. It will currently create and use temporary build branches even for chunks that have no local changes, but it's pretty cheap, and doesn't require re-working the build-ref injection code to check whether there are local changes.
| * Treat untracked morphologies as uncommitted changesRichard Maw2014-08-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to coincidentally include morphologies because we later include every morphology in the build graph into our temporary build branches. Since we're now checking whether there's any uncommitted changes before attempting to create a temporary build branch, this means that we can no longer build uncommitted morphologies if they aren't reported as changes. So this patch makes an exception to the untracked changes rule for anything that ends with .morph. It's still confusing that some files aren't included in temporary build branches, but that would cause performance regressions, so we'll limit it to just morphologies for now, until we make a decision on what uncomitted content we care about.
| * Cut BuildBranch out of morphlib.extensionsRichard Maw2014-08-123-30/+20
| | | | | | | | | | | | | | | | | | | | | | This was previously used just so it could get the right repo and ref to read the file out of. However, there was a subtle bug in this behaviour, as if we had not previously used morph build in that branch, it would attempt to read the extensions from a branch which didn't exist. So now it reads it from the working tree, which always exists.
| * Turn BuildBranch methods into regular functionsRichard Maw2014-08-123-18/+28
|/ | | | | | | | | | | | | | | | | | | | | | | | Previously they were generator functions, which yielded interesting context at interesting times so that the caller could respond by printing status messages. The only benefits this had over callbacks were: 1. 1 fewer function scope to worry about. I don't have data on the amount of memory used for a function scope vs a generator, but it could be less cognitive load for determining which variables are defined in the callback's body. 2. It is possible to yield in the caller, so you could make that into a coroutine too, however this wasn't required in this case, as the yielded value was intended to be informational. The downsides to this are: 1. It's a rather peculiar construct, so can be difficult to understand what's going on, and the implications, which led to 2. If you call the function, but don't use the iterator it returned, then it won't do anything, which is very confusing indeed, if you're not used to how generator functions work.
* Merge branch 'baserock/adamcoldrick/no-orig-fields-in-cache-key'Adam Coldrick2014-08-011-1/+4
|\ | | | | | | | | | | | | | | This fixes a bug where distbuild was calculating a different cache local build. It will no longer be needed once morph2 is removed. Reviewed-by: Sam Thursfield Reviewed-by: Richard Maw
| * Ensure that none of the _orig_* fields are in the cache keybaserock/adamcoldrick/no-orig-fields-in-cache-keybaserock/adamcoldrick/no-fake-morphAdam Coldrick2014-08-011-1/+2
| | | | | | | | | | | | | | | | morph2.Morphology adds a number of fields beginning with _orig_, which contain default values. There is no reason for these values to be in the cache key, and this fixes a bug where distbuild created systems with a different cache key than local builds did when the configuration extensions list was empty.
* | Merge remote-tracking branch ↵Lars Wirzenius2014-08-011-2/+2
|\ \ | | | | | | | | | 'remotes/origin/baserock/richardmaw/bugfix/distbuild-eglibc'
| * | StagingArea: Ensure staging are paths are bytestringsbaserock/richardmaw/bugfix/distbuild-eglibcRichard Maw2014-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the destdir path returned when creating a staging area is a unicode string, then when attempting to `os.walk(destdir)`, it will encounter unicode errors if there are file paths in the destdir that are not representable as unicode strings. For various as-yet unknown reasons, when building stage-2 eglibc it produces file paths that are not unicode compatible. There was previously a patch to fix this issue with regards to creating the metadata files, but it did not fix all the issues, because the build at the time was local rather than distributed. This is failing during a distributed build because morphologies are serialised into json, and during deserialisation their string values are left as unicode. Rather than doing the byte-string conversion during deserialisation, I have chosen to do it when the contents of the morphology are used, because it's only at the point where it's used to create a file path, that it matters whether it's unicode or not.
* | | Merge branch 'liw/distbuild-fixes-ripsum-only'Lars Wirzenius2014-08-011-1/+1
|\ \ \ | | | | | | | | | | | | Reviewed-by: Richard Maw (+2)
| * | | Use sanitise_morphology_path in serialise_artifactRichard Ipsum2014-07-311-1/+1
|/ / /
* | | Merge remote-tracking branch ↵Lars Wirzenius2014-07-303-3/+60
|\ \ \ | |_|/ |/| | | | | 'origin/baserock/richardmaw/bugfix/yaml-multi-line-dump'
| * | Dump multi-line strings in yaml documents in '|' formbaserock/richardmaw/bugfix/yaml-multi-line-dumpRichard Maw2014-07-303-3/+60
|/ / | | | | | | | | | | | | | | This prevents the description fields of morphologies being mangled. This does not preserve the original formatting, so much as happen to dump it in the same way we wrote it, but given we chose that form because we think it looks the nicest, that's not a problem.
* | Merge branch 'baserock/richardmaw/bugfix/fix-list-artifacts'Adam Coldrick2014-07-291-1/+1
|\ \ | | | | | | | | | | | | Reviewed-by: Daniel Silverstone Reviewed-by: Adam Coldrick
| * | Fix list-artifacts post chunks-in-definitionsbaserock/richardmaw/bugfix/fix-list-artifactsRichard Maw2014-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | The chunks in definitions change changed the api of create_source_pool, and because list artifacts is not covered by any tests, and the create_source_pool method was confused with a function of the same name that did not need changing, it failed to be fixed.
* | | Merge branch 'baserock/richardmaw/bugfix/symlink-include'Adam Coldrick2014-07-291-1/+1
|\ \ \ | |/ / |/| | | | | Reviewed-by: Daniel Silverstone
| * | Fix not including symlinks in chunks if they exist on the hostbaserock/richardmaw/bugfix/symlink-includeRichard Maw2014-07-291-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With os.walk, if the target of the link doesn't exist, or it is a link to a file, it ends up in the basenames list. If it is a link to a directory, it goes in the subdirs list. There's a bug in the subdirsymlinks check, in that it checks if the wrong file is a symlink, so it never returns them. This was missed, since we did not have the cross bootstrap in CI. This is not eligible for our yarn tests, since to trigger this would require changes to the host system's rootfs, so it's a system-level test. To test this properly requires putting the cross bootstrap in CI.