summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make StagingArea create build and install directories, run commandsLars Wirzenius2012-04-182-2/+90
|
* Log name of file when it gets renamedLars Wirzenius2012-04-181-0/+4
|
* Remove BuildGraph, compute cache keys based on Artifacts.Jannis Pohlmann2012-04-1813-1180/+76
| | | | | | | | | | | | 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.
* Fix unit tests by marking RemoteRepoCache._make_request as untested.Jannis Pohlmann2012-04-181-1/+1
|
* No longer set the repo object of Sources in _create_source_pool().Jannis Pohlmann2012-04-181-1/+0
| | | | This causes an undefined variable error.
* Add RemoteRepoCache and integrate it into _create_source_pool().Jannis Pohlmann2012-04-184-9/+225
| | | | | | | | | | | | | | This adds a new setting called 'cache-server' to morph. It is None by default and should be set to the HTTP URL of a morph cache server to be used. The RemoteRepoCache object provides two methods: resolve_ref() and cat_file(), both of which wrap the communication with the cache server and return a SHA1 string and file contents, respectively. The _create_source_pool() method now takes a local and an optional remote repo cache and tries to do whatever is best to resolve refs and load morphologies for the Source objects it creates.
* Add a repo_name to Source, use that instead of repo in most places.Jannis Pohlmann2012-04-1810-114/+115
| | | | | | | | | | 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.
* buildsystem.py: autotools project can only have a 'configure' fileJavier Jardón2012-04-181-0/+1
|
* Add an auto-detected 'python-distutils' build system.Jannis Pohlmann2012-04-171-1/+28
| | | | | This might still require --prefix to be passed to the install command to work with custom prefixes.
* Remember repo objects in LocalRepoCache to always return the same ones.Jannis Pohlmann2012-04-171-3/+10
|
* Add original_name member to CachedRepo. Use it for SourcePool lookups.Jannis Pohlmann2012-04-1710-102/+137
| | | | | | 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).
* Pass a repo object into Sources in _create_source_pool, not a repo name.Jannis Pohlmann2012-04-171-2/+2
|
* Add _create_source_pool() method and update show-dependencies.Jannis Pohlmann2012-04-172-46/+56
| | | | | | The Morph#_create_source_pool method takes a repo cache and a repo, ref, filename triplet and resolves all the sources involved in a potential build of this triplet.
* Re-implement show-dependencies using ArtifactResolver and BuildOrder.Jannis Pohlmann2012-04-162-132/+137
|
* Remove buggy cyclic dependency chain check from ArtifactResolver.Jannis Pohlmann2012-04-163-106/+6
| | | | However, leave a TODO note that we really want this in the source.
* 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 new BuildOrder class with tests.Jannis Pohlmann2012-04-163-0/+258
| | | | | | | This class implements the build order part of the old BuildGraph. It takes a list of artifacts with dependencies, creates independent build groups for these artifacts and provides an iterable interface to traverse these groups and their artifacts.
* cachekeycomputer: rename get_cache_key compute_keyRichard Maw2012-04-162-10/+42
| | | | | Also amend tests to operate on a dependency chain starting from a system morph
* Add Artifact documentaiton, fix morphlib module imports.Jannis Pohlmann2012-04-162-1/+15
|
* Merge DependencyResolver into ArtifactResolver.Jannis Pohlmann2012-04-166-1104/+742
|
* morphlib.git: fix submodule format stringRichard Maw2012-04-131-1/+1
|
* Add the new ArtifactResolver class.Jannis Pohlmann2012-04-124-0/+511
| | | | | | | 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.
* Accept any object that is an instance of morph2.Morphology in Source.Jannis Pohlmann2012-04-121-1/+1
|
* Gracefully handle dependencies of chunks on themselves.Jannis Pohlmann2012-04-122-0/+64
|
* buildenvironment: fix whitespaceRichard Maw2012-04-122-11/+11
|
* morphlib: add buildenvironment and testsRichard Maw2012-04-123-0/+235
| | | | | | | | | | | | | | | | BuildEnvironment should contain all the information about whatever settings affect the build. A subset of these will affect the cache key, but CacheKeyComputer filters them itself. BuildEnvironment has consumed the purpose of Morph.clean_env() because the build environment is a good place to store this information. The environment variables are decided based on the current settings. The current environment can be accessed by the env attribute. The tests are a little invasive because it reads environment variables and most of the work is done in the constructor, but they should test everything useful.
* cachekeycomputer tests: clean up different_keyRichard Maw2012-04-121-16/+24
| | | | | | Rather than poking the internals of both the build_environment and cachekeycomputer classes to change the environment, make a new build environment and cache key computer with a different environment
* cachekeycomputer: look up values in buildenvRichard Maw2012-04-121-4/+3
| | | | Duplicate data less, so it should be more manageable
* cachekeycomputer: prepare build environment changeRichard Maw2012-04-122-17/+19
| | | | | | CacheKeyComputer needs to know some stuff that is needed elsewhere as well. Rather than duplicate the storage, have a BuildEnvironment class to handle that.
* morphlib: add cachekeycomputer classRichard Maw2012-04-123-0/+175
|
* Remove final use of Treeish in submodules codeLars Wirzenius2012-04-122-4/+6
|
* Remove Treeish usage in submodule codeLars Wirzenius2012-04-121-24/+26
| | | | | This makes it possible to use the Submodule and Submodules classes in the refactored code that gets rid of Treeish completely.
* Merge branch 'master' of gitorious.org:baserock/morphLars Wirzenius2012-04-123-0/+962
|\
| * Add the new DependencyResolver class.Jannis Pohlmann2012-04-123-0/+962
| | | | | | | | | | | | This class takes a SourcePool and resolves the dependencies and dependents of all sources in this pool. It also performs basic (possibly incorrect) cycle detection.
* | Make copy_repository get a repo instead of treeishLars Wirzenius2012-04-122-3/+3
|/ | | | This helps refactoring morph to get rid of treeishes.
* Add a class to manage the staging area for buildsLars Wirzenius2012-04-123-0/+136
|
* Dump build times of all passes in baserock-bootstrap.Jannis Pohlmann2012-04-122-0/+84
| | | | | | This commit renames extract-build-times.py to dump-build-times and makes use of it after every pass in baserock-bootstrap. This will add the build times of all chunks to the bootstrap log.
* Add Artifact and LocalArtifactCache classes.Jannis Pohlmann2012-04-115-0/+295
| | | | | | | | | | | | | | | | 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).
* show-dependencies test: correct the stdoutRichard Maw2012-04-111-122/+122
| | | | | | The old form is more verbose, fully qualifying the repository and branch names. This is unnecessary as they should never be ambigous and the new form is much nicer to read.
* show-dependencies: use BuildGraph and SourcepoolRichard Maw2012-04-111-22/+46
| | | | | Rather than rely on the magic SourceManager, traverse the morphologies to list the sources, then create the dependency groups and print them
* morphlib.source: print the ref rather than the shaRichard Maw2012-04-111-1/+1
|
* morph update-gits: use return value of cache_repoRichard Maw2012-04-111-2/+1
|
* localrepocache: return repo after cloningRichard Maw2012-04-111-5/+14
|
* Add the new BuildGraph class including tests.Jannis Pohlmann2012-04-114-0/+1044
| | | | | This class takes a source pool and computes a valid build order for the sources in this pool, if possible.
* In update-gits, only iterate over 'build-depends' if that is possible.Jannis Pohlmann2012-04-111-2/+3
|
* Add original_ref member to Source. Default to None for build-depends.Jannis Pohlmann2012-04-115-13/+23
| | | | | | | | | 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.
* localrepocache tests: fake_git accept cwdRichard Maw2012-04-111-1/+1
|
* bootstrap: remove file copy outputRichard Maw2012-04-111-1/+1
| | | | | | When bootstrap updated morph it printed every file which moved, given this is a git repository, a lot of objects get listed. This made it harder to find real problems, so it is now removed.
* builder: ensure working directory matches commitRichard Maw2012-04-112-0/+8
| | | | | | | | When making a copy of the repository to build from, builder copies the .git directory then checks out the ref it wants. However sometimes this doesn't add the files to the working directory, possibly because the files it is missing weren't changed in the difference between what the .git thought HEAD was and what is now checked out.
* localrepocache: fixes to remote set-urlRichard Maw2012-04-111-3/+6
| | | | | | It needed shutil, but that exception was being missed. _git needs to be able to handle a different current directory for remote set-url to work