From b38f92681d3acd242c2e5b0e37d353d4e2a683c2 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Oct 2021 19:30:42 +0000 Subject: Mon Oct 25 19:30:42 UTC 2021 ap/slackpkg-15.0.8-noarch-1.txz: Upgraded. Author: piterpunk To make it easier to do an unattended slackpkg update/upgrade process, this commit provides different exit codes for many situations: 0 Successful slackpkg execution. 1 Something wrong happened. 20 No package found to be downloaded, installed, reinstalled, upgraded, or removed. 50 Slackpkg itself was upgraded and you need to re-run it. 100 There are pending updates. Code and the main manpage are updated accordingly. In addition, this commit also: - removes the ChangeLog.txt in doinst.sh, so the needed 'slackpkg update' after Slackpkg upgrade won't say it's all OK and doesn't need to redo the package lists - removes AUTHORS from manpage. Nowadays there is code from many people in Slackpkg and it seems a bit unfair to have only my and Evaldo's name listed there. Signed-off-by: Robby Workman d/meson-0.60.0-x86_64-1.txz: Upgraded. l/ffmpeg-4.4.1-x86_64-1.txz: Upgraded. l/imagemagick-7.1.0_11-x86_64-1.txz: Upgraded. l/libcap-2.60-x86_64-1.txz: Upgraded. l/libsoup-2.74.1-x86_64-1.txz: Upgraded. l/sip-4.19.25-x86_64-3.txz: Rebuilt. Drop the Qt4 modules. Thanks to gmgf. n/dhcpcd-9.4.1-x86_64-1.txz: Upgraded. testing/packages/linux-5.14.x/kernel-generic-5.14.14-x86_64-3.txz: Rebuilt. testing/packages/linux-5.14.x/kernel-headers-5.14.14-x86-3.txz: Rebuilt. testing/packages/linux-5.14.x/kernel-huge-5.14.14-x86_64-3.txz: Rebuilt. testing/packages/linux-5.14.x/kernel-modules-5.14.14-x86_64-3.txz: Rebuilt. testing/packages/linux-5.14.x/kernel-source-5.14.14-noarch-3.txz: Rebuilt. Let's enable SCHED_AUTOGROUP, which should improve desktop latency under a heavy CPU load while being mostly inert on servers. It may be disabled at boot time with a "noautogroup" kernel parameter, or at runtime like this: echo 0 > /proc/sys/kernel/sched_autogroup_enabled Thanks to gbschenkel. SCHED_AUTOGROUP n -> y --- source/ap/slackpkg/doinst.sh | 1 + source/ap/slackpkg/files/ChangeLog | 5 +++++ source/ap/slackpkg/files/core-functions.sh | 2 +- source/ap/slackpkg/files/slackpkg | 13 +++++++++++-- source/ap/slackpkg/files/slackpkg.8 | 24 +++++++++++++++--------- source/ap/slackpkg/slackpkg.SlackBuild | 2 +- 6 files changed, 34 insertions(+), 13 deletions(-) (limited to 'source/ap/slackpkg') diff --git a/source/ap/slackpkg/doinst.sh b/source/ap/slackpkg/doinst.sh index 02790a48..77264140 100644 --- a/source/ap/slackpkg/doinst.sh +++ b/source/ap/slackpkg/doinst.sh @@ -39,5 +39,6 @@ copy_mirror_file config etc/slackpkg/mirrors.new config etc/slackpkg/slackpkg.conf.new config etc/slackpkg/blacklist.new +rm -f var/lib/slackpkg/ChangeLog.txt rm -f var/lib/slackpkg/pkglist rm -f var/lib/slackpkg/CHECKSUMS.md5* diff --git a/source/ap/slackpkg/files/ChangeLog b/source/ap/slackpkg/files/ChangeLog index 8f875390..d61aa208 100644 --- a/source/ap/slackpkg/files/ChangeLog +++ b/source/ap/slackpkg/files/ChangeLog @@ -1,3 +1,8 @@ +Sun Oct 24 19:44:21 CDT 2021 +--------------- + - Release 15.0.8 + - New exit status for different situations (Piter PUNK) + Mon Aug 16 02:14:02 UTC 2021 --------------- - Release 15.0.7 diff --git a/source/ap/slackpkg/files/core-functions.sh b/source/ap/slackpkg/files/core-functions.sh index 1a506277..5969ffcc 100644 --- a/source/ap/slackpkg/files/core-functions.sh +++ b/source/ap/slackpkg/files/core-functions.sh @@ -7,7 +7,7 @@ # Clean-up tmp and lock files # function cleanup() { - local retval=${PENDING_UPDATES:-0} + local retval=${EXIT_CODE:-0} [ "$SPINNING" = "off" ] || tput cnorm if [ -e $TMPDIR/error.log ]; then retval=1 diff --git a/source/ap/slackpkg/files/slackpkg b/source/ap/slackpkg/files/slackpkg index f606574a..de02d051 100644 --- a/source/ap/slackpkg/files/slackpkg +++ b/source/ap/slackpkg/files/slackpkg @@ -332,7 +332,7 @@ case "$CMD" in echo "Slackpkg: No updated packages since last check." else echo "Slackpkg: Updated packages are available since last check." >&2 - PENDING_UPDATES=1 + EXIT_CODE=100 fi ;; show-changelog) @@ -368,6 +368,7 @@ case "$CMD" in echo -e "No packages match the pattern for install. Try:" echo -e "\n\t$0 reinstall|upgrade $2\n" POSTINST=off + EXIT_CODE=20 fi ;; reinstall) @@ -379,6 +380,7 @@ case "$CMD" in echo -e "No packages match the pattern for reinstall. Try:" echo -e "\n\t$0 install|upgrade $2\n" POSTINST=off + EXIT_CODE=20 fi ;; upgrade) @@ -391,6 +393,7 @@ case "$CMD" in echo -e "No packages match the pattern for upgrade. Try:" echo -e "\n\t$0 install|reinstall $2\n" POSTINST=off + EXIT_CODE=20 fi ;; download) @@ -404,12 +407,14 @@ case "$CMD" in else echo -e "No packages match the pattern for download." POSTINST=off + EXIT_CODE=20 fi ;; remove) makelist $INPUTLIST if [ "$LIST" = "" ]; then echo -e "The file(s) $INPUTLIST can't be removed - package not installed.\n" + EXIT_CODE=20 cleanup fi showlist "$LIST" $CMD @@ -423,6 +428,7 @@ case "$CMD" in else echo -e "No packages match the pattern for clean-system\n" POSTINST=off + EXIT_CODE=20 fi ;; upgrade-all) @@ -432,6 +438,7 @@ case "$CMD" in echo -e "No packages match the pattern for upgrade. Try:" echo -e "\n\t$0 install|reinstall $2\n" POSTINST=off + EXIT_CODE=20 else showlist "$LIST" upgrade if [ "$DOWNLOAD_ALL" = "on" ]; then @@ -447,8 +454,9 @@ case "$CMD" in if [ "$FOUND" != "" ]; then getpkg $FOUND upgradepkg Upgrading echo -e "slackpkg was upgraded - you will need start the upgrade process again...\n" + EXIT_CODE=50 cleanup - exit 0 + exit ${EXIT_CODE} fi for i in pkgtools aaa_glibc-solibs glibc-solibs aaa_libraries aaa_elflibs readline sed; do FOUND="" @@ -466,6 +474,7 @@ case "$CMD" in echo -e "No packages match the pattern for install. Try:" echo -e "\n\t$0 upgrade|reinstall $2\n" POSTINST=off + EXIT_CODE=20 else showlist "$LIST" install install_pkg diff --git a/source/ap/slackpkg/files/slackpkg.8 b/source/ap/slackpkg/files/slackpkg.8 index ab36202e..46acc277 100644 --- a/source/ap/slackpkg/files/slackpkg.8 +++ b/source/ap/slackpkg/files/slackpkg.8 @@ -1,4 +1,4 @@ -.TH SLACKPKG 8 "March 12, 2021" slackpkg-15.0.1 "" +.TH SLACKPKG 8 "Oct 8, 2021" slackpkg-15.0.8 "" .SH NAME .B slackpkg \- Automated tool for managing Slackware Linux packages @@ -305,6 +305,20 @@ If you happen to be looking for a filename-with-space, you are safe to use the left-most part up to the space (in that the right-most part after the space will be ignored anyway (at best) or yield noise (at worst)). +.SH EXIT STATUS +.P +.IP "\fB0\fP" 5 +Successful slackpkg execution. +.IP "\fB1\fP" 5 +Something wrong happened. +.IP "\fB20\fP" 5 +No package found to be downloaded, installed, reinstalled, upgraded, or +removed. +.IP "\fB50\fP" 5 +Slackpkg itself was upgraded and you need to re-run it. +.IP "\fB100\fP" 5 +There are pending updates. + .SH FILES .TP 5 .B /etc/slackpkg/mirrors @@ -333,11 +347,3 @@ ChangeLog.txt, list of files, etcetera... .BR explodepkg (8), .BR makepkg (8), .BR pkgtool (8). - -.SH AUTHORS -.TP 5 -Piter PUNK aka Roberto F Batista - -.TP 5 -Evaldo Gardenali aka UdontKnow - diff --git a/source/ap/slackpkg/slackpkg.SlackBuild b/source/ap/slackpkg/slackpkg.SlackBuild index 76c0347f..0cc9b56d 100755 --- a/source/ap/slackpkg/slackpkg.SlackBuild +++ b/source/ap/slackpkg/slackpkg.SlackBuild @@ -23,7 +23,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=slackpkg -VERSION=${VERSION:-15.0.7} +VERSION=${VERSION:-15.0.8} ARCH="noarch" BUILD=${BUILD:-1} -- cgit v1.2.3