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 1.21:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/26aefeff546b
branches:  trunk
changeset: 495310:26aefeff546b
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Mon Jun 06 18:50:07 2005 +0000

description:
Update to 1.21:
- Make the EXTRA_MK variable be a list of files rather a single one.
  From brook at biology.nmsu.edu in PR pkg/30099.
- Directly recognize pkg_* commands to be executed within the sandbox
  (i.e., no need to use the chroot keyword).
  From Robert Elz in PR pkg/29749.
- Fix a typo in the manual page.

diffstat:

 pkgtools/pkg_comp/Makefile          |   4 ++--
 pkgtools/pkg_comp/files/pkg_comp.8  |  13 +++++++++----
 pkgtools/pkg_comp/files/pkg_comp.sh |  25 +++++++++++++++++--------
 3 files changed, 28 insertions(+), 14 deletions(-)

diffs (108 lines):

diff -r 9a0b2dd199ed -r 26aefeff546b pkgtools/pkg_comp/Makefile
--- a/pkgtools/pkg_comp/Makefile        Mon Jun 06 18:39:23 2005 +0000
+++ b/pkgtools/pkg_comp/Makefile        Mon Jun 06 18:50:07 2005 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.28 2005/04/11 21:47:05 tv Exp $
+# $NetBSD: Makefile,v 1.29 2005/06/06 18:50:07 jmmv Exp $
 
-DISTNAME=      pkg_comp-1.20
+DISTNAME=      pkg_comp-1.21
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r 9a0b2dd199ed -r 26aefeff546b pkgtools/pkg_comp/files/pkg_comp.8
--- a/pkgtools/pkg_comp/files/pkg_comp.8        Mon Jun 06 18:39:23 2005 +0000
+++ b/pkgtools/pkg_comp/files/pkg_comp.8        Mon Jun 06 18:50:07 2005 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_comp.8,v 1.24 2005/03/20 21:29:05 jmmv Exp $
+.\" $NetBSD: pkg_comp.8,v 1.25 2005/06/06 18:50:07 jmmv Exp $
 .\"
 .\" pkg_comp - Build packages inside a clean chroot environment
 .\" Copyright (c) 2002, 2003, 2004 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 April 2, 2004
+.Dd June 6, 2005
 .Dt PKG_COMP 8
 .Os
 .Sh NAME
@@ -198,7 +198,7 @@
 Defaults to
 .Pa /var/pub/NetBSD .
 .It EXTRAMK
-Specifies a file that must be appended to
+Specifies a whitespace-separated list of files that must be appended to
 .Pa $DESTDIR/etc/mk.conf .
 This is useful to add special items to this configuration file.
 Defaults to nothing.
@@ -445,6 +445,11 @@
 If no arguments are given,
 .Va ROOTSHELL
 is executed, otherwise whatever you typed.
+If the first argument begins with a word prefixed by
+.Li pkg_ ,
+then the
+.Ql chroot
+argument can be omitted (it is implied).
 .It removeroot
 Remove the entire chroot tree.
 You should do it with this target because it
@@ -464,7 +469,7 @@
 .Sy AUTO_PACKAGES
 or pass package names through the command line.
 .Pp
-If the magic work
+If the magic word
 .Ql resume
 is passed as the unique argument to this target,
 .Nm
diff -r 9a0b2dd199ed -r 26aefeff546b pkgtools/pkg_comp/files/pkg_comp.sh
--- a/pkgtools/pkg_comp/files/pkg_comp.sh       Mon Jun 06 18:39:23 2005 +0000
+++ b/pkgtools/pkg_comp/files/pkg_comp.sh       Mon Jun 06 18:50:07 2005 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: pkg_comp.sh,v 1.22 2004/12/12 01:04:27 grant Exp $
+# $NetBSD: pkg_comp.sh,v 1.23 2005/06/06 18:50:07 jmmv Exp $
 #
 # pkg_comp - Build packages inside a clean chroot environment
 # Copyright (c) 2002, 2003, 2004 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
@@ -555,11 +555,13 @@
     done
 
     if [ -n "$EXTRAMK" ]; then
-        if [ ! -f "$EXTRAMK" ]; then
-            err "Cannot find $EXTRAMK"
-        else
-            cat $EXTRAMK >> $file
-        fi
+        for mkfile in $EXTRAMK; do
+            if [ ! -f "$mkfile" ]; then
+                err "Cannot find $mkfile"
+            else
+                cat $mkfile >> $file
+            fi
+        done
     fi
 
     if [ "$USE_AUDIT_PACKAGES" != "yes" ]; then
@@ -886,8 +888,15 @@
     conffile="$confdir/default.conf"
 fi
 
-target="$1"
-shift
+case "$1" in
+    pkg_*)
+        target=chroot
+        ;;
+    *)
+        target="$1"
+        shift
+        ;;
+esac
 args="$*"
 
 # readconf



Home | Main Index | Thread Index | Old Index