This release, elegible to 1.7.3, fix some backward incompatibility.

slackpkg-15 non longer use to download ChangeLog.txt to check
for updates before print
"No changes in ChangeLog.txt between your last update and now."
both in 'update' and 'check-updates' commands.
It download CHECKSUMS.md5.asc that is smaller.
Unfortunately that broke slackpkg+, so as workaround it did force
to download both the ChangeLog.txt and CHECKSUMS.md5.asc
It did work, but it did force to redownload all other files even if
no updates available.

slackpkg+ 1.7.3 use the new strategy properly.

to do that I needed to change the order of execution of code.

Also now it works if you disable the gpg check.

Another important backward incompatibility of slackpkg-15 is the
output of 'check-updates'.

old:
 "No news is good news" on stdout
 "News on ChangeLog.txt" on stdout

new:
 "Slackpkg: No updated packages since last check." on stdout
 "Slackpkg: Updated packages are available since last check." on stderr

slackpkg+ 1.7.3 uses the same messages.

Since slackpkg+ 1.7.1 and above no longer supports slackware 14
(i.e. slackpkg 2.82.1), some of that fixes could broke the ability
to downgrade it and user may need to downgrade manually.
This commit is contained in:
Matteo Rossini 2021-02-28 01:12:43 +01:00
parent bcd1c22316
commit f1626887be

View file

@ -212,7 +212,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
fi fi
echo echo
rm -f /var/lock/slackpkg.$$ rm -f /var/lock/slackpkg.$$
if [ $VERBOSE -lt 3 ];then if [ $VERBOSE -lt 3 -a -z "$DEBUG" ];then
rm -rf $TMPDIR rm -rf $TMPDIR
fi fi
exit $retval exit $retval
@ -501,24 +501,17 @@ 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) = "CHECKSUMS.md5.asc" ];then
DOWNLOADCHANGELOG=no if [ -e $TMPDIR/signaturedownloaded ];then
if [ -e $TMPDIR/changelogdownloaded ];then
echo " Done." echo " Done."
return return
fi fi
rm -f $TMPDIR/CHECKSUMS.md5.asc echo " Signatures"
fi
if [ $(basename $1) = "ChangeLog.txt" ];then
echo " ChangeLogs" echo " ChangeLogs"
fi fi
@ -598,67 +591,43 @@ if [ "$SLACKPKGPLUS" = "on" ];then
fi fi
fi fi
if [ $(basename $1) = "CHECKSUMS.md5.asc" ];then if [ $(basename $1) = "CHECKSUMS.md5.asc" -a ! -e $TMPDIR/signaturedownloaded ];then
if [ "$CHECKGPG" = "on" ];then cp ${TMPDIR}/CHECKSUMS.md5.asc ${TMPDIR}/CHECKSUMS.md5-slackware.asc
for PREPO in ${REPOPLUS[*]};do for PREPO in ${REPOPLUS[*]};do
URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5.asc URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5.asc
if echo $URLFILE | grep -q "dir:/" ; then if echo $URLFILE | grep -q "dir:/" ; then
continue continue
fi fi
if echo $URLFILE | grep -q "^file://" ; then echo -n "SLACKPKGPLUS_$PREPO[MD5] " >> ${TMPDIR}/CHECKSUMS.md5.asc
URLFILE=${URLFILE:6} if echo $URLFILE | grep -q "^file://" ; then
cp -v $URLFILE ${TMPDIR}/CHECKSUMS.md5-$PREPO.asc 2>/dev/null URLFILE=${URLFILE:6}
else cp -v $URLFILE ${TMPDIR}/CHECKSUMS.md5-$PREPO.asc 2>/dev/null
$DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.asc $URLFILE md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO.asc|awk '{print $1}' >> ${TMPDIR}/CHECKSUMS.md5.asc
if [ $? -ne 0 ];then continue
$DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz.asc `echo $URLFILE|sed 's/\.asc$/.gz.asc/'` fi
if [ $? -eq 0 ];then $DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.asc $URLFILE
$DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz `echo $URLFILE|sed 's/\.asc$/.gz/'` if [ $? -eq 0 ];then
if [ $(checkgpg ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz) -eq 1 ];then md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO.asc|awk '{print $1}' >> ${TMPDIR}/CHECKSUMS.md5.asc
echo continue
echo " !!! N O T I C E !!!" fi
echo " Repository '$PREPO' does support signature checking for" $DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz.asc `echo $URLFILE|sed 's/\.asc$/.gz.asc/'`
echo " CHECKSUMS.md5 file, so the repository authenticity is guaranteed," if [ $? -eq 0 ];then
echo " but you MAY need to temporarily disable gpg check when you" md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz.asc|awk '{print $1}' >> ${TMPDIR}/CHECKSUMS.md5.asc
echo " install the packages using:" continue
echo " 'slackpkg -checkgpg=off install packge'" fi
echo " The package authenticity remains guaranteed." $DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz `echo $URLFILE|sed 's/\.asc$/.gz/'`
echo if [ $? -eq 0 ];then
zcat ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz > ${TMPDIR}/CHECKSUMS.md5-$PREPO md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz|awk '{print $1}' >> ${TMPDIR}/CHECKSUMS.md5.asc
sleep 5 continue
continue fi
fi $DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO `echo $URLFILE|sed 's/\.asc$//'`
fi if [ $? -eq 0 ];then
fi md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO|awk '{print $1}' >> ${TMPDIR}/CHECKSUMS.md5.asc
fi continue
if [ $? -eq 0 ];then fi
if [ $(checkgpg ${TMPDIR}/CHECKSUMS.md5-$PREPO) -ne 1 ];then echo "invalid" >> ${TMPDIR}/CHECKSUMS.md5.asc
echo done
echo " !!! F A T A L !!!" touch $TMPDIR/signaturedownloaded
echo " Repository '$PREPO' FAILS the CHECKSUMS.md5 signature check"
echo " The file may be corrupted or the gpg key may be not valid."
echo " Remember to import keys by launching 'slackpkg update gpg'."
echo
sleep 5
echo "Repository '$PREPO' FAILS the CHECKSUMS.md5 signature check." >> $TMPDIR/error.log
echo "Try to run 'slackpkg update gpg'" >> $TMPDIR/error.log
echo >> $TMPDIR/error.log
echo > ${TMPDIR}/CHECKSUMS.md5-$PREPO
fi
else
echo
echo " !!! W A R N I N G !!!"
echo " Repository '$PREPO' does NOT support signature checking"
echo " You SHOULD disable GPG check by setting 'CHECKGPG=off'"
echo " in /etc/slackpkg/slackpkg.conf or use slackpkg with"
echo " '-checkgpg=off' : 'slackpkg -checkgpg=off install packge'"
echo
sleep 5
fi
done
else
checkgpg ${TMPDIR}/CHECKSUMS.md5 >/dev/null
fi
fi fi
if [ $(basename $1) = "ChangeLog.txt" ];then if [ $(basename $1) = "ChangeLog.txt" ];then
@ -732,9 +701,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then
for PREPO in slackware ${REPOPLUS[*]} ; do for PREPO in slackware ${REPOPLUS[*]} ; do
grep -inE "$CLOG_PKGREGEX" ${TMPDIR}/ChangeLogs/$PREPO.txt > ${TMPDIR}/ChangeLogs/$PREPO.idx grep -inE "$CLOG_PKGREGEX" ${TMPDIR}/ChangeLogs/$PREPO.txt > ${TMPDIR}/ChangeLogs/$PREPO.idx
done done
fi
if [ $(basename $1) = "CHECKSUMS.md5" ];then
for PREPO in ${REPOPLUS[*]};do for PREPO in ${REPOPLUS[*]};do
# Not all repositories have the ChangeLog.txt, so I use md5 of CHECKSUMS.md5 instead
URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5 URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5
if echo $URLFILE | grep -q "^file://" ; then if echo $URLFILE | grep -q "^file://" ; then
URLFILE=${URLFILE:6} URLFILE=${URLFILE:6}
@ -752,7 +721,12 @@ if [ "$SLACKPKGPLUS" = "on" ];then
awk '{print "00000000000000000000000000000000 ./"$NF}' > ${TMPDIR}/CHECKSUMS.md5-$PREPO awk '{print "00000000000000000000000000000000 ./"$NF}' > ${TMPDIR}/CHECKSUMS.md5-$PREPO
fi fi
else else
$DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO ${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5 if [ -e ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz.asc ];then
$DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz ${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5.gz
zcat ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz >${TMPDIR}/CHECKSUMS.md5-$PREPO
else
$DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO ${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5
fi
fi fi
if [ ! -s ${TMPDIR}/CHECKSUMS.md5-$PREPO ];then if [ ! -s ${TMPDIR}/CHECKSUMS.md5-$PREPO ];then
echo echo
@ -766,11 +740,31 @@ if [ "$SLACKPKGPLUS" = "on" ];then
PRIORITY=( $(echo ${PRIORITY[*]}" "|sed "s/SLACKPKGPLUS_$PREPO / /") ) PRIORITY=( $(echo ${PRIORITY[*]}" "|sed "s/SLACKPKGPLUS_$PREPO / /") )
REPOPLUS=( $(echo " "${REPOPLUS[*]}" "|sed "s/ $PREPO / /") ) REPOPLUS=( $(echo " "${REPOPLUS[*]}" "|sed "s/ $PREPO / /") )
else
echo "SLACKPKGPLUS_$PREPO[MD5]" $(md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO|awk '{print $1}') >>$2
fi fi
done done
if [ "$TAG_PRIORITY" == "on" ];then
for PREPO in ${PRIORITY[*]};do
grep " \./$PREPO/" ${TMPDIR}/CHECKSUMS.md5 >> ${TMPDIR}/CHECKSUMS.md5-merged
done
else
cp ${TMPDIR}/CHECKSUMS.md5 ${TMPDIR}/CHECKSUMS.md5-merged
fi
X86_64=$(ls $ROOT/var/log/packages/aaa_base*x86_64* 2>/dev/null|head -1)
for PREPO in ${REPOPLUS[*]};do
if [ -z "$X86_64" ];then
FILTEREXCLUDE="-(x86_64|arm)-"
elif [ "$ALLOW32BIT" == "on" ];then
FILTEREXCLUDE="-(arm)-"
else
FILTEREXCLUDE="-(x86|i[3456]86|arm)-"
fi
egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "$FILTEREXCLUDE" |sed -r -e "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5-merged
#egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "$FILTEREXCLUDE" |sed -r -e "s# \./# ./SLACKPKGPLUS_$PREPO/#" -e 's#^(.*)/([^/]+)$#\2 \1/\2#'|sort -rn|cut -f2- -d" " >> ${TMPDIR}/CHECKSUMS.md5
done
if [ "$CHECKGPG" != "on" ];then
mv ${TMPDIR}/CHECKSUMS.md5-merged ${TMPDIR}/CHECKSUMS.md5
fi
fi fi
if [ $(basename $1) = "GPG-KEY" ];then if [ $(basename $1) = "GPG-KEY" ];then
mkdir -p ${WORKDIR}/gpg mkdir -p ${WORKDIR}/gpg
@ -830,11 +824,48 @@ if [ "$SLACKPKGPLUS" = "on" ];then
function checkgpg() { function checkgpg() {
local FILENAME local FILENAME
local REPO local REPO
local PREPO
if echo $1|egrep -q "/SLACKPKGPLUS_(file|dir|http|ftp|https)[0-9]";then if echo $1|egrep -q "/SLACKPKGPLUS_(file|dir|http|ftp|https)[0-9]";then
echo 1 echo 1
return return
fi fi
if [ "$(basename $1)" == "CHECKSUMS.md5" ];then
for PREPO in ${REPOPLUS[*]};do
if [ -e ${TMPDIR}/CHECKSUMS.md5-$PREPO ];then
if [ "$(checkgpg ${TMPDIR}/CHECKSUMS.md5-$PREPO)" == "0" ];then
echo >&2
echo " !!! F A T A L !!!" >&2
echo " Repository '$PREPO' FAILS the CHECKSUMS.md5.gz signature check" >&2
echo " The file may be corrupted or the gpg key may be not valid." >&2
echo " Remember to import keys by launching 'slackpkg update gpg'." >&2
echo >&2
sleep 5
echo "Repository '$PREPO' FAILS the CHECKSUMS.md5 signature check." >> $TMPDIR/error.log
echo "Try to run 'slackpkg update gpg' or disable the gpg check" >> $TMPDIR/error.log
echo >> $TMPDIR/error.log
echo 0
return
fi
fi
if [ -e ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz ];then
if [ "$(checkgpg ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz)" == "0" ];then
echo >&2
echo " !!! F A T A L !!!" >&2
echo " Repository '$PREPO' FAILS the CHECKSUMS.md5 signature check" >&2
echo " The file may be corrupted or the gpg key may be not valid." >&2
echo " Remember to import keys by launching 'slackpkg update gpg'." >&2
echo >&2
sleep 5
echo "Repository '$PREPO' FAILS the CHECKSUMS.md5.gz signature check." >> $TMPDIR/error.log
echo "Try to run 'slackpkg update gpg' or disable the gpg check" >> $TMPDIR/error.log
echo >> $TMPDIR/error.log
echo 0
return
fi
fi
done
fi
if [ -e "${1}.asc" ];then if [ -e "${1}.asc" ];then
FILENAME=$(basename ${1}) FILENAME=$(basename ${1})
@ -854,9 +885,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then
--verify ${1}.asc ${1} 2>/dev/null && echo "1" || echo "0" --verify ${1}.asc ${1} 2>/dev/null && echo "1" || echo "0"
else else
echo "No matching GPG-KEY for repository '$REPO' checking $FILENAME" >&2 echo "No matching GPG-KEY for repository '$REPO' checking $FILENAME" >&2
echo "Try to run 'slackpkg update gpg' or 'slackpkg -checkgpg=off $CMD ...'" >&2 echo "Try to run 'slackpkg update gpg' or disable gpg check" >&2
echo "No matching GPG-KEY for repository '$REPO' checking $FILENAME" >>$TMPDIR/error.log echo "No matching GPG-KEY for repository '$REPO' checking $FILENAME" >>$TMPDIR/error.log
echo "Try to run 'slackpkg update gpg' or 'slackpkg -checkgpg=off $CMD ...'" >>$TMPDIR/error.log echo "Try to run 'slackpkg update gpg' or disable gpg check" >>$TMPDIR/error.log
echo 0 echo 0
fi fi
else else
@ -866,24 +897,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
echo 1 echo 1
fi fi
if [ "$(basename $1)" == "CHECKSUMS.md5" ];then if [ "$(basename $1)" == "CHECKSUMS.md5" ];then
if [ "$TAG_PRIORITY" == "on" ];then mv ${TMPDIR}/CHECKSUMS.md5-merged ${TMPDIR}/CHECKSUMS.md5
mv ${TMPDIR}/CHECKSUMS.md5 ${TMPDIR}/CHECKSUMS.md5-old
for PREPO in ${PRIORITY[*]};do
grep " \./$PREPO/" ${TMPDIR}/CHECKSUMS.md5-old >> ${TMPDIR}/CHECKSUMS.md5
done
fi
X86_64=$(ls $ROOT/var/log/packages/aaa_base*x86_64* 2>/dev/null|head -1)
for PREPO in ${REPOPLUS[*]};do
if [ -z "$X86_64" ];then
FILTEREXCLUDE="-(x86_64|arm)-"
elif [ "$ALLOW32BIT" == "on" ];then
FILTEREXCLUDE="-(arm)-"
else
FILTEREXCLUDE="-(x86|i[3456]86|arm)-"
fi
egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "$FILTEREXCLUDE" |sed -r -e "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
#egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "$FILTEREXCLUDE" |sed -r -e "s# \./# ./SLACKPKGPLUS_$PREPO/#" -e 's#^(.*)/([^/]+)$#\2 \1/\2#'|sort -rn|cut -f2- -d" " >> ${TMPDIR}/CHECKSUMS.md5
done
fi fi
} # END function checkgpg() } # END function checkgpg()
@ -1733,7 +1747,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
cleanup cleanup
fi fi
SPKGPLUS_VERSION="1.7.2" SPKGPLUS_VERSION="1.7.3"
VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION"
if [ ${VERSION:0:4} == "2.82" ];then if [ ${VERSION:0:4} == "2.82" ];then
@ -1779,7 +1793,6 @@ 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
@ -2216,34 +2229,34 @@ if [ "$SLACKPKGPLUS" = "on" ];then
if [ $ERR -ne 0 ]; then if [ $ERR -ne 0 ]; then
# -- Note: # -- Note:
# checkchangelog() download the ChangeLog.txt and stores it # checkchangelog() download the CHECKSUMS.md5.asc and stores it
# in ${TMPDIR} # in ${TMPDIR}
# extract the slackpkgplus repositories md5 from the ChangeLog.txt # extract the slackpkgplus repositories md5 from the CHECKSUMS.md5.asc
# files (in ${WORKDIR} and ${TMPDIR} to identify updates in Slackware # files (in ${WORKDIR} and ${TMPDIR} to identify updates in Slackware
# repository. # repository.
# #
grep -v "^SLACKPKGPLUS_.*\[MD5\] " ${WORKDIR}/ChangeLog.txt > ${TMPDIR}/ChangeLog.old grep -v "^SLACKPKGPLUS_.*\[MD5\] " ${WORKDIR}/CHECKSUMS.md5.asc > ${TMPDIR}/CHECKSUMS.md5.asc.old
grep -v "^SLACKPKGPLUS_.*\[MD5\] " ${TMPDIR}/ChangeLog.txt > ${TMPDIR}/ChangeLog.new grep -v "^SLACKPKGPLUS_.*\[MD5\] " ${TMPDIR}/CHECKSUMS.md5.asc > ${TMPDIR}/CHECKSUMS.md5.asc.new
if [ "$(md5sum ${TMPDIR}/ChangeLog.old | cut -f1 -d' ')" != "$(md5sum ${TMPDIR}/ChangeLog.new | cut -f1 -d' ')" ] ; then if ! diff --brief ${TMPDIR}/CHECKSUMS.md5.asc.old ${TMPDIR}/CHECKSUMS.md5.asc.new >/dev/null ; then
echo "slackware" > ${TMPDIR}/updated-repos.txt echo "slackware" > ${TMPDIR}/updated-repos.txt
fi fi
# -- get the list of the repositories configured before this call to check-updates # -- get the list of the repositories configured before this call to check-updates
# #
grep "^SLACKPKGPLUS_.*\[MD5\] " ${WORKDIR}/ChangeLog.txt | sed 's/^SLACKPKGPLUS_//; s/\[MD5\]//' | cut -f1 -d" "> ${TMPDIR}/selected.3pr grep "^SLACKPKGPLUS_.*\[MD5\] " ${WORKDIR}/CHECKSUMS.md5.asc | sed 's/^SLACKPKGPLUS_//; s/\[MD5\]//' | cut -f1 -d" "> ${TMPDIR}/selected.3pr
# create pseudo changelogs for the selected 3rd party repositories # create pseudo changelogs for the selected 3rd party repositories
# #
grep "^SLACKPKGPLUS_.*\[MD5\] " ${WORKDIR}/ChangeLog.txt | sort > "${TMPDIR}/3rp-ChangeLog.old" grep "^SLACKPKGPLUS_.*\[MD5\] " ${WORKDIR}/CHECKSUMS.md5.asc | sort > "${TMPDIR}/3rp-CHECKSUMS.old"
grep "^SLACKPKGPLUS_.*\[MD5\] " ${TMPDIR}/ChangeLog.txt | sort > "${TMPDIR}/3rp-ChangeLog.new" grep "^SLACKPKGPLUS_.*\[MD5\] " ${TMPDIR}/CHECKSUMS.md5.asc | sort > "${TMPDIR}/3rp-CHECKSUMS.new"
# from the pseudo changelogs, find the updated 3rd party repositories and add them # from the pseudo checksums, find the updated 3rd party repositories and add them
# to the updates report file # to the updates report file
# #
comm -1 -3 "${TMPDIR}/3rp-ChangeLog.old" \ comm -1 -3 "${TMPDIR}/3rp-CHECKSUMS.old" \
"${TMPDIR}/3rp-ChangeLog.new" \ "${TMPDIR}/3rp-CHECKSUMS.new" \
| sed -e "s/^SLACKPKGPLUS_//" -e "s/\[MD5\]//" \ | sed -e "s/^SLACKPKGPLUS_//" -e "s/\[MD5\]//" \
| cut -f1 -d" " | grep -f ${TMPDIR}/selected.3pr >> "${TMPDIR}/updated-repos.txt" | cut -f1 -d" " | grep -f ${TMPDIR}/selected.3pr >> "${TMPDIR}/updated-repos.txt"
@ -2260,7 +2273,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
rm -f ${TMPDIR}/waiting rm -f ${TMPDIR}/waiting
if $UPDATES ; then if $UPDATES ; then
echo "Updated packages are available since last check." echo "Slackpkg: Updated packages are available since last check." >&2
printf "\n [ %-24s ] [ %-20s ]\n" "Repository" "Status" printf "\n [ %-24s ] [ %-20s ]\n" "Repository" "Status"
@ -2276,7 +2289,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# #
cat ${TMPDIR}/updated-repos.txt > ~/.slackpkg/updated-repos.txt cat ${TMPDIR}/updated-repos.txt > ~/.slackpkg/updated-repos.txt
else else
echo "No updated packages since last check." echo "Slackpkg: No updated packages since last check."
# Suppress the "pkglist is older than 24h" notice # Suppress the "pkglist is older than 24h" notice
touch $WORKDIR/pkglist touch $WORKDIR/pkglist
fi fi