Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora-2.5
build
_service:gitpkg:0012-Move-the-rsync-overlay-act...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:gitpkg:0012-Move-the-rsync-overlay-actions-prior-to-any-2nd-stag.patch of Package build
From 442996fd2d33e5bcb8986a49a51412302cb898e5 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 0571e4c..ad13675 100644 --- a/build +++ b/build @@ -1065,6 +1065,38 @@ for RECIPEFILE in "${RECIPEFILES[@]}" ; 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 missing target directory ($BUILD_TARGET/$RSYNCDEST)." + 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 not a directory - skipping" + fi + else + echo "RSYNCSRC given, but not RSYNCDEST - skipping" + fi + fi + if test -n "$VM_TYPE" -a -z "$RUNNING_IN_VM"; then vm_first_stage cleanup_and_exit 0 @@ -1250,37 +1282,6 @@ for RECIPEFILE in "${RECIPEFILES[@]}" ; do echo ----------------------------------------------------------------- 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 missing target directory ($BUILD_TARGET/$RSYNCDEST)." - 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 not a 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.9.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor