Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:tools
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 96b465a67ea6b3e5cdd1ddf1d4889c0b2202815d 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 | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) mode change 100755 => 100644 build diff --git a/build b/build old mode 100755 new mode 100644 index 12187b3..7baa16c --- a/build +++ b/build @@ -199,6 +199,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) --logfile logfile @@ -1066,6 +1070,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 2d02aee..812b841 100644 --- a/build-recipe-spec +++ b/build-recipe-spec @@ -28,7 +28,7 @@ recipe_setup_spec() { if test -z "$TOPDIR"; then cleanup_and_exit 1 "Error: TOPDIR empty" fi - test "$DO_INIT_TOPDIR" = false || spec_init_topdir + test -n "$SKIP_PREP" -o "$DO_INIT_TOPDIR" = false || spec_init_topdir mkdir -p $BUILD_ROOT$TOPDIR/{BUILD,SOURCES,SPECS,SRPMS,BUILDROOT,OTHER,RPMS/noarch,RPMS/i386,RPMS/$(uname -m)} copy_sources "$MYSRCDIR" "$BUILD_ROOT$TOPDIR/SOURCES/" chown -hR "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR" @@ -227,6 +227,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 buildrootoverride=$(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags rpm-buildroot-override) if test -n "$buildrootoverride" ; then -- 2.40.1
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