summaryrefslogtreecommitdiff
path: root/morphlib/app.py
Commit message (Collapse)AuthorAgeFilesLines
* Show status messages in local timesam/wipSam Thursfield2014-08-291-1/+1
| | | | | | | This is consistent with the timestamps in log files. Previously, running `morph --log=/dev/stdout' mixed local time with UTC, confusingly. It was jarring to have status output on screen which didn't match the time zone of the computer on which it was running, too.
* Resolve refs using remote cache in batches, not individuallySam Thursfield2014-08-291-45/+56
| | | | | There is significant overhead involved in making a HTTP request, so it's worth the extra code to batch these requests as much as possible.
* Raise exception if a ref is not valid in the remote repo cacheSam Thursfield2014-08-291-7/+7
| | | | | | Previously if a ref didn't resolve in the remote cache, we'd clone the repo into the local cache and check again. However, 99% of the time the clone comes from the remote cache so we should be able to assume that if the ref doesn't exist there, it doesn't exist at all.
* Fixup previousSam Thursfield2014-08-291-3/+6
|
* Read remote morphologies in batches rather than one at a timeSam Thursfield2014-08-291-35/+44
| | | | This should be a useful performance boost.
* Second atempt at fixing needless it updatesSam Thursfield2014-06-141-16/+13
|
* Only updated cached git repos when necessarySam Thursfield2014-06-141-2/+21
| | | | | | | | | | When the given ref points to a specific commit, and it's already available in the locally cached copy of repo, there's no need to update the repo. If the ref points to a branch or tag, and the user didn't pass --no-git-update, the locally cached copy of the repo will still be updated. This should speed up many Morph commands.
* Add --build-log-on-stdout flagRichard Ipsum2014-05-141-0/+3
|
* Add write and configuration extensions to help.Mark Doffman2014-03-311-32/+45
| | | | | | Add a command 'help-extensions' to list all extensions. Add the ability to find help on an extension by calling 'morph help [extension name]'.
* Give a useful error when attempting to build a cluster morphSam Thursfield2014-03-121-1/+4
| | | | | | | | | | | | | Previously this resulted in a confusing traceback. This is a quick fix. I'd rather insert the error in the buildcommand module instead, but that code assumes the source being built is a system in several places before it actually checks the kind. Those would all need to be changed, or the code would need to reworked to call _validate_root_kind() much earlier. The Application.traverse_morphs() method is rather ugly anyway, so I'm happy to add further ugliness to it for the time being.
* Make '--help' and help subcommand the same.Mark Doffman2014-03-041-16/+52
| | | | | '--help' when used with a subcommand will show the subcommand help. Do not reflow the help text by using a custom formatter.
* Revert "Make '--help' and help subcommand the same."Mark Doffman2014-02-211-53/+16
| | | | This reverts commit a72c8dca6965d1ac239e4f0102f08fbf7fe59ac7.
* Revert "Add write and configuration extensions to help."Mark Doffman2014-02-211-51/+38
| | | | This reverts commit 329b81419be20e7b1f2651a47030186216044eec.
* Add write and configuration extensions to help.baserock/markdoffman/s10382/add-help-option-v2Mark Doffman2014-02-211-38/+51
| | | | | | | Add a command 'help-extensions' to list all extensions. Add the ability to find help on an extension by calling 'morph help [extension name]'. This will then call the extension with the '--help' option to obtain help text.
* Make '--help' and help subcommand the same.Mark Doffman2014-02-211-16/+53
| | | | | '--help' when used with a subcommand will show the subcommand help. Do not reflow the help text by using a custom formatter.
* Allow omitting repo and ref when referring to strataRichard Maw2014-02-131-5/+5
|
* Add --artifact-cache-server and --git-resolve-cache-serverLars Wirzenius2013-10-291-0/+14
|
* Merge branch 'danielfirth/RT193'Daniel Firth2013-10-111-1/+1
|\ | | | | | | | | Reviewed by: Lars Wirzenius Reviewed by: Pedro Alvarezwq
| * Added chunkname prefix to some elements of the debug log.Dan Firth2013-10-111-1/+1
| |
* | Morph now validates the 'tarball-server' option as a urlDaniel Firth2013-10-101-0/+14
|/
* Allow building with null repo/refRichard Maw2013-09-261-2/+6
|
* Avoid formatting "morph help foo" outputLars Wirzenius2013-09-241-0/+25
| | | | | | | | The cliapp formatting doesn't understand Markdown. Adding Markdown support in Morph is more work than there is time for right now, but we'll do it later. This quick hack just means we output the raw Markdown rather than something that is incomprehensible due to ruined formatting.
* Remove --staging-chroot, --staging-filler optionsLars Wirzenius2013-09-171-25/+0
| | | | | This also removes the long-obsolete code to install staging fillers in the staging area. We've not allowed users to do that for ages now.
* Set build-ref-prefix to be based on trove-id if the setting existsTiago Gomes2013-07-311-3/+9
|
* Don't show git config messages for 'morph branch' in verbose modeRichard Dale2013-06-251-3/+10
|
* Remove SystemKindBuilderFactoryLars Wirzenius2013-06-201-2/+0
| | | | | | We now only support one system-kind, so there's no need for the factory stuff, and at this point it only serves to obfuscate and complexify.
* Shorten create_if_not_exists logicRichard Maw2013-06-061-11/+7
| | | | | | | | I find the loop easier to read since there's less redundancy. Also less code to maintain. Note that tmpdir is not explicitly created, since makedirs of one of its subdirectories will handle that.
* process_args: Move directory creation to after dump configRichard Maw2013-06-061-4/+4
| | | | | | I put my directory creation logic there, since it's an unintended side-effect to create the directories if all you want to do is dump the config.
* Merge branch 'baserock/tiagogomes/tmpdir' of ↵Tiago Gomes2013-06-051-10/+18
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.baserock.org/baserock/baserock/morph I had fixed an conflict and change to use morph_tmp instead of morph as default temp dir. Reviewed by Lars Wirzenius Conflicts: morphlib/app.py
| * Change the structure of the temporary directory used by morphTiago Gomes2013-06-051-5/+16
| | | | | | | | | | | | Now, inside the temporary directory we will have the following subdirectories: chunks, staging, failed and deployments. The failed directory will contain the staging areas of failed builds.
* | S7904: add new config options for minimum sizesRichard Maw2013-06-051-0/+28
| |
* | S7904: Move cache settings to storage optionsRichard Maw2013-06-051-10/+14
| |
* | Create cachedir and tempdir if they do not existRichard Maw2013-06-051-0/+6
|/ | | | | | | | | | | This has been a thorn in my side for many a deployment. A nascent cache directory will cause the size checks to fail. We could get complicated and try the parent directories, or create the directories in the size check, but the former is not worth the complication and the latter is the wrong place to put it, so do it during process_args, so the directories exist before subcommands are run, so they don't have to bother with it themselves.
* Merge branch 'liw/kill-bare-except'Lars Wirzenius2013-05-281-2/+2
|\ | | | | | | | | | | | | Reviewed-by: Richard Maw I, Lars, note that we have an old version of CoverageTestRunner in Baserock. The new version hides the spurious logging messages.
| * Stop using bare except: statementsLars Wirzenius2013-04-161-2/+2
| | | | | | | | | | | | | | | | | | It is almost never a good idea to catch all exceptions, and then do nothing about them. This patch logs all caught exceptions so that the user has some possibilty to debug what is happening. Also, make ./check check for bare excepts and fail the test suite if it finds anything.
* | Remove executable permissions from *.py files that have themLars Wirzenius2013-05-281-0/+0
| |
* | Merge branch 'ps/to-trove-id'Lars Wirzenius2013-05-271-3/+3
|\ \ | |/ |/| | | Changed Paul's patch so that --trove-prefix still works as an alias.
| * rename trove-prefix and trove_prefix to trove_idPaul Sherwood2013-04-131-3/+3
|/
* Fix condition for showing the staging-filler warningLars Wirzenius2013-03-201-1/+1
| | | | | | | If there is no staging-filler setting in a configuration file, it defaults to the empty string, not None. Reviewed-by: Jonathan Maw over the shoulder
* Warn if staging fillers are usedSam Thursfield2013-03-201-1/+5
| | | | | The 'master' branch of baserock:baserock/morphs no longer requires a staging filler.
* Add 'prefix' property for chunks within strataSam Thursfield2013-03-131-5/+0
| | | | | | | | | Morph no longer supports setting the prefix using the --prefix argument / setting. This was only used in tests and during bootstrap. If a chunk build-depends on a chunk within a stratum which has a custom prefix, that prefix is appended to the PATH in the build environment.
* Set environment variables defining target for build-essentialSam Thursfield2013-03-131-18/+0
| | | | | | In the future we will allow this to be modified to provide a cross-bootstrap mode, but for now we use the same target as the host compiler.
* Remove features used by old bootstrap methodSam Thursfield2013-03-131-24/+32
| | | | | | That means that bootstrapping Baserock is currently not possible with this branch of Morph, but there's no reason it cannot be bootstrapped using an older version of Morph instead.
* Change morph to reduce loogign of the environmentRic Holland2013-03-081-2/+3
| | | | | | | | Added function log_dict_diff to identify and record changes in dicts to the debug log This new function was then implemented in app.py to log changes in the environment
* Fix settings['tempdir'] not being setJonathan Maw2013-03-011-0/+5
|
* Make BuildCommand report current and total build stepsLars Wirzenius2013-02-211-1/+7
| | | | | | This adds a [Build 1/12765] to the output of the building of each artifact. This makes it easier to see how much work there might still be remaining.
* Remove deprecated functionsSam Thursfield2013-02-061-24/+0
|
* Fix copyright yearSam Thursfield2013-01-291-1/+1
|
* Disable distcc by defaultSam Thursfield2013-01-291-2/+3
| | | | | | | | | | | | | | | Current versions of build-essential in the Baserock morphologies don't contain distcc, but Morph tries to use distcc anyway. Since useful operation of distcc requires setting up a distcc network, there's no reason for it to be on by default. This change fixes bootstrap, and means that users of the build-essential staging filler no longer have to set no-distcc=true manually. In the future, cliapp will grow automatic boolean negation, which will allow us to turn this setting into a 'distcc' setting that defaults to false rather than the current rather ugly double negative.
* Fix default setting for compiler cache dir; update testsJannis Pohlmann2012-12-171-4/+7
| | | | Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk>