summaryrefslogtreecommitdiff
path: root/init_buildsystem
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-05-16 11:57:39 +0100
committerAdrian Schröter <adrian@suse.de>2012-05-21 14:47:36 +0200
commit4decf74927f31c7e24e675e5466660af60247845 (patch)
treed92098499bb7c715efa561d06bd904d81969895f /init_buildsystem
parent556b016e99833d1abe8db96fa8bf2c16c6941a14 (diff)
downloadobs-build-4decf74927f31c7e24e675e5466660af60247845.tar.gz
obs-build-4decf74927f31c7e24e675e5466660af60247845.tar.bz2
obs-build-4decf74927f31c7e24e675e5466660af60247845.zip
add new option --configdir
To add support for distribtuons not packages with the build script, we need an option to specify a custom location where configs can reside instead of the hardcoded location under BUILD_DIR
Diffstat (limited to 'init_buildsystem')
-rwxr-xr-xinit_buildsystem10
1 files changed, 7 insertions, 3 deletions
diff --git a/init_buildsystem b/init_buildsystem
index 1834b0c..defc0e9 100755
--- a/init_buildsystem
+++ b/init_buildsystem
@@ -85,6 +85,10 @@ while test -n "$1" ; do
CACHE_DIR="$2"
shift 2
;;
+ --configdir)
+ CONFIG_DIR=$2
+ shift 2
+ ;;
*)
break
;;
@@ -259,7 +263,7 @@ reorder()
for PKG in "$@" ; do
echo "$PKG" >> $BUILD_ROOT/.init_b_cache/order.manifest
done
- $BUILD_DIR/order --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir $BUILD_DIR/configs --manifest $BUILD_ROOT/.init_b_cache/order.manifest $BUILD_ROOT/.init_b_cache/rpms
+ $BUILD_DIR/order --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir $CONFIG_DIR --manifest $BUILD_ROOT/.init_b_cache/order.manifest $BUILD_ROOT/.init_b_cache/rpms
rm -f $BUILD_ROOT/.init_b_cache/order.manifest
}
@@ -607,7 +611,7 @@ else
#
RPMLIST=$BUILD_ROOT/.init_b_cache/rpmlist
test -z "$LIST_STATE" && echo "expanding package dependencies..."
- if ! $BUILD_DIR/expanddeps $USEUSEDFORBUILD "${definesnstuff[@]}" --dist "$BUILD_DIST" --depfile "$CACHE_FILE" --archpath "$BUILD_ARCH" --configdir $BUILD_DIR/configs "${PKGS[@]}" > $RPMLIST ; then
+ if ! $BUILD_DIR/expanddeps $USEUSEDFORBUILD "${definesnstuff[@]}" --dist "$BUILD_DIST" --depfile "$CACHE_FILE" --archpath "$BUILD_ARCH" --configdir $CONFIG_DIR "${PKGS[@]}" > $RPMLIST ; then
rm -f $BUILD_IS_RUNNING
cleanup_and_exit 1
fi
@@ -728,7 +732,7 @@ else
echo "$GUESSED_DIST" > $BUILD_ROOT/.guessed_dist
test -n "$BUILD_DIST" || BUILD_DIST="$GUESSED_DIST"
- DIST_TYPE=`gettype --dist "$BUILD_DIST" --configdir "$BUILD_DIR/configs" --archpath "$BUILD_ARCH"`
+ DIST_TYPE=`gettype --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH"`
case "$DIST_TYPE" in
spec) PSUF=rpm ;;
dsc) PSUF=deb ;;