constructions. Set GROUP_BCONDS to yes to make use of it.
--target <platform>, --target=<platform>
- build for platform <platform>.
---init-rpm-dir - initialize ~/rpm directory structure
+--init-rpm-dir, --init
+ - initialize ~/rpm directory structure
"
}
}
update_shell_title() {
- [ -t 1 ] || return
+ [ -t 2 ] || return
local len=${COLUMNS:-80}
local msg="$(echo "$*" | cut -c-$len)"
fi
[ -d "$ASSUMED_NAME/.git" ] || NEW_REPO=yes
ssh $GIT_PUSH create ${ASSUMED_NAME} || Exit_error err_cvs_add_failed
+ (
+ set -e
git init
- git remote add $REMOTE_PLD ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME}.git && \
- git remote set-url --push $REMOTE_PLD ssh://${GIT_PUSH}/${PACKAGES_DIR}/${ASSUMED_NAME} \
- || Exit_error err_remote_problem $REMOTE_PLD
+ git remote add $REMOTE_PLD ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME}.git
+ git remote set-url --push $REMOTE_PLD ssh://${GIT_PUSH}/${PACKAGES_DIR}/${ASSUMED_NAME}
+
+ git config --local push.default current
+ git config --local branch.master.remote $REMOTE_PLD
+ git config --local branch.master.merge refs/heads/master
+ )
+ test $? = 0 || Exit_error err_remote_problem $REMOTE_PLD
}
get_spec() {
# create symlinks for tools
if [ "$SYMLINK_TOOLS" != "no" -a -d "$PACKAGE_DIR" ]; then
- for a in dropin md5 adapter builder {relup,compile,repackage,rsync,pearize}.sh pldnotify.awk; do
+ for a in dropin md5 adapter builder {relup,compile,repackage,rsync,pearize}.sh; do
# skip tools that don't exist in top dir
[ -f $a ] || continue
# skip tools that already exist
echo "Updating spec file to version $TNEWVER"
else
if [ -n "$FLOAT_VERSION" ]; then
- TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE -n) || exit 1
+ TNOTIFY=$(pldnotify ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE -n) || exit 1
else
- TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE) || exit 1
+ TNOTIFY=$(pldnotify ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE) || exit 1
fi
- # pldnotify.awk does not set exit codes, but it has match for ERROR
+ # pldnotify does not set exit codes, but it has match for ERROR
# in output which means so.
if [[ "$TNOTIFY" = *ERROR* ]]; then
echo >&2 "$TNOTIFY"
fi
fi
+ # unset these, should not be exposed to builder shell!
+ unset GIT_WORK_TREE GIT_DIR
+ # these are set by jenkins
+ unset GIT_PREVIOUS_COMMIT GIT_URL GIT_PREVIOUS_SUCCESSFUL_COMMIT GIT_BRANCH GIT_COMMIT
+ # fail if something still set
+ env | grep ^GIT_ && Exit_error err_build_fail
+
local specdir=$(insert_gitlog $SPECFILE)
# FIXME: eval here is exactly why?
PATH=$CLEAN_PATH eval teeboth "'$logfile'" ${TIME_COMMAND} ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $specdir/$SPECFILE
-Upi | --update-poldek-indexes )
UPDATE_POLDEK_INDEXES="yes"
shift ;;
- --init-rpm-dir)
+ --init-rpm-dir|--init)
COMMAND="init_rpm_dir"
shift ;;
-u | --try-upgrade )