Check-in [3fe16cb83d]

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

Overview
Comment:Fix syncing so it works and only clone the tree once
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3fe16cb83d8e703bc86dcc9eb712bc3ff35e8e1d
User & Date: bdrewery 2012-06-07 04:32:51
Context
2012-06-07
06:18
Sync with latest from ports check-in: 03b8d91a6b user: bapt tags: trunk
04:32
Fix syncing so it works and only clone the tree once check-in: 3fe16cb83d user: bdrewery tags: trunk
04:20
Fix -P flag not being accepted check-in: b675dce20a user: bdrewery tags: trunk
Changes

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

23
24
25
26
27
28
29
30
31
32
33
34
.if defined(WITH_PKGNG)
	@${DO_NADA}
.else
	@${ECHO_MSG} "===> Syncing from stagedir"
	@${SH} ${PORTSDIR}/Tools/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







|




23
24
25
26
27
28
29
30
31
32
33
34
.if defined(WITH_PKGNG)
	@${DO_NADA}
.else
	@${ECHO_MSG} "===> Syncing from stagedir"
	@${SH} ${PORTSDIR}/Tools/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

Changes to ports/Tools/sync_from_stage.sh.

19
20
21
22
23
24
25

26
27
28
29
30
31
32
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

56

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


tmpprefix=${PREFIX}
tmplastplist="";
while read line; do
	case $line in
		@unexec*) ;;
		@ignore*) ;;
		@dirrm*) ;;
................................................................................
		@owner) unset tmpowner ;;
		@owner*) tmpowner=${line#* } ;;
		@group) unset tmpgroup ;;
		@group*) tmpgroup=${line#* } ;;
		@*) ${DO_NADA} ;;
		*)
			tmplastplist=$line ;
			if [ -n $tmpgroup -a -n $tmpowner ]; then
				chown ${tmpowner}:${tmgroup} ./$tmpprefix/$line
			fi
			if [ -n $tmpmode ]; then
				chmod $tmpmode ./$tmpprefix/$line
			fi
			pax -p e -rw "./$tmpprefix/$line" /
			;;
	esac
done < ${PLIST}

exit 0







>







 







|


|


<



>

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
40
41
42
43
44
45
46
47
48
49
50
51
52

53
54
55
56
57

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

cd ${STAGEDIR}
tmpprefix=${PREFIX}
tmplastplist="";
while read line; do
	case $line in
		@unexec*) ;;
		@ignore*) ;;
		@dirrm*) ;;
................................................................................
		@owner) unset tmpowner ;;
		@owner*) tmpowner=${line#* } ;;
		@group) unset tmpgroup ;;
		@group*) tmpgroup=${line#* } ;;
		@*) ${DO_NADA} ;;
		*)
			tmplastplist=$line ;
			if [ -n "$tmpgroup" -a -n "$tmpowner" ]; then
				chown ${tmpowner}:${tmgroup} ./$tmpprefix/$line
			fi
			if [ -n "$tmpmode" ]; then
				chmod $tmpmode ./$tmpprefix/$line
			fi

			;;
	esac
done < ${PLIST}
pax -p e -rw "./${tmpprefix}/${line}" /
exit 0