Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora-2.5
build
_service:gitpkg:0008-Add-skip-prep-to-ask-a-sui...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:gitpkg:0008-Add-skip-prep-to-ask-a-suitable-rpm-to-skip-the-prep.patch of Package build
From b195b89f01e4371b2c221620ffe2f1f31ef666f7 Mon Sep 17 00:00:00 2001 From: David Greaves <david@dgreaves.com> Date: Fri, 27 Jul 2012 10:00:49 +0100 Subject: [PATCH] Add --skip-prep to ask a suitable rpm to skip the %prep phase --- build | 7 +++++++ build-recipe-spec | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) mode change 100755 => 100644 build diff --git a/build b/build old mode 100755 new mode 100644 index ec111f7..0571e4c --- a/build +++ b/build @@ -135,6 +135,10 @@ Known Parameters: Exit once the chroot has been setup and before the build starts. Useful for making development root filesystems. + --skip-prep + When running build, skip the %prep phase. This can be + useful when using rsync. + --no-checks Do not run checks (postbuild and %check) --lint Run rpmlint after build. @@ -656,6 +660,9 @@ while test -n "$1"; do -chroot-only) DO_BUILD=false ;; + -skip-prep) + SKIP_PREP=true + ;; -nochecks|-no-checks) DO_CHECKS=false ;; diff --git a/build-recipe-spec b/build-recipe-spec index adecd95..232c688 100644 --- a/build-recipe-spec +++ b/build-recipe-spec @@ -10,7 +10,10 @@ recipe_setup_spec() { echo "Error: TOPDIR empty" cleanup_and_exit 1 fi - rm -rf "$BUILD_ROOT$TOPDIR" + if test -z "$SKIP_PREP"; then + # Don't clean up if we're using skip-prep + rm -rf "$BUILD_ROOT$TOPDIR" + fi for i in BUILD RPMS/`uname -m` RPMS/i386 RPMS/noarch SOURCES SPECS SRPMS BUILDROOT OTHER ; do mkdir -p $BUILD_ROOT$TOPDIR/$i done @@ -114,6 +117,10 @@ recipe_build_spec() { rpmbopts[${#rpmbopts[@]}]='--define' rpmbopts[${#rpmbopts[@]}]="RSYNCDONE 1" fi + if test -n "$SKIP_PREP" ; then + rpmbopts[${#rpmbopts[@]}]='--skip-prep' + rpmbopts[${#rpmbopts[@]}]='--skip-clean' + fi # su involves a shell which would require even more # complicated quoting to bypass than this -- 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