summaryrefslogtreecommitdiff
path: root/morphlib/artifactresolver.py
Commit message (Collapse)AuthorAgeFilesLines
* Simplify _resolve_system_artifactsRichard Ipsum2014-10-101-12/+4
|
* Replace resolver queue with loopRichard Ipsum2014-10-101-62/+57
| | | | | | Since we're no longer adding anything to the queue we can replace it with a loop. This patch also splits the code up a little bit.
* Remove queueingRichard Maw2014-10-101-16/+6
| | | | | | | Artifact resolution is no longer recursive, so there's no need to requeue sources, removing this queue provides a significant speed up. Fixing an issue where artifact resoltuion was taking too long on some systems (several minutes in some cases).
* Tidy up artifact resolvingRichard Ipsum2014-10-091-1/+5
| | | | | | | | This patch started off as an attempt to address the comment in find_root_artifacts, though this patch doesn't impose an ordering on the list of artifacts as the comment suggested. The artifact resolver now returns a list of root artifacts which may make it easier to add multi-system builds to morph.
* Build per-source rather than per-artifactRichard Maw2014-09-191-19/+13
|
* Create multiple sources per stratum morphologyRichard Maw2014-09-191-32/+43
| | | | | | | | | | | | | | | | | Building per-artifact results in undesirable behaviour, as multiple artifacts are produced for every chunk build. It therefore makes more sense to build per-source. This implies that actually, the model of one source per morphology is wrong and we should move the dependencies into the source. Unlike chunks however, where every chunk artifact has the same dependencies, stratum artifacts can have different dependencies. So before we can move the dependencies into the Source, we need to have as many Sources as Stratum Artifacts.
* Don't validate morphologies during ArtifactResolverRichard Maw2014-09-171-21/+9
|
* Don't set 'morph' field by default, and don't expect to find itAdam Coldrick2014-07-221-1/+3
|
* Use exact filenames to refer to morphology filesRichard Maw2014-07-101-3/+3
| | | | | | | | | | | | | | | | | | | Rather than repeatedly stripping and appending an optional .morph extension morphology names, instead always use the file path of the morphology relative to the definitions repository. This is an inversion of the previous logic, which would strip the .morph extension and use the "name" internally. The exception to this rule of always using the filename, is that `morph edit CHUNK` uses the name of the morphology as-defined in the stratum. This is based off Adam Coldrick's inital patch, but this version will allow the old style of providing the "name" by converting it into a path if it does not have either a / or a . in it. An unfortunate consequence of this change is that the show-dependencies command's output changed, so the test needed updating.
* Allow omitting repo and ref when referring to strataRichard Maw2014-02-131-4/+4
|
* ArtifactResolver: Generate dependencies from split rulesRichard Maw2014-01-161-90/+101
| | | | | | | | | | | | | | | | | | One important change is that the builds_artifacts field of Morphologies is not used any more, since the split rules provide this information. Another important change is that the ArtifactResolver now only returns aritfacts that are required to build the root artifact, rather than every artifact in the build. Previously there was no distinction. This is required because when artifact splitting is in effect, some artifacts may be produced, but not depended on by anything. This confuses the BuildCommand, which expects to be able to find a single root artifact. NOTE: This change breaks artifact construction until "Split chunk morphologies according to new rules" and "Split Stratum artifacts according to new rules", since systems and strata depend on artifacts that weren't created.
* ArtifactResolver: Use Artifacts from SourcesRichard Maw2014-01-151-20/+9
|
* Allow building with null repo/refRichard Maw2013-09-261-4/+4
|
* Add 'prefix' property for chunks within strataSam Thursfield2013-03-131-0/+1
| | | | | | | | | Morph no longer supports setting the prefix using the --prefix argument / setting. This was only used in tests and during bootstrap. If a chunk build-depends on a chunk within a stratum which has a custom prefix, that prefix is appended to the PATH in the build environment.
* Add 'build-mode' field for chunks in a stratumSam Thursfield2013-03-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Allowed values: staging: build with a staging chroot (default) test: build with the host's tools bootstrap: build with the host's tools, and do not include this chunk in the final stratum artifact In the past, 'normal mode' has been used to describe building a chunk with the host's tools. We don't want that mode to ever be used, because it is a huge hole in reproducability, but we need to keep it around to avoid making Morph's cmdtest suite depend on Baserock. Hopefully naming it 'test' should discourage potential abusers. It is unfortunate that the build tests now take a separate code path compared to real-world usage of Morph. However, this is necessary to avoid a circular dependency between Morph's test suite and the build-essential stratum in Baserock. We do whole-build testing of Baserock, too, so the 'staging' code path is still tested outside of Morph. However, testing a staging area requires populating it with at minimum a working shell, and this is a bit too complex to go in Morph's test suite.
* ArtifactResolver: chunks cannot be duplicated in a stratumSam Thursfield2012-09-041-4/+1
| | | | | We now enforce name uniqueness and don't yet implement a way of providing an alias for chunks, so self-dependency is impossible.
* Strata should be referred to with full repo/ref/morph tripletsSam Thursfield2012-08-301-9/+11
| | | | | | | | This removes the requirement that all strata must be in the same repo as the system morphology. Both the system "strata" field and the stratum "build-depends" field are affected.
* Strata contain "chunks", not "sources"Sam Thursfield2012-08-291-1/+1
| | | | Rename "sources" field of stratum morphologies to "chunks".
* python scripts: pep8ize codebaseRichard Maw2012-08-011-32/+30
| | | | | | | | | 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.
* Have MorphologyFactory set Morphology.builds_artifactsLars Wirzenius2012-07-181-16/+8
| | | | | | | | | | | | | This way we can have one place in the code where we determine what artifacts get built from a specific morphology, rather than spreading the information around the code base. From now on, everything is supposed to use the builds_artifacts attribute to get the list of artifacts. ArtifactResolver has been changed to do that. Some of the tests are now a bit messier, and should really be changed to create Morphology objects using MorphologyFactory, but that's a change for another day.
* ArtifactResolver: systems define multiple artifactsRichard Maw2012-07-031-16/+22
| | | | | Instead of a System source producing one System artifact, it can produce multiple System artifacts, dependent on if it is an ARM System.
* Have a default 'chunks' field in a chunk morphologyLars Wirzenius2012-04-181-1/+1
|
* Remove BuildGraph, compute cache keys based on Artifacts.Jannis Pohlmann2012-04-181-19/+10
| | | | | | | | | | | | With this commit, the ArtifactResolver no longer computes the cache keys when creating Artifact objects. This will have to happen as a post-resolving step (e.g. prior to building or checking whether a local or remote artifact cache has any of the resolved artifacts). The CacheKeyComputer now takes an Artifact object and computes the cache keys using its dependencies. BuildGraph is no longer needed for the CacheKeyComputer unit tests.
* Add a repo_name to Source, use that instead of repo in most places.Jannis Pohlmann2012-04-181-2/+2
| | | | | | | | | | This is because we will need to integrate a RemoteRepoCache and we don't always want to create a CachedRepo object (in fact, we only want that for the sources of artifacts we actually need to build). So we'll use either the local or the remote repo cache to resolve refs and morphology texts and then later, when actually caching a repo, we'll set the source.repo member to a CachedRepo object that we can then use to unpack the sources.
* Add original_name member to CachedRepo. Use it for SourcePool lookups.Jannis Pohlmann2012-04-171-2/+2
| | | | | | This is done to avoid a nasty mix of SourcePool lookups using CachedRepo objects (e.g. for strata within a system) versus lookups using repo names (e.g for sources within a stratum).
* Remove buggy cyclic dependency chain check from ArtifactResolver.Jannis Pohlmann2012-04-161-39/+4
| | | | However, leave a TODO note that we really want this in the source.
* Merge DependencyResolver into ArtifactResolver.Jannis Pohlmann2012-04-161-43/+220
|
* Add the new ArtifactResolver class.Jannis Pohlmann2012-04-121-0/+116
This class takes a CacheKeyComputer and a SourcePool, analyses the sources and their dependencies and creates a list of artifacts (represented by Artifact objects) that would be created when building sources in the pool.