summaryrefslogtreecommitdiff
path: root/morphlib
Commit message (Collapse)AuthorAgeFilesLines
* PythonDistutilsBuildSystem: set --prefixRichard Maw2012-04-231-1/+1
|
* morphlib/morph2: correct the unit testsRichard Maw2012-04-231-4/+4
|
* morphlib/morph2: default commands are NoneRichard Maw2012-04-231-4/+4
| | | | | | | | | | Builder checks whether commands need to be chosen from the build system by if the morphology has no commands, the check is whether the commands are None, rather than an empty list, so that it is possible to override a build system's commands with an empty list. However this means that the default of an empty list means that the build system is ignored and commands aren't run.
* morph: add cache id to the meta filesRichard Maw2012-04-203-1/+6
| | | | This is probably excessively large right now
* Add missing import for shutilLars Wirzenius2012-04-201-0/+1
|
* Remove unnecessary argument from unpack_binary_from_file callLars Wirzenius2012-04-201-1/+1
|
* Add log message to indicate we got an error while system image buildingLars Wirzenius2012-04-201-1/+3
| | | | | This'll make it easier to see from a log file why we suddenly unmount something.
* Only create mount point if it is missingLars Wirzenius2012-04-201-1/+2
|
* Add logging to easier trace what's happening in system buildingLars Wirzenius2012-04-201-0/+16
|
* Fix reference to morphology (via source, no longer in artifact)Lars Wirzenius2012-04-201-2/+2
|
* Merge branch 'master' of gitorious.org:baserock/morphLars Wirzenius2012-04-202-26/+53
|\
| * morphologyfactory: infer build system without listRichard Maw2012-04-202-26/+53
| | | | | | | | | | | | | | | | | | | | Detecting the build system is managed by it asking if any files exist detecting if the file exists is done with a callback function. This callback can use cat-file. If list_files existed this could be more efficient as it would not require the files to be read from the remote server and it only needs to be one round-trip
* | Always log output of commands executed, for easier build debuggingLars Wirzenius2012-04-201-7/+8
|/
* Fix how we run commands in a chrootLars Wirzenius2012-04-201-1/+2
| | | | | | We'll get back to linux-user-chroot later, but to do that, we need to sort out how we deal with the install-commands without needing real or fake root for them.
* morph: integrate MorphologyFactoryRichard Maw2012-04-201-0/+1
| | | | | | | | Traversing morphologies is a little simpler now, the callback for visit is enough to create a source pool This still needs repository caches to be able to list_files() before deducing a morphology will work.
* morphologyfactory: work without RemoteRepoCacheRichard Maw2012-04-202-6/+42
| | | | | There are cases where we would not need a remote cache, so it should be able to operate without one.
* Drop httplib2 in RemoteRepoCache, use custom HeadRequest and urllib2.Jannis Pohlmann2012-04-201-6/+13
| | | | | | | | | | | With a neat little trick, urllib2 can be made to only perform a HEAD request in urllib2.urlopen(). This is done by creating a dedicated HeadRequest class for HEAD requests and by passing such a HeadRequest to urllib2.urlopen(). This also means we no longer have to check the response status ourselves again as urllib2 will raise an exception on negative HTTP responses like 404 or 500.
* add morphology factoryRichard Maw2012-04-192-0/+153
|
* Add RemoteArtifactCache. Move metadata basename code into Artifact.Jannis Pohlmann2012-04-195-2/+262
|
* Fix LocalRepoCache tests.Jannis Pohlmann2012-04-192-4/+4
|
* Clone repos with no checkout, use correct gits cache dir in cmd_build.Jannis Pohlmann2012-04-191-2/+2
|
* Set cache key in newly created artifact objectsLars Wirzenius2012-04-181-1/+3
|
* Fixes to adapt to changes in masterLars Wirzenius2012-04-181-12/+11
|
* Make StagingArea get temporary directory separately from root directoryLars Wirzenius2012-04-182-8/+6
| | | | | | When we are not using --staging-chroot (e.g., bootstrap), we need to specify the temporary directory separately, because it needs to obey things like $TMPDIR.
* Fix minor problemsLars Wirzenius2012-04-183-5/+7
|
* Add a way to unpack a tar file from an open file handleLars Wirzenius2012-04-181-0/+12
|
* Log the actual environment variables used when runningLars Wirzenius2012-04-181-1/+1
|
* Have a default 'chunks' field in a chunk morphologyLars Wirzenius2012-04-183-1/+3
|
* Add preliminary build2 subcommandLars Wirzenius2012-04-181-3/+54
|
* Start a new builder classLars Wirzenius2012-04-183-0/+484
|
* 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-1812-1177/+75
| | | | | | | | | | | | 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
|
* Add RemoteRepoCache and integrate it into _create_source_pool().Jannis Pohlmann2012-04-183-0/+190
| | | | | | | | | | | | | | 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-189-113/+113
| | | | | | | | | | 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).
* 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
|