pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/pkgformat/pkg/templates mk/pkgformat: Support INSTA...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3c99322b4b0e
branches:  trunk
changeset: 366987:3c99322b4b0e
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Aug 21 12:48:25 2017 +0000

description:
mk/pkgformat: Support INSTALL scripts that rely on UNPACK.

The pkginstall framework had an UNPACK action invoked early
in the PRE-INSTALL stage to unpack scriplets that were invoked
in later stages to perform extra work for installation, removal,
or both.

Add an UNPACK action that is a no-op for any scripts that don't
support the action.

diffstat:

 mk/pkgformat/pkg/templates/install |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 934fbadefddb -r 3c99322b4b0e mk/pkgformat/pkg/templates/install
--- a/mk/pkgformat/pkg/templates/install        Mon Aug 21 12:02:41 2017 +0000
+++ b/mk/pkgformat/pkg/templates/install        Mon Aug 21 12:48:25 2017 +0000
@@ -27,10 +27,19 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
-# $NetBSD: install,v 1.2 2017/08/10 05:41:52 jlam Exp $
+# $NetBSD: install,v 1.3 2017/08/21 12:48:25 jlam Exp $
 
 case ${STAGE} in
 PRE-INSTALL)
+       # Scripts that make use of the older pkginstall framework may
+       # need to unpack scriptlets during PRE-INSTALL to be used in
+       # later stages.
+       #
+       # Failure to unpack is fatal since the scriptlets will be
+       # required to complete package installation or removal.
+       #
+       ${SH} ${SELF} ${PKGNAME} UNPACK || exit $?
+
        task_load preinstall
 
        # Use the data in the shell comments appended at the end of



Home | Main Index | Thread Index | Old Index