|
From: Keith M. <kei...@us...> - 2006-09-09 09:21:52
|
Update of /cvsroot/mingw/portmaker/template In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23345/template Modified Files: mingwPORT.afterquestion mingwPORT.messages mingwPORT.sh Log Message: * src/portmaker.sh (SRCDIR, PREFIX): Modified defaults. * template/mingwPORT.sh (SIGUSR1): Define `trap'... (ONTRACK): ...it sets this to `false'. * template/mingwPORT.messages (MSG_NOMKDIR, MSG_REFUSED): Renamed... (MSG_EMKDIR, MSG_EREFUSED): ...to these, respectively. (MSG_EABORT, MSG_EFAILED, MSG_EFATAL): New messages; defined. * template/mingwPORT.afterquestion (SIGUSR1): Raise it... (ARCHIVE): ...on failure to `untar' this... (MSG_EFATAL): ...failing with this. (MSG_NOMKDIR, MSG_REFUSED): Update references... (MSG_EMKDIR, MSG_EREFUSED): ...to use these instead. Index: mingwPORT.afterquestion =================================================================== RCS file: /cvsroot/mingw/portmaker/template/mingwPORT.afterquestion,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mingwPORT.afterquestion 9 Jun 2006 22:21:00 -0000 1.2 --- mingwPORT.afterquestion 9 Sep 2006 09:21:45 -0000 1.3 *************** *** 39,48 **** esac else ! ${3-die} afterquestion "'$1': $MSG_NOMKDIR" fi elif test -n "$REPLY" then ! complain afterquestion "'$1': $MSG_NOMKDIR" ! ${3-die} afterquestion " $MSG_REFUSED" fi } --- 39,48 ---- esac else ! ${3-die} afterquestion "'$1': $MSG_EMKDIR" fi elif test -n "$REPLY" then ! complain afterquestion "'$1': $MSG_EMKDIR" ! ${3-die} afterquestion " $MSG_EREFUSED" fi } *************** *** 76,79 **** --- 76,87 ---- UNARCHIVE=yes fi + + # If required to unpack the source archive, + # then establish the appropriate format for the `tar' command, + # and invoke it in the designated source directory. + # + # Note: if `tar' fails, raise SIGUSR1 for a graceful exit, + # because we can't set `' directly within the pipe. + isyes $UNARCHIVE && ARCHIVE=$ARCHIVEPATH/$ARCHIVEFILE if $ONTRACK && test -n "$ARCHIVE" *************** *** 86,90 **** # zip) TARFLAG=zip ;; esac ! cd "$SRCROOT" && tar $TARFLAG "$ARCHIVE" | tee "${ARCHIVE}.log" fi --- 94,102 ---- # zip) TARFLAG=zip ;; esac ! if cd "$SRCROOT" ! then ! tar $TARFLAG "$ARCHIVE" || kill -SIGUSR1 $$ | tee "$ARCHIVE.log" ! $ONTRACK || complain afterquestion "tar: $MSG_EFATAL" ! fi fi Index: mingwPORT.messages =================================================================== RCS file: /cvsroot/mingw/portmaker/template/mingwPORT.messages,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mingwPORT.messages 9 Jun 2006 22:21:00 -0000 1.2 --- mingwPORT.messages 9 Sep 2006 09:21:45 -0000 1.3 *************** *** 9,14 **** MSG_ENOENT="required file not found." MSG_EACCESS="cannot access file." ! MSG_NOMKDIR="directory not created." ! MSG_REFUSED="permission refused by user." # $RCSfile$: end of file: vim: ft=sh --- 9,17 ---- MSG_ENOENT="required file not found." MSG_EACCESS="cannot access file." ! MSG_EMKDIR="directory not created." ! MSG_EREFUSED="permission refused by user." ! MSG_EABORT="mingwPORT cannot continue." ! MSG_EFAILED="command failed; $MSG_EABORT" ! MSG_EFATAL="FATAL: $MSG_EFAILED" # $RCSfile$: end of file: vim: ft=sh Index: mingwPORT.sh =================================================================== RCS file: /cvsroot/mingw/portmaker/template/mingwPORT.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mingwPORT.sh 9 Jun 2006 22:21:00 -0000 1.3 --- mingwPORT.sh 9 Sep 2006 09:21:45 -0000 1.4 *************** *** 26,32 **** # Set indicator to show we are "on track" for successful completion; ! # (failing operations may reset it, to suppress pointless messages). # Get user's configuration preferences. --- 26,34 ---- # Set indicator to show we are "on track" for successful completion; ! # (failing operations may reset it, either directly or by raising SIGUSR1, ! # to suppress further pointless processing, and provide a graceful exit). + trap "" SIGUSR1 # Get user's configuration preferences. |