summaryrefslogtreecommitdiff
path: root/morphlib/artifact.py
Commit message (Collapse)AuthorAgeFilesLines
* Use the modern way of the GPL copyright header: URL instead real addressJavier Jardón2015-03-161-3/+2
| | | | Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
* Remove out of date commentRichard Ipsum2014-10-101-3/+0
|
* Remove Artifact compatibility methodsRichard Maw2014-09-191-34/+1
|
* Remove get_dependency_prefix_setRichard Maw2014-09-191-14/+0
| | | | | | | | This was used by artifacts to tell what they should put in their path, based on what prefixes were used earlier. This implementation didn't handle recursive deps, and it was trivial to open-code it at the call-site, so it is no longer useful.
* FIXUP: Add compatibility methods to Artifact for fields that moved to SourceRichard Maw2014-09-191-1/+35
| | | | | This means we can avoid having to rewrite everything immediately after the fields moved.
* Move dependencies and cache keys to SourcesRichard Maw2014-09-191-21/+3
|
* Tidy morphlib.artifact.Artifact.metadata_basenameRichard Maw2014-09-191-4/+1
|
* Move metadata_version value to cachekeycomputerRichard Maw2014-09-191-4/+0
| | | | | | | | | | | | metadata_version is for when the format of the /baserock metadata files changes. This means it would make sense for it to either live with the code for generating the metadata, or the cache key code so it lives with the rest of the compatibility values. Since the code for generating the metadata isn't in a nice module anywhere, I've put it in the cachekeycomputer module.
* Add __repr__ method to Source and SplitRulesRichard Maw2014-09-171-0/+3
| | | | | This helps debugging issues with rule matching, since SplitRules can be print-statemented
* Allow non-unicode paths to be hardlinked into staging areasbaserock/richardmaw/bugfix/unicode-safe-pathsRichard Maw2014-07-111-5/+5
| | | | | | | | | | Parts of the morphology go into the name of the staging area, so it helps to convert them into a str, so later attempts to join it with another string don't result in a unicode string. pyfilesystem insists that file paths must be unicode. It is incorrect, but we passed something unicode compatible in in the first place, so we can get away with converting it back to a bytestring.
* Include the artifact metadata-version in the cache id keyRichard Dale2013-05-241-2/+4
|
* Add contents list to chunk and stratum metadataRichard Dale2013-05-241-0/+2
|
* Add 'prefix' property for chunks within strataSam Thursfield2013-03-131-0/+14
| | | | | | | | | 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.
* Refactor build processSam Thursfield2013-03-131-1/+0
| | | | | | | | | | | | | | | | | | Reorganise the build_artifact() and build_artifacts() functions to allow more complex work when setting up chunk builds in build_artifact(). The staging area now holds the BuildEnvironment object (the environment variables that should be set during build). This makes sense because all build commands should be run inside the staging area and therefore through the StagingArea object. The BuildEnvironment object is now considered immutable after it is created. The environment is used in cache key computation when computing what artifacts are required; if it changes after that point we risk either computing different artifact keys for the same artifact or missing data in the cache key that should be included in the hash. Better to force changes into a separate 'extra_env' variable.
* Avoid infinite looping when walking artifact dep graphLars Wirzenius2013-02-221-3/+3
| | | | Reported-By: Sam Thursfield
* Replace builder order graph with just a single artifactLars Wirzenius2013-02-191-1/+22
| | | | | The artifact's build dependencies replace the build order graph from previously.
* python scripts: pep8ize codebaseRichard Maw2012-08-011-11/+11
| | | | | | | | | 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.
* morph: add cache id to the meta filesRichard Maw2012-04-201-0/+2
| | | | This is probably excessively large right now
* Add RemoteArtifactCache. Move metadata basename code into Artifact.Jannis Pohlmann2012-04-191-0/+6
|
* Remove BuildGraph, compute cache keys based on Artifacts.Jannis Pohlmann2012-04-181-2/+2
| | | | | | | | | | | | 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.
* Change __str__() method of Artifact, add basename() method.Jannis Pohlmann2012-04-161-1/+3
| | | | | | | The __str__() method returns "x|y|z|a" where x is the repo, y is the original ref, z is the morphology filename and a is the name of the artifact. This is a consistent extension of the str() implementation of Source, which returns just "x|y|z".
* Add Artifact documentaiton, fix morphlib module imports.Jannis Pohlmann2012-04-161-0/+15
|
* Merge DependencyResolver into ArtifactResolver.Jannis Pohlmann2012-04-161-0/+13
|
* Add the new ArtifactResolver class.Jannis Pohlmann2012-04-121-0/+5
| | | | | | | 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.
* Add Artifact and LocalArtifactCache classes.Jannis Pohlmann2012-04-111-0/+22
An Artifact represents a thing that morph has built. An example would be eglibc-runtime which morph may have built from the eglibc chunk morphology. Another example would be a ready-to-use system image. The LocalArtifactCache allows to store build artifacts in a local directory. Users of this class can ask it whether it has a certain artifact. They can also optain an I/O handle to read the artifact data from. In addition to just abstracting the way artifacts are stored, LocalArtifactCache also allows to store and retrieve metadata for (a) artifacts and (b) sources (the latter requires a cache key to be provided to the LocalArtifactCache).