From 1ef6f5defc8f1e3157aae0911df72c1755b4660d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 20 Aug 2010 16:51:41 +0000 Subject: [PATCH] - make it possible to build packages that are not yet added to CVS Changed files: builder.sh -> 1.628 --- builder.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/builder.sh b/builder.sh index a1c0687..61bafd5 100644 --- a/builder.sh +++ b/builder.sh @@ -725,20 +725,26 @@ get_spec() { # XXX: still needed? SPECFILE=$(basename $SPECFILE) fi - if [ "$NOCVSSPEC" != "yes" ]; then + if [ "$NOCVSSPEC" != "yes" ]; then if [ ! -s CVS/Root -a "$NOCVSSPEC" != "yes" ]; then echo "Warning: No CVS access defined - using local .spec file" NOCVSSPEC="yes" fi - if [ -d "$ASSUMED_NAME" ]; then + if [ -d "$ASSUMED_NAME" -a -s "$ASSUMED_NAME/CVS/Root" ]; then cvsup "$ASSUMED_NAME/$SPECFILE" || Exit_error err_no_spec_in_repo else - cvsup -c -d $ASSUMED_NAME "packages/$ASSUMED_NAME/$SPECFILE" || Exit_error err_no_spec_in_repo + cvsup -c -d $ASSUMED_NAME "packages/$ASSUMED_NAME/$SPECFILE" || { + # softfail if new package, i.e not yet added to cvs + [ ! -f "$ASSUMED_NAME/$SPECFILE" ] && Exit_error err_no_spec_in_repo + echo "Warning: package not in CVS - assuming new package" + NOCVSSPEC="yes" + NOCVS="yes" + } # remove Entries.Static -- so 'cvs up' would update all files in a repo - rm "$ASSUMED_NAME/CVS/Entries.Static" + rm -f "$ASSUMED_NAME/CVS/Entries.Static" cvsignore_df .cvsignore # add default log format to .cvsignore if it is relative @@ -754,7 +760,7 @@ get_spec() { if [ "$SYMLINK_TOOLS" != "no" ]; then for a in dropin md5 adapter builder {relup,compile,repackage,rsync,pearize}.sh pldnotify.awk; do [ -f $a ] || continue - ln -s ../$a $ASSUMED_NAME + ln -sf ../$a $ASSUMED_NAME cvsignore_df $a done fi -- 2.44.0