From 8cba5ce10376538b1e9fea35268bfc07f325a207 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Thu, 10 Feb 2022 18:02:11 +0100 Subject: [PATCH] Make difference in switching from current >15.0 or from <15.0 to 15.0 --- src/slackpkgplus.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index d947204..7461997 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -2061,7 +2061,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi if [ -e ${WORKDIR}/current ]&&[ "$MIRROR_VERSION" != "current" ];then - echo "WARNING: ${WORKDIR}/current does exists and you have + echo "WARNING: ${WORKDIR}/current does exists and you have not selected slackware current repository. This may be you have an older version o slackpkg. @@ -2081,7 +2081,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi fi if [ "${SLACKWARE_VERSION:0:2}" == "14" ]&&[ "$MIRROR_VERSION" == "15.0" ];then - echo "WARNING: You have selected a mirror for Slackware 15.0 and you are running + echo "WARNING: You have selected a mirror for Slackware 15.0 and you are running slackware $SLACKWARE_VERSION; if you are upgrading slackware be sure to run following steps: # slackpkg update @@ -2093,7 +2093,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo sleep 5 elif [ "${MIRROR_VERSION:0:2}" == "14" ];then - echo "FATAL: You have selected a mirror for Slackware $MIRROR_VERSION! + echo "FATAL: You have selected a mirror for Slackware $MIRROR_VERSION! If this is an error please correct your slackpkg configuration. If you really wants to install Slackware $MIRROR_VERSION be sure to downgrade slackpkg+ to 1.7.0 since $SPKGPLUS_VERSION does not @@ -2102,19 +2102,25 @@ if [ "$SLACKPKGPLUS" = "on" ];then EXIT_CODE=1 cleanup elif [ ! -e ${WORKDIR}/current ]&&[ -e ${WORKDIR}/currentplus ];then - echo "WARNING: You have changed the mirror from Slackware current to $MIRROR_VERSION; + if [ "$SLACKWARE_VERSION" == "15.0+" ];then + echo "WARNING: You have changed the mirror from Slackware current to $MIRROR_VERSION; + You are running Slackware $SLACKWARE_VERSION; this means a system DOWNGRADE! + + Be careful! If that's not what you want please check and fix your configuration! + "|tee -a $TMPDIR/error.log + sleep 5 + else + echo "INFO: You have changed the mirror from Slackware current to $MIRROR_VERSION; You are running Slackware $SLACKWARE_VERSION; if you are upgrading slackware be sure to run following steps: # slackpkg update # slackpkg install-new$MULTILIB_ACTION # slackpkg upgrade-all - # slackpkg clean-system - - If this is an error please fix the configuration."|tee -a $TMPDIR/info.log + # slackpkg clean-system"|tee -a $TMPDIR/info.log + fi echo - sleep 5 elif [ -e ${WORKDIR}/current ]&&[ ! -e ${WORKDIR}/currentplus ];then - echo "INFO: You have changed the mirror to Slackware current; + echo "INFO: You have changed the mirror to Slackware current; You are running Slackware $SLACKWARE_VERSION; if you are upgrading slackware be sure to run following steps: # slackpkg update