Fixed an issue with slackpkg-2.83.0-noarch-3 (current-15/06/2018)

ap/slackpkg-2.83.0-noarch-3.txz:  Rebuilt.
  Don't remove ChangeLog.txt upon upgrade/reinstall.
  Use CHECKSUMS.md5.asc to determine if ChangeLog.txt is unchanged.

it downloads CHECKSUMS.md5.asc BEFORE ChangeLog.txt.
This broke the 'slackpkg update' in slackpkg+

Solved by force to download ChangeLog.txt the first time that
checkchangelog() ask for CHECKSUMS.md5.asc
This commit is contained in:
Matteo Rossini 2018-06-15 16:04:55 +02:00
parent ccb6be0593
commit 30eae62fcf

View file

@ -472,10 +472,23 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# The new getfile() download all file needed from all defined repositories # The new getfile() download all file needed from all defined repositories
# then merge all in a format slackpkg-compatible # then merge all in a format slackpkg-compatible
function getfile(){ function getfile(){
if [ "$DOWNLOADCHANGELOG" = "force" -a $(basename $1) = "CHECKSUMS.md5.asc" ];then
echo "force to download ChangeLog"
DOWNLOADCHANGELOG=no
getfile "$(echo "$1"|sed 's/CHECKSUMS.md5.asc$/ChangeLog.txt/')" "$(echo "$2"|sed 's/CHECKSUMS.md5.asc$/ChangeLog.txt/')"
>$TMPDIR/changelogdownloaded
echo "PGP" >$TMPDIR/CHECKSUMS.md5.asc
return
fi
local URLFILE local URLFILE
URLFILE=$1 URLFILE=$1
if [ $(basename $1) = "ChangeLog.txt" ];then if [ $(basename $1) = "ChangeLog.txt" ];then
if [ -e $TMPDIR/changelogdownloaded ];then
echo " Done."
return
fi
rm -f $TMPDIR/CHECKSUMS.md5.asc
echo " ChangeLogs" echo " ChangeLogs"
fi fi
@ -1599,6 +1612,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# answer to "Do you really want to download all other files" # answer to "Do you really want to download all other files"
# if there are new changes # if there are new changes
ANSWER="Y" ANSWER="Y"
DOWNLOADCHANGELOG=force
fi fi
if [ "$UPARG" != "gpg" ]&&[ "$CHECKGPG" = "on" ]&& ! ls -l $WORKDIR/gpg/GPG-KEY-slackware*.gpg >/dev/null 2>&1;then if [ "$UPARG" != "gpg" ]&&[ "$CHECKGPG" = "on" ]&& ! ls -l $WORKDIR/gpg/GPG-KEY-slackware*.gpg >/dev/null 2>&1;then