From 6b1deedf15d14e426e5450b759710e8782c22ab3 Mon Sep 17 00:00:00 2001 From: wgiokas <1007380@gmail.com> Date: Mon, 19 Nov 2012 18:51:06 -0600 Subject: Add --needed option to makepkg Simply add the option to pass the --needed flag to pacman when using -i with makepkg. When using makepkg in scripts, particularly for git packages with the new version functions and not just a date, this can save disk io and time instead of reinstalling. This would mostly be useful with the --noconfirm option. Signed-off-by: wgiokas <1007380@gmail.com> Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 78bd4d4c..6f4732f9 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2345,6 +2345,7 @@ usage() { echo printf -- "$(gettext " --asdeps Install packages as non-explicitly installed")\n" printf -- "$(gettext " --noconfirm Do not ask for confirmation when resolving dependencies")\n" + printf -- "$(gettext " --needed Do not reinstall the targets that are already up to date")\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" @@ -2380,7 +2381,7 @@ OPT_LONG=('allsource' 'asroot' 'check' 'clean' 'config:' 'force' 'geninteg' 'source' 'syncdeps' 'version') # Pacman Options -OPT_LONG+=('asdeps' 'noconfirm' 'noprogressbar') +OPT_LONG+=('asdeps' 'noconfirm' 'needed' 'noprogressbar') if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then exit 1 # E_INVALID_OPTION; @@ -2393,6 +2394,7 @@ while true; do # Pacman Options --asdeps) ASDEPS=1;; --noconfirm) PACMAN_OPTS+=" --noconfirm" ;; + --needed) PACMAN_OPTS+=" --needed" ;; --noprogressbar) PACMAN_OPTS+=" --noprogressbar" ;; # Makepkg Options -- cgit v1.2.3-70-g09d2