From 321831ac73da0e0179880c905c922c4fd8939c16 Mon Sep 17 00:00:00 2001 From: jmmv Date: Fri, 19 Dec 2003 09:51:55 +0000 Subject: Update to 1.12: * Add the -n flag. When specified, do not install INSTALL_PACKAGES nor MAKE_PACKAGES during the creation of the chroot. --- pkgtools/pkg_comp/Makefile | 4 ++-- pkgtools/pkg_comp/files/pkg_comp.8 | 25 ++++++++++++++++++++++--- pkgtools/pkg_comp/files/pkg_comp.sh | 16 ++++++++++------ 3 files changed, 34 insertions(+), 11 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile index 2521785f280..9dff18bac8f 100644 --- a/pkgtools/pkg_comp/Makefile +++ b/pkgtools/pkg_comp/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.15 2003/12/13 18:29:47 seb Exp $ +# $NetBSD: Makefile,v 1.16 2003/12/19 09:51:55 jmmv Exp $ -DISTNAME= pkg_comp-1.11 +DISTNAME= pkg_comp-1.12 WRKSRC= ${WRKDIR} CATEGORIES= pkgtools MASTER_SITES= # empty diff --git a/pkgtools/pkg_comp/files/pkg_comp.8 b/pkgtools/pkg_comp/files/pkg_comp.8 index 42136f7282e..bb1b28527f3 100644 --- a/pkgtools/pkg_comp/files/pkg_comp.8 +++ b/pkgtools/pkg_comp/files/pkg_comp.8 @@ -1,7 +1,7 @@ -.\" $NetBSD: pkg_comp.8,v 1.15 2003/12/14 00:07:19 wiz Exp $ +.\" $NetBSD: pkg_comp.8,v 1.16 2003/12/19 09:51:55 jmmv Exp $ .\" .\" pkg_comp - Build packages inside a clean chroot environment -.\" Copyright (c) 2002, 2003, Julio M. Merino Vidal +.\" Copyright (c) 2002, 2003, Julio M. Merino Vidal .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -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 December 13, 2003 +.Dd December 19, 2003 .Dt PKG_COMP 8 .Os .Sh NAME @@ -40,6 +40,7 @@ .Pc .Ar conf_file .Oc +.Op Fl n .Ar target .Op Ar pkg_name ... .Sh DESCRIPTION @@ -57,6 +58,24 @@ The configuration file tells .Nm how to configure the new chroot environment, and the target specifies which action to take. +.Pp +The following options are recognized: +.Bl -tag -width XcXconf_file +.It Fl C Ar conf_file +Use +.Ar conf_file +as configuration file (full path expected). +.It Fl c Ar conf_file +Use +.Ar conf_file +as configuration file (only base name expected). +.It Fl n +Avoid installation of +.Va INSTALL_PACKAGES +and +.Va MAKE_PACKAGES +during the creation of the chroot. +.El .Ss What to use it for? You can use .Nm diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh index 19b6484a0d4..bdbcdfbf0ab 100644 --- a/pkgtools/pkg_comp/files/pkg_comp.sh +++ b/pkgtools/pkg_comp/files/pkg_comp.sh @@ -1,9 +1,9 @@ #!/bin/sh # -# $NetBSD: pkg_comp.sh,v 1.12 2003/12/13 18:29:47 seb Exp $ +# $NetBSD: pkg_comp.sh,v 1.13 2003/12/19 09:51:55 jmmv Exp $ # # pkg_comp - Build packages inside a clean chroot environment -# Copyright (c) 2002, 2003, Julio M. Merino Vidal +# Copyright (c) 2002, 2003, Julio M. Merino Vidal # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -117,7 +117,7 @@ err() usage() { - echo "usage: $ProgName [-(c|C) conf_file] target [pkg_names]" + echo "usage: $ProgName [-(c|C) conf_file] [-n] target [pkg_names]" exit 1 } @@ -419,11 +419,11 @@ pkg_makeroot() pkg_build pkgtools/x11-links fi - if [ -n "$INSTALL_PACKAGES" ]; then + if [ "$nflag" = "no" -a -n "$INSTALL_PACKAGES" ]; then pkg_install $INSTALL_PACKAGES fi - if [ -n "$MAKE_PACKAGES" ]; then + if [ "$nflag" = "no" -a -n "$MAKE_PACKAGES" ]; then pkg_build $MAKE_PACKAGES fi } @@ -654,12 +654,13 @@ pkg_removeroot() confdir="$HOME/pkg_comp" # Parse options -args=`getopt c:C: $*` +args=`getopt c:C:n $*` if [ $? != 0 ]; then usage fi set -- $args conffile= +nflag=no while [ $# -gt 0 ]; do case "$1" in -c) @@ -676,6 +677,9 @@ while [ $# -gt 0 ]; do conffile="$2" shift ;; + -n) + nflag=yes + ;; --) shift; break ;; -- cgit v1.2.3