pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   jlam
Date:           Thu Jun  1 02:15:10 UTC 2017

Modified Files:
        pkgsrc/mk: bsd.pkg.mk bsd.prefs.mk
        pkgsrc/mk/build: bsd.build.mk build.mk
        pkgsrc/mk/check: check-files.mk
        pkgsrc/mk/install: install.mk
        pkgsrc/mk/pkgformat/pkg: metadata.mk

Log Message:
Provide switch to activate new frameworks to replace "pkginstall".

If ${_USE_NEW_PKGINSTALL} is "yes", then use the new "pkgtasks",
"init", and "pkgformat/pkg"-scripts frameworks instead of the
existing "pkginstall" framework.


To generate a diff of this commit:
cvs rdiff -u -r1.2024 -r1.2025 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -u -r1.391 -r1.392 pkgsrc/mk/bsd.prefs.mk
cvs rdiff -u -r1.11 -r1.12 pkgsrc/mk/build/bsd.build.mk
cvs rdiff -u -r1.21 -r1.22 pkgsrc/mk/build/build.mk
cvs rdiff -u -r1.33 -r1.34 pkgsrc/mk/check/check-files.mk
cvs rdiff -u -r1.69 -r1.70 pkgsrc/mk/install/install.mk
cvs rdiff -u -r1.13 -r1.14 pkgsrc/mk/pkgformat/pkg/metadata.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/bsd.pkg.mk
diff -u pkgsrc/mk/bsd.pkg.mk:1.2024 pkgsrc/mk/bsd.pkg.mk:1.2025
--- pkgsrc/mk/bsd.pkg.mk:1.2024 Wed May 31 22:56:41 2017
+++ pkgsrc/mk/bsd.pkg.mk        Thu Jun  1 02:15:10 2017
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.2024 2017/05/31 22:56:41 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.2025 2017/06/01 02:15:10 jlam Exp $
 #
 # This file is in the public domain.
 #
@@ -371,8 +371,16 @@ USE_TOOLS+=                                                                \
 # bsd.wrapper.mk
 USE_TOOLS+=    expr
 
+.if ${_USE_NEW_PKGINSTALL:Uno} != "no"
+# Init services framework
+.include "init/bsd.init.mk"
+
+# Package tasks framework
+.include "pkgtasks/bsd.pkgtasks.mk"
+.else
 # INSTALL/DEINSTALL script framework
 .include "pkginstall/bsd.pkginstall.mk"
+.endif
 
 # Locking
 .include "internal/locking.mk"

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.391 pkgsrc/mk/bsd.prefs.mk:1.392
--- pkgsrc/mk/bsd.prefs.mk:1.391        Wed May 31 22:55:01 2017
+++ pkgsrc/mk/bsd.prefs.mk      Thu Jun  1 02:15:10 2017
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.391 2017/05/31 22:55:01 jlam Exp $
+# $NetBSD: bsd.prefs.mk,v 1.392 2017/06/01 02:15:10 jlam Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -686,10 +686,12 @@ PREPEND_PATH+=            ${X11BASE}/bin
 .endif
 PREPEND_PATH+=         ${LOCALBASE}/bin
 
+.if ${_USE_NEW_PKGINSTALL:Uno} == "no"
 # Support alternative init systems.
 #
 INIT_SYSTEM?=          rc.d
 _BUILD_DEFS+=          INIT_SYSTEM
+.endif
 
 _PKGSRC_MKPIE= no
 .if (${PKGSRC_MKPIE:tl} == "yes") && \
@@ -738,6 +740,11 @@ _USE_CWRAPPERS=            no
 # System features framework
 .include "features/features-vars.mk"
 
+.if ${_USE_NEW_PKGINSTALL:Uno} != "no"
+# Init services framework
+.include "init/bsd.init-vars.mk"
+.endif
+
 # Package system format definitions
 .include "pkgformat/bsd.pkgformat-vars.mk"
 

Index: pkgsrc/mk/build/bsd.build.mk
diff -u pkgsrc/mk/build/bsd.build.mk:1.11 pkgsrc/mk/build/bsd.build.mk:1.12
--- pkgsrc/mk/build/bsd.build.mk:1.11   Thu Feb  7 21:36:13 2008
+++ pkgsrc/mk/build/bsd.build.mk        Thu Jun  1 02:15:10 2017
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.build.mk,v 1.11 2008/02/07 21:36:13 rillig Exp $
+# $NetBSD: bsd.build.mk,v 1.12 2017/06/01 02:15:10 jlam Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk and provides all
 # variables and targets related to building sources for a package.
@@ -36,7 +36,11 @@ _COOKIE.test=        ${WRKDIR}/.test_done
 build:
        @${DO_NADA}
 .  elif defined(_PKGSRC_BARRIER)
+.    if ${_USE_NEW_PKGINSTALL:Uno} != "no"
+build: configure build-cookie
+.    else
 build: configure build-cookie pkginstall
+.    endif
 .  else
 build: barrier
 .  endif

Index: pkgsrc/mk/build/build.mk
diff -u pkgsrc/mk/build/build.mk:1.21 pkgsrc/mk/build/build.mk:1.22
--- pkgsrc/mk/build/build.mk:1.21       Sun May 27 14:32:29 2012
+++ pkgsrc/mk/build/build.mk    Thu Jun  1 02:15:10 2017
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.21 2012/05/27 14:32:29 cheusov Exp $
+# $NetBSD: build.mk,v 1.22 2017/06/01 02:15:10 jlam Exp $
 #
 # This file defines what happens in the build phase, excluding the
 # self-test, which is defined in test.mk.
@@ -67,7 +67,9 @@ _BUILD_TARGETS+=      configure
 _BUILD_TARGETS+=       acquire-build-lock
 _BUILD_TARGETS+=       ${_COOKIE.build}
 _BUILD_TARGETS+=       release-build-lock
+.if ${_USE_NEW_PKGINSTALL:Uno} == "no"
 _BUILD_TARGETS+=       pkginstall
+.endif
 
 .PHONY: build
 .if !target(build)

Index: pkgsrc/mk/check/check-files.mk
diff -u pkgsrc/mk/check/check-files.mk:1.33 pkgsrc/mk/check/check-files.mk:1.34
--- pkgsrc/mk/check/check-files.mk:1.33 Wed May 31 22:56:22 2017
+++ pkgsrc/mk/check/check-files.mk      Thu Jun  1 02:15:10 2017
@@ -1,4 +1,4 @@
-# $NetBSD: check-files.mk,v 1.33 2017/05/31 22:56:22 jlam Exp $
+# $NetBSD: check-files.mk,v 1.34 2017/06/01 02:15:10 jlam Exp $
 #
 # This file checks that the list of installed files matches the PLIST.
 # For that purpose it records the file list of LOCALBASE before and
@@ -60,7 +60,7 @@ CHECK_FILES_SKIP+=    ${PKG_DBDIR}/.*
 CHECK_FILES_SKIP+=     ${PREFIX}/emul/linux/proc.*
 CHECK_FILES_SKIP+=     ${PREFIX}/emul/linux32/proc.*
 
-# The reference-count meta-data directory used by the pkginstall framework.
+# The reference-count meta-data directory used by the {de,}install scripts.
 CHECK_FILES_SKIP+=     ${PKG_DBDIR}.refcount.*
 
 # Some people have their distfiles and binary packages below ${LOCALBASE}.

Index: pkgsrc/mk/install/install.mk
diff -u pkgsrc/mk/install/install.mk:1.69 pkgsrc/mk/install/install.mk:1.70
--- pkgsrc/mk/install/install.mk:1.69   Tue Jul 26 08:41:36 2016
+++ pkgsrc/mk/install/install.mk        Thu Jun  1 02:15:10 2017
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.69 2016/07/26 08:41:36 jperkin Exp $
+# $NetBSD: install.mk,v 1.70 2017/06/01 02:15:10 jlam Exp $
 #
 # This file provides the code for the "install" phase.
 #
@@ -179,7 +179,9 @@ _INSTALL_ALL_TARGETS+=              plist
 _INSTALL_ALL_TARGETS+=         install-strip-debug
 .endif
 _INSTALL_ALL_TARGETS+=         install-doc-handling
+.if ${_USE_NEW_PKGINSTALL:Uno} == "no"
 _INSTALL_ALL_TARGETS+=         install-script-data
+.endif
 .if empty(CHECK_FILES:M[nN][oO]) && !empty(CHECK_FILES_SUPPORTED:M[Yy][Ee][Ss])
 _INSTALL_ALL_TARGETS+=         check-files-post
 .endif

Index: pkgsrc/mk/pkgformat/pkg/metadata.mk
diff -u pkgsrc/mk/pkgformat/pkg/metadata.mk:1.13 pkgsrc/mk/pkgformat/pkg/metadata.mk:1.14
--- pkgsrc/mk/pkgformat/pkg/metadata.mk:1.13    Sun Apr 10 15:58:03 2016
+++ pkgsrc/mk/pkgformat/pkg/metadata.mk Thu Jun  1 02:15:10 2017
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.13 2016/04/10 15:58:03 joerg Exp $
+# $NetBSD: metadata.mk,v 1.14 2017/06/01 02:15:10 jlam Exp $
 
 ######################################################################
 ### The targets below are all PRIVATE.
@@ -311,6 +311,25 @@ ${_SIZE_ALL_FILE}: ${_RDEPENDS_FILE} ${_
 
 ######################################################################
 ###
+### +DEINSTALL/+INSTALL - Package deinstall and install scripts
+###
+### These are the scripts invoked by pkg_add(1) and pkg_delete(1)
+### as part of the package installation or removal process.
+###
+### Include scripts.mk to pull in the definitions for the following
+### variables:
+###
+###    _DEINSTALL_FILE (undefined if not required)
+###    _INSTALL_FILE (undefined if not required)
+###
+### This will also add these files to _METADATA_TARGETS.
+###
+.if ${_USE_NEW_PKGINSTALL:Uno} != "no"
+.include "${PKGSRCDIR}/mk/pkgformat/pkg/scripts.mk"
+.endif
+
+######################################################################
+###
 ### +CONTENTS - Package manifest file
 ###
 ### This file contains the list of files and checksums, along with
@@ -339,12 +358,18 @@ _PKG_CREATE_ARGS+=        ${PKG_PRESERVE:D        -n $
 _PKG_CREATE_ARGS+=                             -S ${_SIZE_ALL_FILE}
 _PKG_CREATE_ARGS+=                             -s ${_SIZE_PKG_FILE}
 _PKG_CREATE_ARGS+=     ${CONFLICTS:D           -C ${CONFLICTS:Q}}
+.if ${_USE_NEW_PKGINSTALL:Uno} != "no"
+_PKG_CREATE_ARGS+=     ${_INSTALL_FILE:D       -i ${_INSTALL_FILE:Q}}
+_PKG_CREATE_ARGS+=     ${_DEINSTALL_FILE:D     -k ${_DEINSTALL_FILE:Q}}
+.else
 _PKG_CREATE_ARGS+=     ${INSTALL_FILE:D        ${_INSTALL_ARG_cmd:sh}}
 _PKG_CREATE_ARGS+=     ${DEINSTALL_FILE:D      ${_DEINSTALL_ARG_cmd:sh}}
+.endif
 
 _PKG_ARGS_INSTALL+=    ${_PKG_CREATE_ARGS}
 _PKG_ARGS_INSTALL+=    -I ${PREFIX} -p ${DESTDIR}${PREFIX}
 
+.if ${_USE_NEW_PKGINSTALL:Uno} == "no"
 _DEINSTALL_ARG_cmd=    if ${TEST} -f ${DEINSTALL_FILE}; then           \
                                ${ECHO} "-k "${DEINSTALL_FILE:Q};       \
                        else                                            \
@@ -355,12 +380,19 @@ _INSTALL_ARG_cmd= if ${TEST} -f ${INSTAL
                        else                                            \
                                ${ECHO};                                \
                        fi
+.endif
 
 _CONTENTS_TARGETS+=    ${_BUILD_INFO_FILE}
 _CONTENTS_TARGETS+=    ${_BUILD_VERSION_FILE}
 _CONTENTS_TARGETS+=    ${_COMMENT_FILE}
+.if ${_USE_NEW_PKGINSTALL:Uno} != "no"
+_CONTENTS_TARGETS+=    ${_DEINSTALL_FILE}
+.endif
 _CONTENTS_TARGETS+=    ${_DEPENDS_FILE}
 _CONTENTS_TARGETS+=    ${_DESCR_FILE}
+.if ${_USE_NEW_PKGINSTALL:Uno} != "no"
+_CONTENTS_TARGETS+=    ${_INSTALL_FILE}
+.endif
 _CONTENTS_TARGETS+=    ${_MESSAGE_FILE}
 _CONTENTS_TARGETS+=    ${_DEPENDS_PLIST}
 _CONTENTS_TARGETS+=    ${_PRESERVE_FILE}
@@ -383,7 +415,9 @@ ${_CONTENTS_FILE}: ${_CONTENTS_TARGETS}
 ###    +COMMENT
 ###    +CONTENTS
 ###    +DESC
+###    +DEINSTALL (if required)
 ###    +DISPLAY
+###    +INSTALL (if required)
 ###    +PRESERVE
 ###    +SIZE_ALL
 ###    +SIZE_PKG



Home | Main Index | Thread Index | Old Index