SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is that what I am supposed to see? If so then something is definitely wrong here on my end. FYI, I like that listing a lot better than what I see.
My only download from the Internet is slackpkgplus, the rest are from "file:" so I guess being cached and not being cache are pretty much the same as for speed goes.
I know I am being a pest, but why is your output above prettier that my output, was that an edited output for clarity. I switched all of my repositories to https: and excluded my own repository. This is what I get on the second update:
slackpkg 15 introduce a new way to check if there are news on changelog.
Unfortunately this is incompatible with slackpkg prior 15.0, and unfortunately slackpkg+ have to work both with slackware current and slackware 14.2
So it use an ibrid way to check it.
My suggest is to use CACHEUPDATE=on in slackpkgplus.conf, so it will not really redownload all files any time.
I hope to find a solution to fix that saving the compatibility with slackware 14.2.
I'm not sure I understand completely. With the default settings, there are two issues that I can see:
1) `slackpkg update` always acts like there are updates, even when there's nothing to update.
Specifically, on every run (with VERBOSE=3) I see something like this:
Code:
Files //var/lib/slackpkg/CHECKSUMS.md5.asc and /tmp/slackpkg.9Nstx0/CHECKSUMS.md5.asc differ
But why should they differ if nothing changed? On the user end, the outcome is that unlike with regular slackpkg, I never see this prompt anymore:
Code:
No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)?
2) `slackpkg check-updates` pulls the whole ChangeLog
With the default slackpkg+ settings, `slackpkg check-updates` will download the entire ChangeLog from each repo to see if there are updates. That's pretty inefficient/slow, couldn't slackpkg+ just use the method of comparing cached vs upstream CHECKSUMS.md5.asc file on both 14.2 and -current? Or at a minimum, use that method if slackpkg-15 is detected?
Any chance to have slackpkg+ "check-updates" return 1 if there are updates? (to bring it inline with slackpkg-15.0):
Code:
Mon Feb 8 05:13:26 UTC 2021
[...]
ap/slackpkg-15.0-noarch-1.txz: Upgraded.
[...]
Another backwards-incompatibility warning: check-updates will now return 1 if
there are updates available - this will make it easier to use this feature
with cron (thanks to Peter Hyman).
ehm. I think that there is a bug in slackpkg. It seems to return 0 always.
Code:
# SLACKPKGPLUS=off slackpkg check-updates
Slackpkg: Updated packages are available since last check.
# echo $?
0
# SLACKPKGPLUS=off slackpkg check-updates
Slackpkg: No updated packages since last check.
# echo $?
0
When it will be fixed I may align slackpkg+ to the same.
That's odd, I tested slackpkg 15.0 a few days ago and it returned a 1 when there were updates. I'll wait until there are some updates and check it out.
slackpkg exits 1 only if there is an error, so verify if you had an error.
@rworkman
from the code:
the function checkchangelog() returns 1 or 0 as described. However this works internally.
the difference with slackpkg 2.8x is about the output:
slackpkg 2.8x:
No updated packages since last check. - in standard output
Updated packages are available since last check - in standard output
slackpkg 15:
Slackpkg: No updated packages since last check. - in standard output
Slackpkg: Updated packages are available since last check. - in standard error
description on git log:
Code:
* Modify check-updates to output need to update to stderr so cron
jobs will notify sysadmin.
ehm. I think that there is a bug in slackpkg. It seems to return 0 always.
Code:
# SLACKPKGPLUS=off slackpkg check-updates
Slackpkg: Updated packages are available since last check.
# echo $?
0
# SLACKPKGPLUS=off slackpkg check-updates
Slackpkg: No updated packages since last check.
# echo $?
0
In checkchangelog(), we have :
Code:
...
if diff --brief ${WORKDIR}/CHECKSUMS.md5.asc $TMPDIR/CHECKSUMS.md5.asc ; then
return 0
else
return 1
fi
}
checkchangelog returns 1 when the compared checksums are different. However, in usr/sbin/slackpkg, we have :
Code:
if checkchangelog 1>/dev/null 2>/dev/null ; then
echo "Slackpkg: No updated packages since last check."
else
echo "Slackpkg: Updated packages are available since last check." >&2
fi
The exit-code returned by checkchangelog is overriden by the exit-code of the statement 'echo "Slackpkg: Updated packages are available since last check'.
The fix for that seems simple: add an 'exit 1' after that echo. But in this case, cleanup() is not executed and slackpkg refuses to start on next run :
Code:
$ slackpkg check-updates
Another instance of slackpkg is running If this is not correct, you can remove /var/lock/slackpkg.* files and run slackpkg again.
Here is a proposed patch :
Code:
--- /media/sf_sandbox_tmp/TEST/slackpkg15/usr/libexec/slackpkg/core-functions.sh 2021-02-21 06:52:29.000000000 +0100
+++ /usr/libexec/slackpkg/core-functions.sh 2021-02-25 16:58:19.105228553 +0100
@@ -8,6 +8,11 @@
#
function cleanup() {
local retval=0
+
+ if [ "${CMD}" = "check-updates" ] && [ "${PENDING_UPDATES}" = "yes" ] ; then
+ retval=1
+ fi
+
[ "$SPINNING" = "off" ] || tput cnorm
if [ -e $TMPDIR/error.log ]; then
retval=1
@@ -1040,9 +1045,11 @@
Please check your mirror and try again."
cleanup
fi
+
if diff --brief ${WORKDIR}/CHECKSUMS.md5.asc $TMPDIR/CHECKSUMS.md5.asc ; then
return 0
else
+ PENDING_UPDATES=yes
return 1
fi
}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.