Check-in [d0812f289d]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:in all cases @exec can safely be run as post-install at once.

No need to split all the execution

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d0812f289d4bda54af87687cf0e85399820d525a
User & Date: bapt 2012-06-20 06:22:10
Context
2012-06-21
05:24
Fix @exec being executed and fix pax(1) typo check-in: 208359bb45 user: bdrewery tags: trunk
2012-06-20
06:22
in all cases @exec can safely be run as post-install at once.

No need to split all the execution check-in: d0812f289d user: bapt tags: trunk

2012-06-19
14:32
Sort by the inode to ensure all are processed together in order check-in: eb54d44aaa user: bdrewery tags: trunk
Changes

Changes to ports/Tools/scripts/sync_from_stage.sh.

    24     24   [ -z ${STAGEDIR} ] && usage
    25     25   [ -z ${PLIST} ] && usage
    26     26   [ -f ${PLIST} ] || usage
    27     27   test -d ${STAGEDIR} || usage
    28     28   test -d ${WRKDIR} || usage
    29     29   
    30     30   PAXLIST=${WRKDIR}/.pax
           31  +EXECLIST=${WRKSRC}/.exec
    31     32   
    32     33   cd ${STAGEDIR}
    33     34   tmpprefix=${PREFIX}
    34     35   tmplastplist="";
    35     36   :> ${PAXLIST}
           37  +:> ${EXECLIST}
    36     38   while read line; do
    37     39   	case $line in
    38     40   		@unexec*) ;;
    39     41   		@ignore*) ;;
    40     42   		@dirrm*)
    41         -			test -d "${STAGEDIR}/${tmpprefix}/${line#* }" || ERRS="${ERRS} ${line}"
           43  +			test -d "${STAGEDIR}/${tmpprefix}/${line#* }" || \
           44  +				ERRS="${ERRS} ${line}"
    42     45   			;;
    43     46   		@comment*) ;;
    44     47   		@cwd) tmpprefix=${PREFIX} ;;
    45     48   		@cwd*) tmpprefix=${line#* } ;;
    46     49   		@exec*)
    47     50   			dirname=${tmplastplist%/*}
    48     51   			basename=${tmplastplist##*/}
    49         -			echo ${line} | sed -e "s,%D,${PREFIX},g" -e "s,%F,${tmplastplist},g" -e "s,%B,${tmpprefix}/${dirname},g" -e "s,%f,${basename},g" >> ${PAXLIST}
           52  +			echo ${line} | sed -e "s,%D,${PREFIX},g" \
           53  +			    -e "s,%F,${tmplastplist},g" \
           54  +			    -e "s,%B,${tmpprefix}/${dirname},g" \
           55  +			    -e "s,%f,${basename},g" \
           56  +			    >> ${EXECLIST}
    50     57   			;;
    51     58   		@mode) unset tmpmode ;;
    52     59   		@mode*) tmpmode=${line#* } ;;
    53     60   		@owner) unset tmpowner ;;
    54     61   		@owner*) tmpowner=${line#* } ;;
    55     62   		@group) unset tmpgroup ;;
    56     63   		@group*) tmpgroup=${line#* } ;;
................................................................................
    70     77   	echo "=====> Some files or directory from the plist cannot be found:"
    71     78   	for err in ${ERRS}; do
    72     79   		echo $err
    73     80   	done
    74     81   	exit 1
    75     82   
    76     83   fi
    77         -while read line; do
    78         -	case $line in
    79         -		@*) echo ${line#* } | sh
    80         -			;;
    81         -		*)
    82         -			echo ${line} | pax -p e -drw /
    83         -			;;
    84         -	esac
    85         -done < ${PAXLIST}
    86         -
    87         -# Fix hardlinks by linking each file to the previous if the inodes match
    88         -find ${STAGEDIR} -type f -links +1 -ls|awk '{print $1 " " $11}'| sort -n -k 1 | while read line; do
    89         -	set -- $line
    90         -	tmpinode=$1
    91         -	tmpfile=${2##${STAGEDIR}}
    92         -
    93         -	if [ "${tmpinode}" = "${lastinode}" ]; then
    94         -		ln -f ${lastfile} ${tmpfile}
    95         -	fi
    96         -	lastinode=$tmpinode
    97         -	lastfile=$tmpfile
    98         -done
           84  +cat ${PAXLIST} | px -p e -drw /
           85  +cat ${EXECLIST} | sh
    99     86   exit 0