Check-in [5c52d72b16]

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

Overview
Comment:Do not use pkgng for pkg_install packages
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5c52d72b160fc954c6f3f28da1a749c1a8ba5b72
User & Date: bapt 2013-09-19 10:23:37
Context
2013-09-19
12:33
Create package out of the STAGEDIR check-in: 915fcdbebd user: bapt tags: trunk
10:23
Do not use pkgng for pkg_install packages check-in: 5c52d72b16 user: bapt tags: trunk
10:21
Now pkg_install create first the package and make install installs from the package check-in: e6ff03e6c9 user: bapt tags: trunk
Changes

Changes to stage.patch.

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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
...
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
...
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
...
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
...
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
 .endif
 # XXX @dirrmtry entry must be here (no way to do with PLIST_* vars)
Index: bsd.pkgng.mk
===================================================================
diff --git a/head/Mk/bsd.pkgng.mk b/head/Mk/bsd.pkgng.mk
--- a/head/Mk/bsd.pkgng.mk	(revision 327600)
+++ b/head/Mk/bsd.pkgng.mk	(working copy)
@@ -37,6 +37,16 @@
 	fi
 
 .if !target(fake-pkg)
+.if defined(NO_STAGE)
+STAGE_ARGS=		-l
+.else
+STAGE_ARGS=		-i ${STAGEDIR}
+.endif
+
+.if defined(WITHOUT_PKGNG)
+STAGE_ARGS+=	-O
+.endif
+
 fake-pkg:
 .if !defined(NO_PKG_REGISTER)
 .if defined(INSTALLS_DEPENDS)
@@ -44,6 +54,7 @@
 .else
 	@${ECHO_MSG} "===>   Registering installation for ${PKGNAME}"
 .endif
+	@${FIND} ${STAGEDIR} -print
 	@${MKDIR} ${METADIR}
 	@${ECHO_CMD} "name: ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}" > ${MANIFESTF} 
 	@${ECHO_CMD} "version: ${PKGVERSION}" >> ${MANIFESTF} 
@@ -103,9 +114,9 @@
 	@[ -f ${MTREE_FILE} ] && ${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS || return 0
 .endif
 .if defined(INSTALLS_DEPENDS)
-	@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d -l -m ${METADIR} -f ${TMPPLIST}
+	@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
 .else
-	@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -l -m ${METADIR} -f ${TMPPLIST}
+	@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
 .endif
 	@${RM} -rf ${METADIR}
 .else
@@ -113,6 +124,7 @@
 .endif
 .endif
 
+.if defined(WITH_PKGNG)
 .if !target(check-build-conflicts)
 check-build-conflicts:
 .if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK)
@@ -204,9 +216,68 @@
 .endif # defined(DEFER_CONFLICTS_CHECK)
 .endif
 .endif
+.endif
 
 .if !target(do-package)
 do-package: ${TMPPLIST}
................................................................................
+	[ -f ${PKGMESSAGE} ] && ${CP} ${PKGMESSAGE} ${METADIR}/+DISPLAY || return 0
+.if !defined(NO_MTREE)
+	@[ -f ${MTREE_FILE} ] && ${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS || return 0
+.endif
 	@if [ -d ${PACKAGES} ]; then \
 		if [ ! -d ${PKGREPOSITORY} ]; then \
 			if ! ${MKDIR} ${PKGREPOSITORY}; then \
@@ -219,15 +290,21 @@
 		${RM} -f ${PACKAGES}/$$cat/${PKGNAMEPREFIX}${PORTNAME}*${PKG_SUFX} ; \
 	done
 	@if ${PKG_CREATE} -o ${PKGREPOSITORY} ${PKGNAME}; then \
-		if [ "${PKGORIGIN}" = "ports-mgmt/pkg" -o "${PKGORIGIN}" = "ports-mgmt/pkg-devel" ]; then \
-			if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
-				if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
-					${ECHO_MSG} "=> Can't create directory ${PKGLATESTREPOSITORY}."; \
................................................................................
-			fi ; \
-			${LN} -sf ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} ; \
-		fi; \
+		fi ; \
 	else \
 		cd ${.CURDIR} && eval ${MAKE} delete-package; \
 		exit 1; \
@@ -234,6 +311,7 @@
 	fi
 .endif
 
+.if defined(WITH_PKGNG)
 .if !target(check-already-installed)
 check-already-installed:
 .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
@@ -278,5 +356,6 @@
 	@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
 .endif
 .endif
+.endif
 
 .endif # defined(_POSTMKINCLUDED)
Index: bsd.port.mk
................................................................................
+.if defined(FORCE_STAGE)
+.undef NO_STAGE
+.endif
+
 # make sure bmake treats -V as expected 
 .MAKE.EXPAND_VARIABLES= yes
 # tell bmake we use the old :L :U modifiers
@@ -1901,9 +1905,14 @@
 . endfor
 .endif
 
-.if defined(WITH_PKGNG)
+.if defined(WITH_PKGNG) || !defined(NO_STAGE)
 .include "${PORTSDIR}/Mk/bsd.pkgng.mk"
 .endif
+
+.if !defined(NO_STAGE)
+.include "${PORTSDIR}/Mk/bsd.stage.mk"
+.endif
+
................................................................................
+
+_STAGE_DEP=		build
+_STAGE_SEQ=		stage-message stage-dir apply-slist pre-install generate-plist pre-su-install \
+				create-users-groups do-install post-install post-stage compress-man install-rc-script \
+				install-ldconfig-file install-license \
+				install-desktop-entries add-plist-info add-plist-docs add-plist-examples \
+				add-plist-data add-plist-post fix-plist-sequence
+.if !defined(WITHOUT_PKGNG)
+_INSTALL_DEP=	stage
+_INSTALL_SEQ=	install-message run-depends lib-depends fake-pkg security-check
+
+_PACKAGE_DEP=	stage
+_PACKAGE_SEQ=	package-message pre-package pre-package-script do-package post-package-script
+.else # pkg_install
+_PACKAGE_DEP=	stage







|









<
<
<
<



|







|











|







|







 







|







 







|







|







 







|
<
<
<
|
<







 







|







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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
...
195
196
197
198
199
200
201
202



203

204
205
206
207
208
209
210
...
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
 .endif
 # XXX @dirrmtry entry must be here (no way to do with PLIST_* vars)
Index: bsd.pkgng.mk
===================================================================
diff --git a/head/Mk/bsd.pkgng.mk b/head/Mk/bsd.pkgng.mk
--- a/head/Mk/bsd.pkgng.mk	(revision 327600)
+++ b/head/Mk/bsd.pkgng.mk	(working copy)
@@ -37,6 +37,12 @@
 	fi
 
 .if !target(fake-pkg)
+.if defined(NO_STAGE)
+STAGE_ARGS=		-l
+.else
+STAGE_ARGS=		-i ${STAGEDIR}
+.endif
+




 fake-pkg:
 .if !defined(NO_PKG_REGISTER)
 .if defined(INSTALLS_DEPENDS)
@@ -44,6 +50,7 @@
 .else
 	@${ECHO_MSG} "===>   Registering installation for ${PKGNAME}"
 .endif
+	@${FIND} ${STAGEDIR} -print
 	@${MKDIR} ${METADIR}
 	@${ECHO_CMD} "name: ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}" > ${MANIFESTF} 
 	@${ECHO_CMD} "version: ${PKGVERSION}" >> ${MANIFESTF} 
@@ -103,9 +110,9 @@
 	@[ -f ${MTREE_FILE} ] && ${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS || return 0
 .endif
 .if defined(INSTALLS_DEPENDS)
-	@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d -l -m ${METADIR} -f ${TMPPLIST}
+	@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
 .else
-	@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -l -m ${METADIR} -f ${TMPPLIST}
+	@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
 .endif
 	@${RM} -rf ${METADIR}
 .else
@@ -113,6 +120,7 @@
 .endif
 .endif
 
+.if defined(WITH_PKGNG)
 .if !target(check-build-conflicts)
 check-build-conflicts:
 .if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK)
@@ -204,9 +212,68 @@
 .endif # defined(DEFER_CONFLICTS_CHECK)
 .endif
 .endif
+.endif
 
 .if !target(do-package)
 do-package: ${TMPPLIST}
................................................................................
+	[ -f ${PKGMESSAGE} ] && ${CP} ${PKGMESSAGE} ${METADIR}/+DISPLAY || return 0
+.if !defined(NO_MTREE)
+	@[ -f ${MTREE_FILE} ] && ${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS || return 0
+.endif
 	@if [ -d ${PACKAGES} ]; then \
 		if [ ! -d ${PKGREPOSITORY} ]; then \
 			if ! ${MKDIR} ${PKGREPOSITORY}; then \
@@ -219,15 +286,21 @@
 		${RM} -f ${PACKAGES}/$$cat/${PKGNAMEPREFIX}${PORTNAME}*${PKG_SUFX} ; \
 	done
 	@if ${PKG_CREATE} -o ${PKGREPOSITORY} ${PKGNAME}; then \
-		if [ "${PKGORIGIN}" = "ports-mgmt/pkg" -o "${PKGORIGIN}" = "ports-mgmt/pkg-devel" ]; then \
-			if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
-				if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
-					${ECHO_MSG} "=> Can't create directory ${PKGLATESTREPOSITORY}."; \
................................................................................
-			fi ; \
-			${LN} -sf ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} ; \
-		fi; \
+		fi ; \
 	else \
 		cd ${.CURDIR} && eval ${MAKE} delete-package; \
 		exit 1; \
@@ -234,6 +307,7 @@
 	fi
 .endif
 
+.if defined(WITH_PKGNG)
 .if !target(check-already-installed)
 check-already-installed:
 .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
@@ -278,5 +352,6 @@
 	@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
 .endif
 .endif
+.endif
 
 .endif # defined(_POSTMKINCLUDED)
Index: bsd.port.mk
................................................................................
+.if defined(FORCE_STAGE)
+.undef NO_STAGE
+.endif
+
 # make sure bmake treats -V as expected 
 .MAKE.EXPAND_VARIABLES= yes
 # tell bmake we use the old :L :U modifiers
@@ -1904,6 +1908,11 @@



 .if defined(WITH_PKGNG)

 .include "${PORTSDIR}/Mk/bsd.pkgng.mk"
 .endif
+
+.if !defined(NO_STAGE)
+.include "${PORTSDIR}/Mk/bsd.stage.mk"
+.endif
+
................................................................................
+
+_STAGE_DEP=		build
+_STAGE_SEQ=		stage-message stage-dir apply-slist pre-install generate-plist pre-su-install \
+				create-users-groups do-install post-install post-stage compress-man install-rc-script \
+				install-ldconfig-file install-license \
+				install-desktop-entries add-plist-info add-plist-docs add-plist-examples \
+				add-plist-data add-plist-post fix-plist-sequence
+.if defined(WITHT_PKGNG)
+_INSTALL_DEP=	stage
+_INSTALL_SEQ=	install-message run-depends lib-depends fake-pkg security-check
+
+_PACKAGE_DEP=	stage
+_PACKAGE_SEQ=	package-message pre-package pre-package-script do-package post-package-script
+.else # pkg_install
+_PACKAGE_DEP=	stage