Check-in [f62b2087c2]

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

Overview
Comment:switch to test -d don't why previous version didn't work, correctly pass -w to sync_from_stage.sh
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f62b2087c244a6e955ec213a9f5adbf9493cfaf7
User & Date: bapt 2012-06-08 05:15:33
Context
2012-06-08
05:31
Remove prefix from @dirrmtry check-in: e3cf6a347d user: bapt tags: trunk
05:15
switch to test -d don't why previous version didn't work, correctly pass -w to sync_from_stage.sh check-in: f62b2087c2 user: bapt tags: trunk
04:46
Add the prefix in the .mtree, while here directly propose %%PORTDOCS%% and %%PORTEXAMPLES%% check-in: 407929c036 user: bapt tags: trunk
Changes

Changes to ports/Mk/bsd.stage.mk.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

.if !target(sync-from-stage)
sync-from-stage: stage
.if defined(WITH_PKGNG)
	@${DO_NADA}
.else
	@${ECHO_MSG} "===> Syncing from stagedir"
	@${SH} ${PORTSDIR}/Tools/scripts/sync_from_stage.sh -f ${STAGEDIR} -p ${TMPPLIST} -P ${PREFIX}
	
	@if [ -f ${PKGINSTALL} ]; then \
		${SH} ${PKGINSTALL} POST-INSTALL; \
	fi
	@[ -f ${PKGMESSAGE} ] && ${CAT} ${PKGMESSAGE} || return 0
.endif
.endif








|
|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

.if !target(sync-from-stage)
sync-from-stage: stage
.if defined(WITH_PKGNG)
	@${DO_NADA}
.else
	@${ECHO_MSG} "===> Syncing from stagedir"
	@${SH} ${PORTSDIR}/Tools/scripts/sync_from_stage.sh -f ${STAGEDIR} -p ${TMPPLIST} -P ${PREFIX} -w ${WRKDIR}

	@if [ -f ${PKGINSTALL} ]; then \
		${SH} ${PKGINSTALL} POST-INSTALL; \
	fi
	@[ -f ${PKGMESSAGE} ] && ${CAT} ${PKGMESSAGE} || return 0
.endif
.endif

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

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
..
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
	esac
done

: ${PREFIX:=/usr/local}
[ -z ${STAGEDIR} ] && usage
[ -z ${PLIST} ] && usage
[ -f ${PLIST} ] || usage
[ -d ${STAGEDIR} ] || usage
[ -d ${WRKDIR} ] || usage

PAXLIST=${WRKDIR}/.pax

cd ${STAGEDIR}
tmpprefix=${PREFIX}
tmplastplist="";
:> ${PAXLIST}
while read line; do
	case $line in
		@unexec*) ;;
		@ignore*) ;;
		@dirrm*)
			[ -d "./${tmpprefix}/${line#* }" ] || ERRS="${ERRS} ${line}"
			;;
		@comment*) ;;
		@cwd) tmpprefix=${PREFIX} ;;
		@cwd*) tmpprefix=${line#* } ;;
		@exec*)
			echo ${line} | sed -e "s,%D,${PREFIX},g" -e "s,%F,${tmplastplist},g" -e "s,%B,`dirname ${tmplastplist}`,g" -e "s,%f,`basename ${tmpprefix}/${tmplastplist}`,g" > ${PAXLIST}
			;;
................................................................................
				chmod $tmpmode ./$tmpprefix/$line
			fi
			echo "./${tmpprefix}/${line}" >> ${PAXLIST}
		;;
	esac
done < ${PLIST}

# sanity check
while read line; do
	case $line in
		@*) continue;;
		*)
		[ -e ${STAGEDIR}/$line ] || ERRS="${ERRS} ${line}"
		;;
	esac
done < ${PAXLIST}

if [ -n "${ERRS}" ]; then
	echo "=====> Some files or directory from the plist cannot be found:"
	for err in ${ERRS}; do
		echo $err
	done
	exit 1








|
|












|







 







<
<
<
<
<
<
<
<
<
<







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
..
60
61
62
63
64
65
66










67
68
69
70
71
72
73
	esac
done

: ${PREFIX:=/usr/local}
[ -z ${STAGEDIR} ] && usage
[ -z ${PLIST} ] && usage
[ -f ${PLIST} ] || usage
test -d ${STAGEDIR} || usage
test -d ${WRKDIR} || usage

PAXLIST=${WRKDIR}/.pax

cd ${STAGEDIR}
tmpprefix=${PREFIX}
tmplastplist="";
:> ${PAXLIST}
while read line; do
	case $line in
		@unexec*) ;;
		@ignore*) ;;
		@dirrm*)
			test -d "${STAGEDIR}/${tmpprefix}/${line#* }" || ERRS="${ERRS} ${line}"
			;;
		@comment*) ;;
		@cwd) tmpprefix=${PREFIX} ;;
		@cwd*) tmpprefix=${line#* } ;;
		@exec*)
			echo ${line} | sed -e "s,%D,${PREFIX},g" -e "s,%F,${tmplastplist},g" -e "s,%B,`dirname ${tmplastplist}`,g" -e "s,%f,`basename ${tmpprefix}/${tmplastplist}`,g" > ${PAXLIST}
			;;
................................................................................
				chmod $tmpmode ./$tmpprefix/$line
			fi
			echo "./${tmpprefix}/${line}" >> ${PAXLIST}
		;;
	esac
done < ${PLIST}











if [ -n "${ERRS}" ]; then
	echo "=====> Some files or directory from the plist cannot be found:"
	for err in ${ERRS}; do
		echo $err
	done
	exit 1