Search
SailfishOS Open Build Service
>
Projects
>
home:plfiorini
:
maui:devel
:
x86_64
>
build
> _service:tar_git:0013-Move-the-rsync-overlay-actions-prior-to-any-2nd-stag.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:0013-Move-the-rsync-overlay-actions-prior-to-any-2nd-stag.patch of Package build
From ec015a3f35ed902beb5dd49963495655dea2ffc7 Mon Sep 17 00:00:00 2001 From: David Greaves <david@dgreaves.com> Date: Mon, 3 Sep 2012 11:44:29 +0100 Subject: [PATCH] Move the rsync/overlay actions prior to any 2nd stage (they are useful for sb2 and probably lxc) Signed-off-by: David Greaves <david@dgreaves.com> --- build | 63 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/build b/build index 4565d69..b5038f7 100644 --- a/build +++ b/build @@ -1524,6 +1524,38 @@ for SPECFILE in "${SPECFILES[@]}" ; do fi fi + # Do the overlay and rsync before entering any lxc or chroot + if test -n "$OVERLAY" ; then + if test -d "$OVERLAY"; then + pushd $OVERLAY + echo "Copying overlay to BUILD_TARGET" + tar -cpf - . | (cd $BUILD_TARGET ; tar -xvf -) + popd + else + echo "OVERLAY ($OVERLAY) is no directory - skipping" + fi + fi + + if test -n "$RSYNCSRC" ; then + if test -n "$RSYNCDEST"; then + if test -d "$RSYNCSRC"; then + if ! test -d "$BUILD_TARGET/$RSYNCDEST"; then + echo "ATTENTION! Creating target directory ($BUILD_TARGET/$RSYNCDEST) as its not there." + mkdir -p $BUILD_TARGET/$RSYNCDEST + fi + echo "Running rsync ..." + rsync -av $RSYNCSRC/* $BUILD_TARGET/$RSYNCDEST/ + chown -R "$ABUILD_UID:$ABUILD_GID" "$BUILD_TARGET/$RSYNCDEST" + RSYNCDONE=true + echo "... done" + else + echo "RSYNCSRC is no directory - skipping" + fi + else + echo "RSYNCSRC given, but not RSYNCDEST - skipping" + fi + fi + if test -n "$VM_TYPE" -a -z "$RUNNING_IN_VM"; then rm -rf $BUILD_ROOT/.build mkdir -p $BUILD_ROOT/.build @@ -2097,37 +2129,6 @@ for SPECFILE in "${SPECFILES[@]}" ; do BUILD_SUCCEEDED=false - if test -n "$OVERLAY" ; then - if test -d "$OVERLAY"; then - pushd $OVERLAY - echo "Copying overlay to BUILD_TARGET" - tar -cpf - . | (cd $BUILD_TARGET ; tar -xvf -) - popd - else - echo "OVERLAY ($OVERLAY) is no directory - skipping" - fi - fi - - if test -n "$RSYNCSRC" ; then - if test -n "$RSYNCDEST"; then - if test -d "$RSYNCSRC"; then - if ! test -d "$BUILD_TARGET/$RSYNCDEST"; then - echo "ATTENTION! Creating target directory ($BUILD_TARGET/$RSYNCDEST) as its not there." - mkdir -p $BUILD_TARGET/$RSYNCDEST - fi - echo "Running rsync ..." - rsync -av $RSYNCSRC/* $BUILD_TARGET/$RSYNCDEST/ - chown -R "$ABUILD_UID:$ABUILD_GID" "$BUILD_TARGET/$RSYNCDEST" - RSYNCDONE=true - echo "... done" - else - echo "RSYNCSRC is no directory - skipping" - fi - else - echo "RSYNCSRC given, but not RSYNCDEST - skipping" - fi - fi - if test "$DO_BUILD" = false ; then echo "Not doing build as requested" continue -- 1.7.10.3