summaryrefslogtreecommitdiff
path: root/morphlib
Commit message (Collapse)AuthorAgeFilesLines
* morphlib: move filesystem stuff out of builderRichard Maw2012-03-232-39/+78
| | | | | The system images will later need to be read, so useful commands want to be shared
* make get_cache_id not require a blob to be passedRichard Maw2012-03-231-15/+13
| | | | It only needs a morph, not a blob
* Squashme: Temporary changes to make boot with btrfs work.Jannis Pohlmann2012-03-221-26/+32
| | | | | This is achieved by copying vmlinuz, System.map and extlinux.conf to the default subvolume.
* Squashme: Switch to generating images using btrfs.Super user2012-03-221-9/+16
|
* Build system images using btrfs and factory/factory-run subvolumes.Jannis Pohlmann2012-03-221-16/+31
|
* Merge remote branch 'origin/master' into rm/morph-pass1Richard Maw2012-03-192-4/+8
|\
| * Avoid self-dependencies, do not add dependencies multiple times.Jannis Pohlmann2012-03-192-4/+8
| |
* | Merge remote branch 'origin/master' into rm/morph-pass1Richard Maw2012-03-162-5/+5
|\ \ | |/
| * tar: add -h option to extractionRichard Maw2012-03-162-2/+2
| | | | | | | | | | | | This should stop tar from replacing symbolic links with directories and instead follow the symbolic links, extracting the files into the linked directories
| * SystemBuilder: add newlines to fstabRichard Maw2012-03-161-3/+3
| | | | | | | | f.write does not add them
* | Merge branch 'master' into rm/morph-pass1-mergeRichard Maw2012-03-163-22/+56
|\ \ | |/
| * Fix morph cache key to use morphology filename rather than declared nameLars Wirzenius2012-03-151-1/+1
| | | | | | | | | | | | | | Previously, we could get a situation where chunks named the same way in two morphologies could interfere with each other: they could generate the same cache key, resulting in their chunks overwriting each other. Now this won't happen anymore.
| * Exclude from test coverage stuff without testsLars Wirzenius2012-03-151-3/+3
| | | | | | | | | | | | | | | | The code isn't making it easy to test just the size parsing code. This code shouldn't even be in morph, it should be re-using a library (such as the one in cliapp, but cliapp doesn't expose it nicely). All of this should be fixed, but for now, I'll just exclude things from test coverage. Shame be on me.
| * Fix test case for morphology disk-size fieldLars Wirzenius2012-03-151-1/+1
| | | | | | | | | | We now expect the disk size to be an integer (in bytes), since aren't just passing on to qemu-img (we don't use qemu-img anymore).
| * Fix system image building with morphLars Wirzenius2012-03-152-20/+54
| | | | | | | | The mkimage.sh script should now be unnecessary again.
* | build-system: autotools: use PREFIXRichard Maw2012-03-141-1/+1
| |
* | morphlib.builder.Builder: PREFIX changes cache-keyRichard Maw2012-03-131-1/+1
| | | | | | | | | | Add PREFIX to the whitelist of environment variables that can affect the cache keys.
* | morphlib.builder.Builder: fix sharing envRichard Maw2012-03-131-5/+8
| | | | | | | | | | | | | | | | | | | | Previous change would share the same environment between all Builders this may not have broken anything yet, but this change in behaviour was unintentional. The relevant cache keys are not altered by Builders and they are set at the time the Builder is created, so the build string can be cached rather than generated every time a cache key is needed
* | morphlib.builder.Builder: key depends on some envRichard Maw2012-03-131-2/+5
|/ | | | | | env is created in Builder's constructor from app.clean_env cache keys now contain parts of the environment that may cause chunks to be built differently
* morphlib/builder.py: bring it closer to mkimage.shRichard Maw2012-03-081-23/+21
| | | | | | | | | Use dd and sfdisk instead of qemu-img, parted and install-mbr Write files without using tee, that was only required when we were not expecting morph to be run as root partx has not been touched, I don't know enough about how to process the output in python and I don't speak awk
* Test for and include dirnames in chunks the same as filenamesLars Wirzenius2012-03-061-3/+1
|
* Return nothing from do_build/build; fix unassigned built_items bug.Jannis Pohlmann2012-03-061-13/+5
|
* Remove unused argument from Builder.build and build_single methodsLars Wirzenius2012-03-021-2/+2
|
* Remove unnecessary Builder.settings attributeLars Wirzenius2012-03-021-2/+2
| | | | We can use self.app.settings instead.
* Move cleaning of environment into morphLars Wirzenius2012-03-021-87/+12
| | | | | This is better done in morph, I think, since it is clear policy, and should not be buried deep in the call stack.
* Simplify instantiation of BlobBuilder subclassesLars Wirzenius2012-03-021-27/+21
|
* Remove unused app parameter and attribute to BlobBuilderLars Wirzenius2012-03-021-5/+4
|
* Remove unnecessary variableLars Wirzenius2012-03-021-1/+0
|
* Remove unnecessary method (which also had an unhelpful name)Lars Wirzenius2012-03-021-4/+1
|
* Remove unused kwargs usage from prepare_binary_metadataLars Wirzenius2012-03-021-3/+1
|
* Refactor to clarify code a tiny bit by moving variable setting close to useLars Wirzenius2012-03-021-1/+1
|
* Simplify how files are created in the cache directoryLars Wirzenius2012-03-021-11/+6
| | | | | | | | | The "cache prefix" concept is not immediately clear, and it's generally speaking best to centralize the construction of filenames in the cache to the CacheDir class anyway. Also, use SaveFile for writing the log file, instead of writing it to a temporary file and then copying, which is unnecessary I/O.
* Allow passing arguments to open() in CacheDir.openLars Wirzenius2012-03-021-2/+4
|
* Change Cachedir.open to allow dict_key instead of basename, and optional suffixLars Wirzenius2012-03-022-4/+25
|
* Simplify how BlobBuilder.builds gets implemented/inheritedLars Wirzenius2012-03-021-4/+10
| | | | | | | It needs to be different for each subclass, yet SystemBuilder was sharing the implementation with ChunkBuilder, which worked, but only by happenstance. Now each class has their own implementation and the base class has a NotImplemented implementation.
* Simplify what the BlobBuilder.build method doesLars Wirzenius2012-03-021-38/+38
| | | | | | It's not really the blob builder's job to unpack chunks, or determine whether something needs building or not. Moved those things to better places.
* Remove unnecessary variableLars Wirzenius2012-03-021-7/+2
|
* Refactor SystemBuilder and add helper classLars Wirzenius2012-03-023-126/+337
| | | | | | | | The helper class, Factory, has unit tests, which is why it's currently separate. It may later get integrated with BlobBuilder, or the other way around. Classes that don't have unit tests are marked out of coverage.
* Remove unnecessary import of time moduleLars Wirzenius2012-02-281-1/+1
|
* Add comment explaining PATH trickery when running ldconfigLars Wirzenius2012-02-281-0/+7
|
* Builder.build and build_single also do not need to return values anymoreLars Wirzenius2012-02-281-6/+1
|
* Remove unused needs_built methodLars Wirzenius2012-02-281-4/+0
|
* Use Tempdir.remove instead of rm, and drop unused Tempdir.clearLars Wirzenius2012-02-282-21/+0
| | | | | | | | If the remove method is insufficient (because it gets run as non-root, but some of the stuff needs root to remove them), then we need to fix the method, not replace it with other things. The Tempdir.clear method was not used anywhere, so YAGNI and removed it.
* Refactor tests to share more common codeLars Wirzenius2012-02-281-15/+18
|
* Remove pointless empty directory from testLars Wirzenius2012-02-281-2/+0
|
* Document why test ignore directory size and mtimeLars Wirzenius2012-02-281-0/+11
|
* Remove version numberLars Wirzenius2012-02-281-3/+0
| | | | | | We don't do releases, so having the version number in the source is misleading. If and when we start doing numbered releases, it's easy to add back. However, YAGNI and all that.
* Set sensible defaults for git-base-url, bundle-server, cachedir, max-jobsLars Wirzenius2012-02-281-4/+1
| | | | | | | | | | | | | | Also, change builder.py to always obey the --max-jobs setting, unless a morphology has a max-jobs field. The defaults have been chosen so that they work for everyone equally well. It may be useful to have a local mirror and then set the options to point there, but it's not reasonable to try to guess such things, so the defaults can be adapated to that. Collect the defaults into one place so they're easier to overview. The cliapp interface for adding settings is verbose enough that the defaults were getting buried.
* Remove unnecessary parenthesesLars Wirzenius2012-02-271-2/+2
|
* Remove unnecessary unittest tearDown methodLars Wirzenius2012-02-271-3/+0
|