pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_comp Update to pkg_comp 1.37:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d83d7a35ccc2
branches:  trunk
changeset: 603974:d83d7a35ccc2
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Sat May 19 10:54:39 2012 +0000

description:
Update to pkg_comp 1.37:

- Add the GENERATE_PKG_SUMMARY option to tell pkg_comp to generate a
  pkg_summary.gz file in the packages directory.  Useful to later be
  able to run a packaging tool like pkgin against new binary packages.

diffstat:

 pkgtools/pkg_comp/Makefile          |   4 ++--
 pkgtools/pkg_comp/files/pkg_comp.8  |  14 ++++++++++++--
 pkgtools/pkg_comp/files/pkg_comp.sh |  20 ++++++++++++++++++--
 3 files changed, 32 insertions(+), 6 deletions(-)

diffs (104 lines):

diff -r cb61d0428a00 -r d83d7a35ccc2 pkgtools/pkg_comp/Makefile
--- a/pkgtools/pkg_comp/Makefile        Sat May 19 09:51:34 2012 +0000
+++ b/pkgtools/pkg_comp/Makefile        Sat May 19 10:54:39 2012 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.48 2012/02/27 22:42:26 jmmv Exp $
+# $NetBSD: Makefile,v 1.49 2012/05/19 10:54:39 jmmv Exp $
 
-DISTNAME=      pkg_comp-1.36
+DISTNAME=      pkg_comp-1.37
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r cb61d0428a00 -r d83d7a35ccc2 pkgtools/pkg_comp/files/pkg_comp.8
--- a/pkgtools/pkg_comp/files/pkg_comp.8        Sat May 19 09:51:34 2012 +0000
+++ b/pkgtools/pkg_comp/files/pkg_comp.8        Sat May 19 10:54:39 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_comp.8,v 1.36 2012/02/27 22:42:27 jmmv Exp $
+.\" $NetBSD: pkg_comp.8,v 1.37 2012/05/19 10:54:39 jmmv Exp $
 .\"
 .\" pkg_comp - Build packages inside a clean chroot environment
 .\" Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 27, 2012
+.Dd May 11, 2012
 .Dt PKG_COMP 8
 .Os
 .Sh NAME
@@ -234,6 +234,16 @@
 Packages are searched inside
 .Pa $REAL_PACKAGES/All .
 Defaults to nothing.
+.It GENERATE_PKG_SUMMARY
+If set to
+.Sq yes ,
+generate a new
+.Pa $REAL_PACKAGES/pkg_summary.gz
+file at the end of every package build by both the
+.Sq auto
+and
+.Sq build
+targets.
 .It LOCALBASE
 Where binary packages get installed.
 Defaults to
diff -r cb61d0428a00 -r d83d7a35ccc2 pkgtools/pkg_comp/files/pkg_comp.sh
--- a/pkgtools/pkg_comp/files/pkg_comp.sh       Sat May 19 09:51:34 2012 +0000
+++ b/pkgtools/pkg_comp/files/pkg_comp.sh       Sat May 19 10:54:39 2012 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: pkg_comp.sh,v 1.40 2012/02/27 22:42:27 jmmv Exp $
+# $NetBSD: pkg_comp.sh,v 1.41 2012/05/19 10:54:40 jmmv Exp $
 #
 # pkg_comp - Build packages inside a clean chroot environment
 # Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
@@ -51,7 +51,7 @@
                 REAL_PACKAGES REAL_PACKAGES_OPTS REAL_PKGVULNDIR \
                 NETBSD_RELEASE MAKEROOT_HOOKS MOUNT_HOOKS UMOUNT_HOOKS \
                 SYNC_UMOUNT AUTO_TARGET AUTO_PACKAGES BUILD_PACKAGES \
-                REAL_CCACHE LIBKVER_STANDALONE_PREFIX"
+                REAL_CCACHE LIBKVER_STANDALONE_PREFIX GENERATE_PKG_SUMMARY"
 
 _BUILD_RESUME=
 
@@ -126,6 +126,7 @@
     : ${UMOUNT_HOOKS:=}
     : ${SYNC_UMOUNT:=no}
     : ${REAL_CCACHE:=}
+    : ${GENERATE_PKG_SUMMARY:=yes}
 
     if [ -n "${MAKE_PACKAGES}" ]; then
         warn "MAKE_PACKAGES is deprecated; use {AUTO,BUILD}_PACKAGES instead."
@@ -688,6 +689,18 @@
     pkg_removeroot
 }
 
+# generate_pkg_summary directory
+#
+#    Generates a pkg_summary.gz file in the specified directory.
+generate_pkg_summary()
+{
+    local directory="${1}"; shift
+
+    echo "PKG_COMP ==> Generating pkg_summary.tgz"
+    for pkg in "${directory}"/*.tgz; do pkg_info -X "${pkg}"; done \
+        | gzip -c >"${directory}"/pkg_summary.gz
+}
+
 # ----------------------------------------------------------------------
 # build target
 # ----------------------------------------------------------------------
@@ -753,6 +766,9 @@
             echo "    $p"
         done
     fi
+    if [ "${GENERATE_PKG_SUMMARY}" = yes ]; then
+        generate_pkg_summary "${REAL_PACKAGES}/All"
+    fi
 }
 
 # find_pkg name



Home | Main Index | Thread Index | Old Index