diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-08-10 20:29:41 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-08-12 18:07:41 +0100 |
commit | 4d794d475e01363928916f7667a63eed6071f5e2 (patch) | |
tree | 522888cbfc00b7ad5d59e4f7ebd1daf7f6324639 /yarns/implementations.yarn | |
parent | d63f41dadf5aa96a8d9254d31e92711ee160245e (diff) | |
download | morph-4d794d475e01363928916f7667a63eed6071f5e2.tar.gz |
yarns: Start from petrified refs
This is closer to our current workflow, where we are always petrified
and update the ref field when we need to update a component.
This required rearranging the operations to create the chunk repository
before the definitions repository, and remove a check that assumes we
weren't already petrified.
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r-- | yarns/implementations.yarn | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 24f67a1b..66dd9d57 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -67,7 +67,28 @@ another to hold a chunk. # Create a directory for all the git repositories. mkdir "$DATADIR/gits" - # Create a repo for the system and stratum morphologies. + # Create the chunk repository. + + mkdir "$DATADIR/gits/test-chunk" + + run_in "$DATADIR/gits/test-chunk" git init . + cat > "$DATADIR/gits/test-chunk/test-bin" <<'EOF' + #!/bin/sh + echo Hello World + EOF + cat > "$DATADIR/gits/test-chunk/test.h" <<'EOF' + int foo(void); + EOF + cat > "$DATADIR/gits/test-chunk/test.pc" <<'EOF' + prefix=/usr + includedir=${prefix}/include + Name: test + Cflags: -I{includedir} + EOF + run_in "$DATADIR/gits/test-chunk" git add . + run_in "$DATADIR/gits/test-chunk" git commit --allow-empty -m Initial. + + # Create a repo for the morphologies. mkdir "$DATADIR/gits/morphs" @@ -88,15 +109,12 @@ another to hold a chunk. - name: test-chunk repo: test:test-chunk morph: test-chunk.morph - ref: master + unpetrify-ref: master + ref: $(run_in "$DATADIR/gits/test-chunk" git rev-parse master) build-mode: test build-depends: [] EOF - # Create the chunk repository. - - mkdir "$DATADIR/gits/test-chunk" - # To verify that chunk splitting works, we have a chunk that installs # dummy files in all the places that different kinds of files are # usually installed. e.g. executables in `/bin` and `/usr/bin` @@ -240,23 +258,6 @@ another to hold a chunk. run_in "$DATADIR/gits/morphs" git commit -m Initial. run_in "$DATADIR/gits/morphs" git tag -a "test-tag" -m "Tagging test-tag" - run_in "$DATADIR/gits/test-chunk" git init . - cat > "$DATADIR/gits/test-chunk/test-bin" <<'EOF' - #!/bin/sh - echo Hello World - EOF - cat > "$DATADIR/gits/test-chunk/test.h" <<'EOF' - int foo(void); - EOF - cat > "$DATADIR/gits/test-chunk/test.pc" <<'EOF' - prefix=/usr - includedir=${prefix}/include - Name: test - Cflags: -I{includedir} - EOF - run_in "$DATADIR/gits/test-chunk" git add . - run_in "$DATADIR/gits/test-chunk" git commit --allow-empty -m Initial. - # Create the Morph configuration file so we can access the repos # using test:foo URL aliases. @@ -293,7 +294,8 @@ have a morphology using the test architecture. - name: stage1-chunk morph: stage1-chunk.morph repo: test:test-chunk - ref: master + ref: $(run_in "$DATADIR/gits/test-chunk" git rev-parse master) + unpetrify-ref: master build-mode: bootstrap build-depends: [] EOF @@ -307,7 +309,8 @@ have a morphology using the test architecture. - name: test-chunk morph: test-chunk.morph repo: test:test-chunk - ref: master + unpetrify-ref: master + ref: $(run_in "$DATADIR/gits/test-chunk" git rev-parse master) build-mode: test build-depends: [] EOF |