[pacman-dev] [PATCH] Add --confirm

Allan McRae allan at archlinux.org
Mon Dec 7 09:38:24 UTC 2020


On 7/12/20 7:21 pm, morganamilo wrote:
> this is useful for cancelling the automatically passed --noconfirm
> by makechrootpkg

Please explain why I should care what makechrootpkg does?

> 
> diff --git a/doc/makepkg.8.asciidoc b/doc/makepkg.8.asciidoc
> index 3b5e61b3..b3ecbe12 100644
> --- a/doc/makepkg.8.asciidoc
> +++ b/doc/makepkg.8.asciidoc
> @@ -184,6 +184,9 @@ Options
>  	(Passed to pacman) Prevent pacman from waiting for user input before
>  	proceeding with operations.
>  
> +*\--confirm*::
> +	Cancels the effects of a previous --noconfirm.
> +
>  *\--needed*::
>  	(Passed to pacman) Tell pacman not to reinstall a target if it is already
>  	up-to-date. (used with '-i' / '\--install').
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index b39433f3..1c8e8a0e 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -997,6 +997,7 @@ usage() {
>  	printf -- "$(gettext "  --asdeps         Install packages as non-explicitly installed")\n"
>  	printf -- "$(gettext "  --needed         Do not reinstall the targets that are already up to date")\n"
>  	printf -- "$(gettext "  --noconfirm      Do not ask for confirmation when resolving dependencies")\n"
> +	printf -- "$(gettext "  --confirm        Cancels the effects of a previous --noconfirm")\n"
>  	printf -- "$(gettext "  --noprogressbar  Do not show a progress bar when downloading files")\n"
>  	echo
>  	printf -- "$(gettext "If %s is not specified, %s will look for '%s'")\n" "-p" "makepkg" "$BUILDSCRIPT"
> @@ -1036,7 +1037,7 @@ OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg'
>            'skippgpcheck' 'source' 'syncdeps' 'verifysource' 'version')
>  
>  # Pacman Options
> -OPT_LONG+=('asdeps' 'noconfirm' 'needed' 'noprogressbar')
> +OPT_LONG+=('asdeps' 'confirm' 'noconfirm' 'needed' 'noprogressbar')
>  
>  if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
>  	exit $E_INVALID_OPTION
> @@ -1050,6 +1051,7 @@ while true; do
>  		--asdeps)         ASDEPS=1;;
>  		--needed)         NEEDED=1;;
>  		--noconfirm)      PACMAN_OPTS+=("--noconfirm") ;;
> +		--confirm)        PACMAN_OPTS+=("--confirm") ;;
>  		--noprogressbar)  PACMAN_OPTS+=("--noprogressbar") ;;
>  
>  		# Makepkg Options
> 


More information about the pacman-dev mailing list