From 636fdb3b8fe582d2ba5da2d8b04276335e8451ab Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 13 Jan 2023 09:38:40 +0100 Subject: debvm-create: remove --package option This option was meant to make it convenient to add packages, but mmdebstrap's --include provides the same convenience at more flexibility. You can provide apt patterns there provided that you use multiple --include options. So rather than duplicate this functionality under a different name, just refer to mmdebstrap thus reinforcing the notion of being a thin wrapper. This also removes the convenience of overriding the kernel image. You need to use --skip=kernel when passing --include=linux-image-something to mmdebstrap now. This implements "explicit is better than implicit". --- bin/debvm-create | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'bin/debvm-create') diff --git a/bin/debvm-create b/bin/debvm-create index 59811e8..b34399b 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -11,7 +11,7 @@ debvm-create - Create a VM image for various Debian releases and architectures =head1 SYNOPSIS -B [B<-a> I] [B<-h> I] [B<-k> F] [B<-m> I] [B<-o> F] [B<-p> I] [B<-r> I] [B<-s> ] [B<-z> I] [B<--> I] +B [B<-a> I] [B<-h> I] [B<-k> F] [B<-m> I] [B<-o> F] [B<-r> I] [B<-s> ] [B<-z> I] [B<--> I] =head1 DESCRIPTION @@ -54,13 +54,6 @@ By default, L is being used. Specify the file name of the resulting virtual machine image. By default, it is written to F. -=item B<-p> I, B<--package>=I - -Request additional packages to be installed into the virtual machine image. -This option can be specified multiple times and packages can be separated by a comma. -Package recommendations are not honoured. -If a linux-image is passed here, it will also C<--skip=kernel>. - =item B<-r> I, B<--release>=I Use the given Debian release. @@ -108,6 +101,7 @@ The default is 1 GB. All options beyond a double dash are passed to B before the suite, target and mirror specification. This can be used to provide additional hooks for image customization. +You can also request additional packages to be installed into the image using B's B<--include> option. =back @@ -142,7 +136,7 @@ die() { exit 1 } usage() { - die "usage: $0 [-a architecture] [-h hostname] [-k sshkey] [-m mirror] [-o output] [-p packages] [-r release] [-z size_in_GB] [-- mmdebstrap options]" + die "usage: $0 [-a architecture] [-h hostname] [-k sshkey] [-m mirror] [-o output] [-r release] [-s task] [-z size_in_GB] [-- mmdebstrap options]" } usage_error() { echo "error: $*" 1>&2 @@ -167,12 +161,6 @@ opt_sshkey() { opt_output() { IMAGE=$1 } -opt_package() { - INCLUDE_PACKAGES="$INCLUDE_PACKAGES,$1" - case "$1" in linux-image*) - opt_skip kernel - ;; esac -} opt_release() { SUITE=$1 } @@ -180,14 +168,13 @@ opt_size() { SIZE=$(($1*1024*1024*1024)) } -while getopts :a:h:k:m:o:p:r:s:z:-: OPTCHAR; do +while getopts :a:h:k:m:o:r:s:z:-: OPTCHAR; do case "$OPTCHAR" in a) opt_architecture "$OPTARG" ;; h) opt_hostname "$OPTARG" ;; k) opt_sshkey "$OPTARG" ;; m) opt_mirror "$OPTARG" ;; o) opt_output "$OPTARG" ;; - p) opt_package "$OPTARG" ;; r) opt_release "$OPTARG" ;; s) opt_skip "$OPTARG" ;; z) opt_size "$OPTARG" ;; @@ -196,12 +183,12 @@ while getopts :a:h:k:m:o:p:r:s:z:-: OPTCHAR; do help) usage ;; - architecture|hostname|mirror|output|package|release|size|skip|sshkey) + architecture|hostname|mirror|output|release|size|skip|sshkey) test "$OPTIND" -gt "$#" && usage_error "missing argument for --$OPTARG" "opt_$OPTARG" "$(nth_arg "$OPTIND" "$@")" OPTIND=$((OPTIND+1)) ;; - architecture=*|hostname=*|mirror=*|output=*|package=*|release=*|size=*|skip=*|sshkey=*) + architecture=*|hostname=*|mirror=*|output=*|release=*|size=*|skip=*|sshkey=*) "opt_${OPTARG%%=*}" "${OPTARG#*=}" ;; *) -- cgit v1.2.3