| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The original resolve_artifacts method is essentially unchanged,
it's just private now. This means that aside from this name change
the tests remain the same.
|
| |
|
|
|
|
|
| |
This is logically part of the previous patch, but has been split out to
ease reviewing.
|
|
|
|
|
| |
This was used before the Artifact splitting code landed to determine
which artifacts should be produced.
|
| |
|
|
|
|
|
| |
This commit removes all use of morph2 from the unittests, replacing it
with morphloader/morph3. It also converts the test morphologies to YAML.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rationale
=========
This patch series implements the concept of stratum splitting.
For a long time we've had code to split a chunk into multiple artifacts,
however there's not been a way to split strata up, or systems select a
subset of the produced stratum artifacts to be included in the system.
This patch series implements the ability to split strata and have systems
include them in a way which still has the same behaviour if no rules
are specified, but with default rules that split chunk artifacts up into
various components, strata into runtime and development versions and has
systems include everything by default, but can be told to include less.
The default rules have chunk foo split up into -bins, -libs, -devel,
-doc, -locale and -misc.
These rules can be overridden in the chunk morphology by adding the new
'products' field, which lists match rules like the following:
products:
- artifact: libudev
include:
- (usr/)?lib(32|64)?/lubg?udev\..*
- artifact: udev
include:
- (usr/)?s?bin/udev*
- (usr/)?lib(32|64|exec)?/systemd/systemd-udevd
Strata are by default split into -runtime and -devel. -devel by default
contains chunks ending with -devel and -doc, -runtime contains everything
else.
Extra match rules can be added to a stratum similarly to chunks, but
instead of matching file names, they match artifact names.
products:
- artifact: core-python
include:
- "cpython-.*" # lazy shortcut to put all of cpython in this stratum
- "python-.*" # lazy shortcut to include all python chunks in
Additionally, in chunk specs, chunk artifacts may be assigned to stratum
artifacts, this takes precedence over products match rules in the stratum
and the default match rules. Assigning the chunk to `null` will discard
the chunk.
chunks:
...
- name: systemd
...
artifacts:
libudev: foundation-runtime
udev: foundation-runtime
systemd-doc: null
By default a system includes every produced artifact of every stratum
listed. Instead a subset can be specified in the stratum spec as follows:
name: tiny-system
strata:
- name: build-essential
...
artifacts:
- build-essential-runtime
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
armv5 and armv7 are different enough to be a problem, so specify
which particular arm sub-architecture we currently support.
|
|
|
|
| |
Adjust all other parts and the tests to work with this.
|
|
|
|
|
| |
We now enforce name uniqueness and don't yet implement a way of
providing an alias for chunks, so self-dependency is impossible.
|
|
|
|
| |
Helps avoid parameter-list-blindness when reading the testcases
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Rename "sources" field of stratum morphologies to "chunks".
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This fixes references to a system artifact without the -rootfs appended
and adds a unit test for resolving an arm system artifact.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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 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).
|
|
|
|
| |
However, leave a TODO note that we really want this in the source.
|
| |
|
|
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.
|