summaryrefslogtreecommitdiff
path: root/morphlib/app.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Cache resolved refs and morphologies when traversing morphsJannis Pohlmann2012-12-131-4/+18
| | | | | | | This cuts down on the number of HTTP requests made while computing th build order (> create source pool > traverse morphs). In an example system I was building this patch reduced the requests from 501 to 195, reducing the time to building the first chunk from 123s to 18s.
* morph build: Allow forcing build branches to be pushedSam Thursfield2012-11-121-0/+4
| | | | | This is for users who prefer the old behaviour of building from the remote repos.
* Set option group for some advanced settingsSam Thursfield2012-10-311-20/+36
| | | | | | | | It would be nice to put every option in a group, but for now the built-in cliapp options cannot be grouped so the output is less than ideal. Also, we have no way of setting an order for groups, which results in e.g. 'Advanced Options' preceeding 'General Options' etc.
* Reduce some option descriptionsSam Thursfield2012-10-261-27/+13
|
* Reorder settings by broad categorySam Thursfield2012-10-261-58/+59
| | | | | | | | Also remove the '--ignore-submodules' option, which is redundant. Hopefully cliapp will one day support option grouping, so we can hide some sets by default and group eg. all the logging options together.
* Change the time sanity checkLars Wirzenius2012-10-081-13/+6
| | | | | | | | | | | | | We were having trouble with NTP setting the system time to be correct after .pyc files had already been created. The .pyc files got created at startup, before NTP had had a chance to run. This sometimes resulted in .pyc timestamps being wildly wrong and far in the future or past, and that would prevent morph from ever working again on the machine. We now just check that the system time is not far in the past. This is enough to make sure we don't create timestamps that break tar. Reviewed-By: Daniel Silverstone (on irc)
* No need for iterable when initializing the setJames Thomas2012-10-011-1/+1
|
* Only update repos onceJames Thomas2012-10-011-1/+5
|
* Increase verbosity regarding the remote artifact cache.Daniel Silverstone2012-09-281-1/+8
| | | | | | | This simply increases the verbosity of the operations which are done against the remote artifact cache. It should result in some progress messages if you build with --verbose set and you're mostly getting stuff from your remote artifact cache (Trove).
* Use tarballs instead of bundlesDaniel Silverstone2012-09-251-5/+5
| | | | | | | This makes a non-backward-compatible change to morph which switches it to using tarballs instead of bundles when initialising cached git repositories. This is faster because it doesn't require index-pack --fix-thin operations on the machine running morph.
* Default bundle-server and cache-server based on trove-host.Daniel Silverstone2012-09-251-3/+13
| | | | | | | This causes bundle-server and cache-server to be defaulted to appropriate Trove related URLs unless overridden in the configs. Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
* Merge branch 'baserock/radiofree/check_mtime'Lars Wirzenius2012-09-241-0/+15
|\
| * Small coding standards/message fixesJames Thomas2012-09-211-2/+2
| |
| * Check the mtime of the app.py to make sure it is not in the futureJames Thomas2012-09-211-0/+15
| | | | | | | | If it's in the future this may cause problems, so exit with an error
* | morph petrify: Rewrite in the style of todaySam Thursfield2012-09-211-3/+2
|/
* Merge branch 'samthursfield/S4556-triplet-consistency' of ↵Richard Maw2012-09-131-1/+1
|\ | | | | | | git://roadtrain.codethink.co.uk/baserock/morph
| * Don't require .morph in triplet argumentsSam Thursfield2012-09-121-1/+1
| | | | | | | | | | | | | | | | | | This gives us consistency with morphologies, where the triplets are repo|ref|morphology, not repo|ref|filename Anyone who runs 'morph build baserock:morphs master system.morph' will now see an error ending with 'was looking for system.morph.morph', which should make it clear where they have gone wrong.
* | Test the trove-* support.Daniel Silverstone2012-09-121-0/+4
| | | | | | | | | | | | | | | | | | This adds a way to cause the processed configuration to be dumped out. We do this in the overridden process_args method so that the configuration dumped has had all the processing done on it which is necessary. The test then uses this functionality to ensure that the repo-alias setting has been correctly updated with the Trove-hosted prefixes.
* | Add support for Trove hosted content to morph configuration.Daniel Silverstone2012-09-121-6/+26
|/ | | | | | | | | | | Trove has a fixed structure for repositories and prefixes. By taking advantage of this, we can simplify the repo-alias configuration in morph somewhat and thus make it easier for others to add their own aliases and prefixes later, without worrying that they'll miss out on default ones created by the Baserock team. We override process_args in the application class to achieve this because cliapp's setup() hook is not quite right for our purposes.
* Add 'build-prefix-ref' setting for creating temporary build refsJannis Pohlmann2012-09-071-0/+6
| | | | | | | This is needed to create temporary build refs and push them to the repository server. We want this to be configurable to make things more flexible with regards to different repository server configurations.
* Resolve tree SHA1 along with commit SHA1 when resolving refsJannis Pohlmann2012-09-051-9/+9
| | | | Adjust all other parts and the tests to work with this.
* Strata should be referred to with full repo/ref/morph tripletsSam Thursfield2012-08-301-2/+2
| | | | | | | | 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.
* Strata contain "chunks", not "sources"Sam Thursfield2012-08-291-1/+1
| | | | Rename "sources" field of stratum morphologies to "chunks".
* Change default repo-aliases to git.baserock.orgDaniel Silverstone2012-08-151-5/+5
| | | | | | | Sanitise the git repo aliases to use git.baserock.org instead of the old roadtrain.codethink.co.uk hostname. This will cause a re-fetch of gits, unless you fix up your cache first
* Move cmd_build to a separate pluginRichard Maw2012-08-011-17/+0
| | | | | It's such a small amount of code, it's possibly not worth it, but now all commands are in plugins.
* Move BuildCommand from app into its own moduleRichard Maw2012-08-011-279/+1
| | | | | | | | morphlib.app should be for application bringup and providing command line options used by the library code. Any external plugins that refer to morphlib.app.BuildCommand will need fixing.
* Move edit to plugin and remove dead code from appRichard Maw2012-08-011-156/+0
| | | | | Some miscellaneous cleanup of functions was done, so new apis like savefile and status are used.
* Move merge command to pluginRichard Maw2012-08-011-18/+0
| | | | | | | resolve_reponame is now duplicated since other functions use it. cmd_edit uses everything, so they can be removed from morphlib.app when it is moved to a plugin.
* Move command petrify to branch_and_merge pluginRichard Maw2012-08-011-35/+0
| | | | | This does not require any other function movements, due to its simple implementation.
* move command show-system-branch to pluginRichard Maw2012-08-011-12/+0
| | | | | deduce_system_branch is now duplicated because other commands not yet moved require it.
* Move commands branch and checkout to pluginRichard Maw2012-08-011-41/+0
| | | | | clone_to_directory is currently duplicated because other commands not yet moved require it.
* Move init and minedir to branch_and_merge pluginRichard Maw2012-08-011-28/+0
| | | | | deduce_mine_directory is duplicated in the plugin and morphlib.app until all the commands are moved into the plugin.
* Move command make-patch to Trebuchet pluginRichard Maw2012-08-011-91/+0
| | | | | | | | The plugin is called trebuchet, so that if any other functionality is required from morph it has a place to go. make-patch generates a trebuchet patch, so it should go in the trebuchet plugin.
* Move utility functions for creating cachesRichard Maw2012-08-011-43/+4
| | | | | | | | | | | Code for creating caches is repeated through the codebase because there wasn't a useful function for creating caches. Now the functions in BuildCommand have been moved into morphlib.util, where they will be more usefully reachable. Stubs have been left in BuildCommand so they can be overridden by subclasses of BuildCommand and not break external plugins.
* morph: move update-gits to pluginRichard Maw2012-08-011-48/+18
| | | | This also publicizes cache_repo_and_submodules and traverse_morphs
* Publicize _itertriplets and _create_source_poolRichard Maw2012-08-011-6/+19
| | | | | | | | | itertriplets and create_source_pool are more convenient than doing it manually, and since they need to be used by plugins, they shouldn't be private. The private name is kept as an alias so that external plugins that were poking at the internals for convenience aren't broken.
* move show-dependencies command into a pluginRichard Maw2012-08-011-39/+0
|
* python scripts: pep8ize codebaseRichard Maw2012-08-011-168/+170
| | | | | | | | | 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.
* Fix code path for error handlingLars Wirzenius2012-07-261-4/+7
| | | | The old stuff was trying to use an uninitialized local variable.
* Refactor system building to use syskind specific classLars Wirzenius2012-07-261-0/+2
|
* Merge branch 'liw/require-system-kind'Lars Wirzenius2012-07-231-4/+2
|\ | | | | | | | | Reviewed-By: Richard Maw Reviewed-By: Lars Wirzenius
| * Set Morphology.needs_artifact_metadata_cachedLars Wirzenius2012-07-191-3/+1
| |
| * Have MorphologyFactor set Morphology.needs_staging_areaLars Wirzenius2012-07-191-1/+1
| |
* | morph: Add a sensible default path of morphlib/pluginsRichard Maw2012-07-181-0/+4
|/ | | | | | | | | | Plugins which don't need configuring should install themselves into morphlib/plugins, this can be done as part of distutils by import morphlib plugin_dir = os.path.join(os.path.dirname(morphlib.__file__), 'plugins') from distutils.core import setup setup(data_files=[(plugin_dir, plugins)])
* Add status messages for git clones / updatesLars Wirzenius2012-07-161-0/+4
|
* Merge remote branch ↵Lars Wirzenius2012-07-161-4/+13
|\ | | | | | | 'remotes/origin/baserock/bugfix/S3595-morph-updates-gits-too-often-rebase'
| * BuildCommand: don't always update git repositoriesRichard Maw2012-07-131-4/+13
| | | | | | | | | | | | The repositories may have been updated during the process of calculating the cache keys, so check whether the locally cached repository already has the commit before attempting to update it.
* | Predefine git URIs for freedesktop: reposSam Thursfield2012-07-121-0/+3
|/
* Do not uselessly fill staging area for strataLars Wirzenius2012-07-111-3/+4
| | | | | | We don't use the contents of the staging area during a stratum artifact build, so there's no pointin putting in the staging filler and build dependencies there.
* Move stratum verification to morphologyfactoryRichard Maw2012-07-111-12/+0
| | | | | | | | | | I think morphologies should be verified closer to where they are created, not when they are traversed, since this verification would be useful in more code paths. This is in morphologyfactory, rather than Morphology itself, since it may be useful to be able to create morphologies without checking, such as in unit tests.