From b69f5e27eff7d390cf53787bdfabf239ddc5dced Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 25 Jun 2021 13:34:54 +0200 Subject: [PATCH] Force download all metadata info in update process after modify conf --- src/slackpkgplus.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 6fe3a29..c77f20d 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -1873,11 +1873,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then find $TEMP ! -type d|sort|tac|awk '{if($1~/\.asc$/)f[$1]++;if($1~/\.t.z$/ && !f[$1".asc"])print $1}' |xargs -r rm -f fi - if [ "$CMD" == "update" -o "$CMD" == "check-updates" ];then - # answer to "Do you really want to download all other files" - # if there are new changes - ANSWER="Y" - fi +# if [ "$CMD" == "update" -o "$CMD" == "check-updates" ];then +# # answer to "Do you really want to download all other files" +# # if there are new changes +# ANSWER="Y" +# fi if [ "$UPARG" != "gpg" ]&&[ "$CHECKGPG" = "on" ]&& ! ls -l $WORKDIR/gpg/GPG-KEY-slackware*.gpg >/dev/null 2>&1;then echo "FATAL! No Slackware GPG-KEY imported." @@ -1941,8 +1941,14 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo fi fi + if [ "$CMD" == "update" ];then + if [ $CONF/slackpkgplus.conf -nt $WORKDIR/CHECKSUMS.md5.asc ];then + BATCH=on + DEFAULT_ANSWER=Y + fi + fi if [ "$CMD" != "update" -a "$CMD" != "check-updates" ];then - if [ $CONF/slackpkgplus.conf -nt $WORKDIR/pkglist ];then + if [ $CONF/slackpkgplus.conf -nt $WORKDIR/CHECKSUMS.md5.asc ];then echo echo "NOTICE: remember to re-run 'slackpkg update' after modifying slackpkgplus.conf" echo