FS#4872 - [srcpac] ignore --noconfirm option

Attached to Project: Pacman
Opened by Julien MISCHKOWITZ (wain) - Monday, 26 June 2006, 11:43 GMT
Last edited by Andrea Scarpino (BaSh) - Wednesday, 25 November 2009, 00:23 GMT
Task Type Feature Request
Category Scripts & Tools
Status Closed
Assigned To Dan McGee (toofishes)
Andrea Scarpino (BaSh)
Architecture All
Severity Low
Priority Normal
Reported Version 2.9.8
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

srcpac ignore the --noconfirm option.
This patch add this add the abitlity to build without confirmation

*** srcpacold 2006-06-26 13:34:59.000000000 +0200
--- srcpacnew 2006-06-26 13:35:32.000000000 +0200
***************
*** 138,143 ****
--- 138,144 ----
ONLYCONF=0
IGNORE=0
IGNOREPKG=""
+ NOCONFIRM=0

ARGLIST=$@
ARGSANS=""
***************
*** 218,223 ****
--- 219,228 ----
IGNOREPKG="$IGNOREPKG $2"
ARGSANS="$ARGSANS $1 $2"
;;
+ --noconfirm)
+ NOCONFIRM=1
+ ARGSANS="$ARGSANS $1"
+ ;;
--*)
# usage
# exit 1
***************
*** 228,234 ****
if [ `echo $1 | grep r` ]; then
OPTIONAL=$2
fi
- OPTIND=1
while getopts ":VARUFQSidfbyur:wo" opt $1 $OPTIONAL; do
case $opt in
V) version ;;
--- 233,238 ----
***************
*** 350,359 ****
--- 354,368 ----
pacargs="-S"
[ $NODEPS -eq 1 ] && pacargs="${pacargs}d"
[ $ROOT -eq 1 ] && pacargs="${pacargs} -r $NEWROOT"
+ [ $NOCONFIRM -eq 1 ] && pacargs="${pacargs} --noconfirm"
+
pacman $pacargs ${regpac[*]} $ignorestr
+
if [ ${#sourcepac[@]} -eq 0 ]; then
exit 0
fi
+
+ if [ $NOCONFIRM -eq 0 ]; then
echo
echo "Source Targets: ${sourcepac[*]}"
echo
***************
*** 362,367 ****
--- 371,377 ----
if [ "$REPLY" != "y" -a "$REPLY" != "Y" -a "$REPLY" != "" ]; then
exit 0
fi
+ fi

if [ $ROOT -eq 0 ]; then
build_packages "install" ${sourcepac[@]}
***************
*** 442,447 ****
--- 452,458 ----
exit 0
fi

+ if [ $NOCONFIRM -eq 0 ]; then
echo
echo "Source Targets: ${packages[*]}"
echo
***************
*** 450,455 ****
--- 461,467 ----
if [ "$REPLY" != "y" -a "$REPLY" != "Y" -a "$REPLY" != "" ]; then
exit 0
fi
+ fi

if [ $ROOT -eq 0 ]; then
build_packages "install" ${packages[@]}
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Wednesday, 25 November 2009, 00:23 GMT
Reason for closing:  Implemented
Additional comments about closing:  probably I'll change the code, anyway I like this option.
Comment by Roman Kyrylych (Romashka) - Saturday, 03 November 2007, 12:11 GMT
status on this?
Comment by Julien MISCHKOWITZ (wain) - Saturday, 03 November 2007, 12:48 GMT
I don't know. I don't use anymore neither abs nor srcpac.
yaourt -Sb works so much better than srcpac ;-)

Loading...