| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This causes an undefined variable error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This might still require --prefix to be passed to the install
command to work with custom prefixes.
|
| |
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
However, leave a TODO note that we really want this in the source.
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Also amend tests to operate on a dependency chain starting from
a system morph
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Duplicate data less, so it should be more manageable
|
|
|
|
|
|
| |
CacheKeyComputer needs to know some stuff that is needed elsewhere
as well. Rather than duplicate the storage, have a BuildEnvironment
class to handle that.
|
| |
|
| |
|
|
|
|
|
| |
This makes it possible to use the Submodule and Submodules classes
in the refactored code that gets rid of Treeish completely.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
| |
This helps refactoring morph to get rid of treeishes.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Rather than rely on the magic SourceManager, traverse the morphologies
to list the sources, then create the dependency groups and print them
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This class takes a source pool and computes a valid build order for
the sources in this pool, if possible.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
|