Check-in [407929c036]

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

Overview
Comment:Add the prefix in the .mtree, while here directly propose %%PORTDOCS%% and %%PORTEXAMPLES%%
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:407929c0364cf60a453ba69148c21c19a47fddcd
User & Date: bapt 2012-06-08 04:46:57
Context
2012-06-08
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
03:46
Ignore errors

When using /etc/mtree/BSD.usr.dist (openssh-portable OVERWRITE_BASE), it would cause an error due to 'nochange': tar: Malformed attribute nochange (110) check-in: 8faf7f9ba5 user: bdrewery tags: trunk

Changes

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

31
32
33
34
35
36
37
38








39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
	fi
	@[ -f ${PKGMESSAGE} ] && ${CAT} ${PKGMESSAGE} || return 0
.endif
.endif

.if !target(genplist)
genplist: stage
	@(echo "#mtree" && cat ${MTREE_FILE}) | tar tf - > ${WRKDIR}/.mtree 2>/dev/null || true








	@${FIND} ${STAGEDIR} -type f -o -type l | sed -e "s,${STAGEDIR},,g" \
		-e "s,${DOCSDIR},%%DOCSDIR%%,g" \
		-e "s,${EXAMPLESDIR},%%EXAMPLESDIR%%,g" \
		-e "s,${DATADIR},%%DATADIR%%,g" \
		-e "s,${PREFIX}/,,g"
	@${FIND} ${STAGEDIR} -type d | sed -e "s,${STAGEDIR},,g" \
		-e "s,${PREFIX}/,,g" | while read line; do \
		grep -qw "^$${line}$$" ${WRKDIR}/.mtree || { \
			if [ -n "$${line}" ]; then \
				${ECHO_CMD} "@dirrmtry $${line}"; \
			fi ; \
		}; \
		done | sort -r | sed \
		-e "s,${DOCSDIR:S,^${PREFIX}/,,g},%%DOCSDIR%%,g" \
		-e "s,${EXAMPLESDIR:S,^${PREFIX}/,,g},%%EXAMPLESDIR%%,g" \
		-e "s,${DATADIR:S,^${PREFIX}/,,g},%%DATADIR%%,g"
.endif







|
>
>
>
>
>
>
>
>

|
|



|






|
|
|

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
	fi
	@[ -f ${PKGMESSAGE} ] && ${CAT} ${PKGMESSAGE} || return 0
.endif
.endif

.if !target(genplist)
genplist: stage
	@(echo "#mtree" && cat ${MTREE_FILE}) | tar tf - | \
		awk '{ sub(/^\.$$/, "", $$1); if ($$1 == "") print "${PREFIX}"; else print "${PREFIX}/"$$1; }' \
		> ${WRKDIR}/.mtree
	@a=${PREFIX}; \
		while :; do \
			a=$${a%/*} ; \
			[ -z "$${a}" ] && break ; \
			echo $${a} >> ${WRKDIR}/.mtree ; \
		done
	@${FIND} ${STAGEDIR} -type f -o -type l | sed -e "s,${STAGEDIR},,g" \
		-e "s,${DOCSDIR},%%PORTDOCS%%%%DOCSDIR%%,g" \
		-e "s,${EXAMPLESDIR},%%PORTEXAMPLES%%%%EXAMPLESDIR%%,g" \
		-e "s,${DATADIR},%%DATADIR%%,g" \
		-e "s,${PREFIX}/,,g"
	@${FIND} ${STAGEDIR} -type d | sed -e "s,${STAGEDIR},,g" \
		| while read line; do \
		grep -qw "^$${line}$$" ${WRKDIR}/.mtree || { \
			if [ -n "$${line}" ]; then \
				${ECHO_CMD} "@dirrmtry $${line}"; \
			fi ; \
		}; \
		done | sort -r | sed \
		-e "s,\(.*\)${DOCSDIR},%%PORTDOCS%%\1%%DOCSDIR%%,g" \
		-e "s,\(.*\)${EXAMPLESDIR},%%PORTEXAMPLES%%\1%%EXAMPLESDIR%%,g" \
		-e "s,${DATADIR},%%DATADIR%%,g"
.endif