-np <patchnumber>,
--nopatch <patchnumber>
- abort instead of applying patch <patchnumber>
+--noinit
+ - do not initialize SPECS_DIR and SOURCES_DIR (set them to .)
--show-bconds - show available conditional builds, which can be used
- with --with and/or --without switches.
--show-bcond-args - show active bconds, from ~/.bcondrc. this is used by ./repackage.sh script.
# http://rpm.org/gitweb?p=rpm.git;a=blob;f=build/parseChangelog.c#l31
# NOTE: changelog date is always in UTC for rpmbuild
# * 1265749244 +0000 Random Hacker <nikt@pld-linux.org> 9370900
- git rev-list --date-order -${log_entries:-20} HEAD | while read sha1; do
+ git rev-list --date-order -${log_entries:-20} HEAD 2>/dev/null | while read sha1; do
local logfmt='%B%n'
git notes list $sha1 > /dev/null 2>&1 && logfmt=%N
git log -n 1 $sha1 --format=format:"* %ad %an <%ae> %h%n${logfmt}%n" --date=raw | sed '/^$/q'
fi
cd "$REPO_DIR"
- if [ ! -f "$ASSUMED_NAME/$SPECFILE" ]; then
- # XXX: still needed?
- SPECFILE=$(basename $SPECFILE)
- fi
if [ "$NOCVSSPEC" != "yes" ]; then
if [ -z "$DEPTH" ]; then
- if [ -d "$ASSUMED_NAME/.git" ]; then
+ if [ -d "$PACKAGE_DIR/.git" ]; then
git fetch $REMOTE_PLD || Exit_error err_no_spec_in_repo
elif [ "$ADD_PACKAGE_CVS" = "yes" ]; then
- if [ ! -r "$ASSUMED_NAME/$SPECFILE" ]; then
- echo "ERROR: No package to add ($ASSUMED_NAME/$SPECFILE)" >&2
+ if [ ! -r "$PACKAGE_DIR/$SPECFILE" ]; then
+ echo "ERROR: No package to add ($PACKAGE_DIR/$SPECFILE)" >&2
exit 101
fi
Exit_error err_not_implemented
unset GIT_WORK_TREE
git clone -o $REMOTE_PLD ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME}.git || {
# softfail if new package, i.e not yet added to PLD rep
- [ ! -f "$ASSUMED_NAME/$SPECFILE" ] && Exit_error err_no_spec_in_repo
+ [ ! -f "$PACKAGE_DIR/$SPECFILE" ] && Exit_error err_no_spec_in_repo
echo "Warning: package not in CVS - assuming new package"
NOCVSSPEC="yes"
}
)
fi
else
- if [ ! -d "$ASSUMED_NAME/.git" ]; then
- if [ ! -d "$ASSUMED_NAME" ]; then
- mkdir $ASSUMED_NAME
+ if [ ! -d "$PACKAGE_DIR/.git" ]; then
+ if [ ! -d "$PACKAGE_DIR" ]; then
+ install -d $PACKAGE_DIR
fi
git init
git remote add $REMOTE_PLD ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME}.git
fi
# create symlinks for tools
- if [ "$SYMLINK_TOOLS" != "no" -a -d "$ASSUMED_NAME" ]; then
+ 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
# skip tools that don't exist in top dir
[ -f $a ] || continue
# skip tools that already exist
- [ -f $ASSUMED_NAME/$a ] && continue
- ln -s ../$a $ASSUMED_NAME
+ [ -f $PACKAGE_DIR/$a ] && continue
+ ln -s ../$a $PACKAGE_DIR
cvsignore_df $a
done
fi
fi
fi
- if [ ! -f "$ASSUMED_NAME/$SPECFILE" ]; then
+ if [ ! -f "$PACKAGE_DIR/$SPECFILE" ]; then
Exit_error err_no_spec_in_repo
fi
if [ "$CHMOD" = "yes" -a -n "$SPECFILE" ]; then
- chmod $CHMOD_MODE $ASSUMED_NAME/$SPECFILE
+ chmod $CHMOD_MODE $PACKAGE_DIR/$SPECFILE
fi
unset OPTIONS
- [ -n "$DONT_PRINT_REVISION" ] || grep -E -m 1 "^#.*Revision:.*Date" $ASSUMED_NAME/$SPECFILE
+ [ -n "$DONT_PRINT_REVISION" ] || grep -E -m 1 "^#.*Revision:.*Date" $PACKAGE_DIR/$SPECFILE
set_spec_target
}
display_branches() {
echo -n "Available branches: "
- git branch -r | grep "^ ${REMOTE_PLD}" | grep -v ${REMOTE_PLD}/HEAD | sed "s#^ *${REMOTE_PLD}/##" | xargs
+ git branch -r 2>/dev/null | grep "^ ${REMOTE_PLD}" | grep -v ${REMOTE_PLD}/HEAD | sed "s#^ *${REMOTE_PLD}/##" | xargs
}
# checks a given list of packages/files/provides agains current rpmdb.