diff options
author | Fabian Groffen <grobian@gentoo.org> | 2018-12-23 12:50:08 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2018-12-23 12:53:17 +0100 |
commit | 3ab261a36daa5a0b111a191041bfed629a8f399d (patch) | |
tree | 846404f9266ddfcd2757bd61f263d1331da12142 | |
parent | scripts/bootstrap-prefix.sh: fix portage PATH. (diff) | |
download | prefix-3ab261a36daa5a0b111a191041bfed629a8f399d.tar.gz prefix-3ab261a36daa5a0b111a191041bfed629a8f399d.tar.bz2 prefix-3ab261a36daa5a0b111a191041bfed629a8f399d.zip |
scripts/bootstrap-prefix.sh: allow direct rsync in bootstrap_tree
To test bootstrapping on a more recent tree than the latest snapshot,
allow special TREE_FROM_SRC envvar to specify the source to rsync after
unpacking a snapshot. This is intended for bootstrap testing only,
normal usage should never use this, hence the support being a bit
brittle. The exit code of this additional rsync step is ignored.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-x | scripts/bootstrap-prefix.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index fbaed65070..48ac9628de 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -543,6 +543,15 @@ bootstrap_tree() { else do_tree http://dev.gentoo.org/~grobian/distfiles prefix-overlay-${PV}.tar.bz2 fi + local ret=$? + if [[ -n ${TREE_FROM_SRC} ]]; then + rsync -av --delete \ + --exclude=.unpacked \ + --exclude=distfiles \ + --exclude=snapshots \ + "${TREE_FROM_SRC}"/ "${PORTDIR}"/ + fi + return $ret } bootstrap_startscript() { |