These patches rationalise the role of the repos in system branch
checkouts. For a system branch 'foo', we now only rely on the presence
of ref 'foo', and any other data we need is read from the local
repository cache instead. This is good, because the user can't break
that as easily, and we keep it up to date automatically.
I apologies for slight messiness in the patch series. The first patch
breaks tests that are fixed in the second, I'm happy to fix it if this
is super important, but the rebase looks complex and time is short.
Sam Thursfield (5):
Extract is_valid_sha1() to morphlib.git
Use origin/ref for all refs other than the system branch ref itself
Use repository cache for git access other than current system branch
morph merge: Rework how we interact with git
Revert "Save __file__ so we can recursively run morph later on"
morph | 5 +-
morphlib/cachedrepo.py | 21 +-
morphlib/cachedrepo_tests.py | 14 +-
morphlib/git.py | 13 +-
morphlib/plugins/branch_and_merge_plugin.py | 386 +++++++++------------
tests.branching/ambiguous-refs.script | 49 +++
tests.branching/merge-conflict-chunks.stderr | 7 +-
tests.branching/merge-conflict-chunks.stdout | 14 +-
tests.branching/merge-conflict-stratum.stderr | 2 +-
tests.branching/merge-conflict-stratum.stdout | 8 +-
tests.branching/merge-with-stratum-renamed.stderr | 2 +-
11 files changed, 257 insertions(+), 264 deletions(-)
create mode 100755 tests.branching/ambiguous-refs.script
create mode 100644 tests.branching/merge-with-stratum-renamed.stdout
I've been unable to decide whether 'morph merge my/branch' should
a) look for my/branch in the current workspace, or
b) pull my/branch from the remote repos, or
c) both, in some way
Also, if b., should we implicitly 'git remote update origin' in the
user's repos in the TO branch, or do 'git merge git://remote/branch' to
avoid treading on the user's toes?
Currently it does a), which makes sense for a single developer workflow
(no need to push) but more annoying when there is a separate integrator
(needs to checkout first).
Does anyone have an opinion on what we should do?
Small patch to update the names of the morphologies to the new names
James Thomas (1):
Update bootstrap script to use new names
baserock-bootstrap | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
It was decided that artifacts starting with their architecture was
ugly, since the flavour of the system is more important than its
I'm of the opinion that it makes the names line up better, but
the justification of architecture last makes more sense.
The third patch requires that the bootstrap script is changed with
x86_64-generic-bootstrap-pass3.morph => bootstrap-pass3-x86_64-generic.morph
imx53-bootstrap-pass3.morph => bootstrap-pass3-imx53.morph
Documentation changes will also be required, the list of renames
in the summary below will be useful.
Richard Maw (3):
Rename the bsp morphologies to suffixed architecture
Rename more commonly used system morphologies
Rename bootstrap morphologies
...stem.morph => base-system-armv7-versatile.morph | 4 ++--
...ystem.morph => base-system-x86_64-generic.morph | 7 ++-----
...trap-pass3.morph => bootstrap-pass3-imx53.morph | 2 +-
...3.morph => bootstrap-pass3-x86_64-generic.morph | 6 +++---
...ersatile-bsp.morph => bsp-armv7-versatile.morph | 2 +-
imx53-bsp.morph => bsp-imx53.morph | 2 +-
...4-generic-bsp.morph => bsp-x86_64-generic.morph | 2 +-
...tem.morph => devel-system-armv7-versatile.morph | 2 +-
...stem.morph => devel-system-x86_64-generic.morph | 4 ++--
9 files changed, 14 insertions(+), 17 deletions(-)
rename armv7-versatile-base-system.morph => base-system-armv7-versatile.morph (83%)
rename x86_64-generic-base-system.morph => base-system-x86_64-generic.morph (75%)
rename imx53-bootstrap-pass3.morph => bootstrap-pass3-imx53.morph (92%)
rename x86_64-generic-bootstrap-pass3.morph => bootstrap-pass3-x86_64-generic.morph (81%)
rename armv7-versatile-bsp.morph => bsp-armv7-versatile.morph (90%)
rename imx53-bsp.morph => bsp-imx53.morph (92%)
rename x86_64-generic-bsp.morph => bsp-x86_64-generic.morph (94%)
rename armv7-versatile-devel-system.morph => devel-system-armv7-versatile.morph (93%)
rename x86_64-generic-devel-system.morph => devel-system-x86_64-generic.morph (86%)
This patch adds a set to traverse_morphs used to check if a repo has
already been updated. If it has, pass false to resolve_ref so it isn't
updated multiple times
James Thomas (1):
Only update repos once
morphlib/app.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
Tested by: image built and verified it boots
This brings the disk size of devel images down from 10G to 2G.
The disk images are mostly sparse, but since most tools aren't
sparse-aware this causes copying them around to be slow.
2G is a known-good value. btrfs has been known to behave badly
for smaller sizes, though newer btrfs tools are capable of tuning
it to work reasonably for smaller sizes. This is worth researching
at a later date.
Given we have to make a release today, if this simple change isn't
merged by 1PM I will merge it myself.
Richard Maw (1):
Reduce the size of devel disk images
armv7-versatile-devel-system.morph | 2 +-
x86_64-generic-devel-system.morph | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)