pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/install Add a new definition, PKGSRC_KEEP_BIN_PKGS,...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/77929cd0fa2d
branches:  trunk
changeset: 642896:77929cd0fa2d
user:      agc <agc%pkgsrc.org@localhost>
date:      Sat Dec 06 23:28:18 2014 +0000

description:
Add a new definition, PKGSRC_KEEP_BIN_PKGS, which defaults to "no".
This definition controls whether the binary package which is built
during package installation will be copied to pkgsrc/packages/All.

To retain binary packages in pkgsrc/packages/All, set

        PKGSRC_KEEP_BIN_PKGS=yes

in environment or MAKECONF. If this is not set, binary packages
will not be preserved after their WRKDIR is removed. This may not
be what you want.

To preserve the status quo since 2013/05/22, and just delete the
binary package after it's built, the default for PKGSRC_KEEP_BIN_PKGS
is "no", or it can be explicitly set.

As reviewed on tech-pkg.

diffstat:

 doc/guide/files/configuring.xml |   7 +++++--
 mk/bsd.prefs.mk                 |  10 +++++++++-
 mk/install/bsd.install.mk       |   6 ++++--
 mk/install/replace.mk           |   6 ++++--
 4 files changed, 22 insertions(+), 7 deletions(-)

diffs (87 lines):

diff -r 8d342f45c294 -r 77929cd0fa2d doc/guide/files/configuring.xml
--- a/doc/guide/files/configuring.xml   Sat Dec 06 23:24:37 2014 +0000
+++ b/doc/guide/files/configuring.xml   Sat Dec 06 23:28:18 2014 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: configuring.xml,v 1.44 2014/05/16 03:16:40 obache Exp $ -->
+<!-- $NetBSD: configuring.xml,v 1.45 2014/12/06 23:28:18 agc Exp $ -->
 
 <chapter id="configuring">
   <title>Configuring pkgsrc</title>
@@ -125,7 +125,10 @@
            By default, dependencies are only installed, and no binary
            package is created for them. You can set this variable to
            <literal>package-install</literal> to automatically create binary
-           packages after installing dependencies.</para>
+           packages after installing dependencies. Please note that the
+           <varname>PKGSRC_KEEP_BIN_PKGS</varname>can be set to
+           <literal>yes</literal> to preserve binary packages when
+           using the <literal>install</literal> as well.</para>
        </listitem>
 
        <!--    DISTDIR -->
diff -r 8d342f45c294 -r 77929cd0fa2d mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk   Sat Dec 06 23:24:37 2014 +0000
+++ b/mk/bsd.prefs.mk   Sat Dec 06 23:28:18 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.350 2014/11/29 06:03:02 obache Exp $
+# $NetBSD: bsd.prefs.mk,v 1.351 2014/12/06 23:28:18 agc Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -525,6 +525,14 @@
 DESTDIR=
 .endif
 
+# controls whether binary packages are preserved in pkgsrc/packages/All
+# default is no (to preserve settings since 2013/05/23, prior to that it
+# was yes)
+_KEEP_BIN_PKGS?= no
+.if !empty(PKGSRC_KEEP_BIN_PKGS:M[Yy][Ee][Ss])
+_KEEP_BIN_PKGS=        yes
+.endif
+
 _MAKE_CLEAN_AS_ROOT?=  no
 # Whether to run the clean target as root.
 _MAKE_INSTALL_AS_ROOT?=        yes
diff -r 8d342f45c294 -r 77929cd0fa2d mk/install/bsd.install.mk
--- a/mk/install/bsd.install.mk Sat Dec 06 23:24:37 2014 +0000
+++ b/mk/install/bsd.install.mk Sat Dec 06 23:28:18 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.install.mk,v 1.14 2013/05/23 13:18:56 obache Exp $
+# $NetBSD: bsd.install.mk,v 1.15 2014/12/06 23:28:18 agc Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk and provides all
 # variables and targets related to installing packages.
@@ -24,8 +24,10 @@
 .PHONY: install
 .if ${_USE_DESTDIR} == "no"
 install: stage-install
+.elif ${_KEEP_BIN_PKGS} == "no"
+install: stage-package-install
 .else
-install: stage-package-install
+install: package-install
 .endif
 
 ######################################################################
diff -r 8d342f45c294 -r 77929cd0fa2d mk/install/replace.mk
--- a/mk/install/replace.mk     Sat Dec 06 23:24:37 2014 +0000
+++ b/mk/install/replace.mk     Sat Dec 06 23:28:18 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.15 2013/05/23 13:18:56 obache Exp $
+# $NetBSD: replace.mk,v 1.16 2014/12/06 23:28:18 agc Exp $
 #
 # Public targets:
 #
@@ -27,8 +27,10 @@
 
 .if ${_USE_DESTDIR} == "no"
 _REPLACE_TARGETS+=     ${_PKGSRC_BUILD_TARGETS}
+.elif ${_KEEP_BIN_PKGS} == "no"
+_REPLACE_TARGETS+=     stage-package-create
 .else
-_REPLACE_TARGETS+=     stage-package-create
+_REPLACE_TARGETS+=     package
 .endif
 _REPLACE_TARGETS+=     replace-message
 _REPLACE_TARGETS+=     unprivileged-install-hook



Home | Main Index | Thread Index | Old Index