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.
-blacklist=<v> select blacklist type (on/off/legacy/new) [on=according configuration]
This is just a thought. Why even have a "new"? You have the way it currently works (new) and you have legacy. Remove the legacy and new from -blacklist=<v>.
For Blacklist options add
-legacy enable legacy blacklist system
-nolegacy enable legacy blacklist system
For General configuration override add:
-legacy=<v> set LEGACYBL=<v> (on/off)
Another thought, do we still need the legacy blacklist system. Aside from when you first implemented it, I have not encountered a situation that needed it. Of course there could still be situations that still need it. Be interesting to find out how many slackpkg+ users are using this.
I forgot to reply.
new blacklist system do not work fine with 3th party repository; also some slackpkg users did not like the new system (legacy blacklist is less predictable but more flexible), so I chosen to give the user an opportunity to continue using legacy blacklist. I add that greylist and blacklist in past used the same syntax; I leave untouched greylist syntax, and to remove ambiguity I added legacy blacklist system.
Personally I don't use blacklist; just I like greylist.
I'm thinking about to review configuration file a lot; so I think I may collapse USEBL and LEGACYBL in a new single setting.
That is the reason about I need a name for non-legacy blacklist
I download the revised slackpkgplus.sh. Here is the result. (USEBL=on, LEGACYBL=off in slackpkgplus.conf)
Code:
# slackpkg -dialog=off download kernel
Looking for kernel in package list. Please wait... DONE
kernel-firmware-20220808_e6857b6-noarch-1.txz
kernel-generic-5.18.16-x86_64-1.txz
kernel-headers-5.18.16-x86-1.txz
kernel-huge-5.18.16-x86_64-1.txz
kernel-modules-5.18.16-x86_64-1.txz
kernel-source-5.18.16-noarch-1.txz
Total package(s): 6
Do you wish to download selected packages (Y/n)?
Code:
# slackpkg -dialog=off download kernel -blacklist=legacy
Looking for kernel in package list. Please wait... DONE
kernel-firmware-20220808_e6857b6-noarch-1.txz
kernel-headers-5.18.16-x86-1.txz
Total package(s): 2
Do you wish to download selected packages (Y/n)?
By the way, there is a bug in slackpkg with "-dialog=', at least I believe it a bug since I have never seen that before. I posted in the slackpkg 2.84.0_beta1 - Testing Wanted thread, link is here
# slackpkg -dialog=off download kernel
Looking for kernel in package list. Please wait... DONE
kernel-firmware-20220810_ad5ae82-noarch-1.txz
kernel-headers-5.18.16-x86-1.txz
Total package(s): 2
Do you wish to download selected packages (Y/n)?
Last edited by chrisretusn; 08-12-2022 at 06:11 AM.
before commit the last release I want a feedback since I am not sure if I cat/want commit it.
it just add a way to help to support who ask for
this is the patch
Code:
# DEBUG=2 slackpkg upgrade-all
(I may change DEBUG=2 with TRACE=1 or some other things)
It will create /tmp/slackpkg.XXXXXX.tar.gz
it contains the current /tmp/slackpkg.XXXXXX with a lot of data added
* output of slackpkg+ (set -x starting from plugin loading)
* list of /var/log/packages/ before and after run
* list og /var/lib/workdir before and after run
* ps -ef
* full slackpkg row running
* full /etc/slackpkg directory
* output of env
* release of slackpkg+
* the install.log
* if slackpkg is running with >slackpkg.trace, that file
do you think it may contains too many personal data? (I destroy it after analysis if someone sent via mail, but if someone upload it on internet it is public)
Code:
--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -3,6 +3,36 @@
# Thanks to AlienBob and phenixia2003 (on LQ) for contributing
# A special thanks to all packagers that make slackpkg+ useful
+export PS4='+[$EPOCHREALTIME] ${LINENO}> \011${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
+XTRACE="+x"
+if [[ "$SHELLOPTS" =~ xtrace ]];then
+ XTRACEFD=${XTRACEFD:-2}
+ BASH_XTRACEFD=$XTRACEFD
+ XTRACE="-x"
+fi
+if [ "$DEBUG" == "2" ];then
+ date > $TMPDIR/start-date
+ echo "Start slackpkg+ trace" >$TMPDIR/xtrace
+ exec > >(tee -ia $TMPDIR/xtrace)
+ exec 2> >(tee -ia $TMPDIR/xtrace >& 2)
+ if [ -z "$XTRACEFD" ];then
+ exec {XTRACEFD}>>$TMPDIR/xtrace
+ BASH_XTRACEFD=$XTRACEFD
+ XTRACE="-x"
+ fi
+ set -x
+ ls -ltr --full-time /var/log/packages/ > $TMPDIR/packages-pre
+ ls -ltr --full-time $WORKDIR/ > $TMPDIR/workdir-start
+ ps -ef > $TMPDIR/ps-ef
+ cat /proc/$$/cmdline > $TMPDIR/proc-cmdline
+ cp -a $CONF/ $TMPDIR
+ env > $TMPDIR/env
+ echo "VERSION: $VERSION" > $TMPDIR/ver
+ ls -l --full-time /usr/libexec/slackpkg/functions.d/slackpkgplus.sh >> $TMPDIR/ver
+ md5sum /usr/libexec/slackpkg/functions.d/slackpkgplus.sh >> $TMPDIR/ver
+fi
+
+
declare -A MIRRORPLUS
declare -A SBO
declare -A NOTIFYMSG
@@ -23,6 +53,7 @@ if [ -e $CONF/slackpkgplus.conf ];then
EXTALLOW32BIT=$ALLOW32BIT
EXTSLACKPKGPLUS=$SLACKPKGPLUS
EXTVERBOSE=$VERBOSE
+ EXTDEBUG=$DEBUG
EXTUSEBL=$USEBL
EXTWGETOPTS=$WGETOPTS
EXTDOWNLOADCMD=$DOWNLOADCMD
@@ -66,6 +97,7 @@ if [ -e $CONF/slackpkgplus.conf ];then
ALLOW32BIT=${EXTALLOW32BIT:-$ALLOW32BIT}
SLACKPKGPLUS=${EXTSLACKPKGPLUS:-$SLACKPKGPLUS}
VERBOSE=${EXTVERBOSE:-$VERBOSE}
+ DEBUG=${EXTDEBUG:-$DEBUG}
USEBL=${EXTUSEBL:-$USEBL}
WGETOPTS=${EXTWGETOPTS:-$WGETOPTS}
DOWNLOADCMD=${EXTDOWNLOADCMD:-$DOWNLOADCMD}
@@ -88,7 +120,9 @@ if [ -e $CONF/slackpkgplus.conf ];then
SLAKFINDER_MAXRES=$EXTSLAKFINDER
SLAKFINDER=on
fi
+fi
+if [ "$SLACKPKGPLUS" = "on" ];then
if [ "$EXTSEARCH_DESCRIPTION" == "off" ] || [ "$EXTSEARCH_DESCRIPTION" == "0" ];then
SEARCH_DESCRIPTION=off
elif [[ "$EXTSEARCH_DESCRIPTION" =~ ^[0-9] ]];then
@@ -103,9 +137,7 @@ if [ -e $CONF/slackpkgplus.conf ];then
if [ "$ENABLENOTIFY" = "on" ] && [ -e $CONF/notifymsg.conf ];then
. $CONF/notifymsg.conf
fi
-fi
-if [ "$SLACKPKGPLUS" = "on" ];then
##### ===== BLACKLIST FUNCTIONS === #####
@@ -161,10 +193,12 @@ if [ "$SLACKPKGPLUS" = "on" ];then
##### ===== BLACKLIST FUNCTIONS === #####
# Patching makelist() original function to accept pkglist-pre
+ set +x
eval "$(type makelist | sed -e $'1d;2c\\\nmakelist()\n' \
-e "/in package list/s/tr -d '\\\\\\\\'/tr -d '\\\\\\\\*'/" \
-e 's,cat ${WORKDIR}/pkglist > ${TMPDIR}/pkglist,cat $TMPDIR/pkglist-pre ${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist,' \
)"
+ set $XTRACE
# Adds the pattern given by $(1) into the internal blacklist
# ${TMPDIR}/blacklist.slackpkgplus
@@ -276,10 +310,36 @@ if [ "$SLACKPKGPLUS" = "on" ];then
[ ! -e $WORKDIR/pkglist ]&&touch $WORKDIR/pkglist
[ ! -e $WORKDIR/CHECKSUMS.md5 ]&&touch $WORKDIR/CHECKSUMS.md5
echo
- rm -f /var/lock/slackpkg.$$
if [ $VERBOSE -lt 3 ] && [ -z "$DEBUG" ];then
rm -rf $TMPDIR
fi
+ if [ "$DEBUG" == "2" ];then
+ echo $retval > $TMPDIR/retval
+ ls -ltr --full-time $WORKDIR/ > $TMPDIR/workdir-end
+ ls -ltr --full-time /var/log/packages/ > $TMPDIR/packages-post
+ ls -ltr --full-time /var/log/removed_packages/ > $TMPDIR/removed_packages
+ cp -p $WORKDIR/install.log $TMPDIR/install.log
+ [ /tmp/slackpkg.trace -nt /var/lock/slackpkg.$$ ]&&cp -p /tmp/slackpkg.trace $TMPDIR
+ [ slackpkg.trace -nt /var/lock/slackpkg.$$ ]&&cp -p slackpkg.trace $TMPDIR
+ cd $TMPDIR
+ if [ $? -ne 0 ];then
+ rm -f /var/lock/slackpkg.$$
+ exit 1
+ fi
+ ls -ltra >tmpdir.list
+ for fl in *.TXT *.gz CHECKSUMS.md5-* *.bz2;do
+ > $fl
+ done
+ cp -p $WORKDIR/pkglist $TMPDIR/pkglist-orig
+ date > $TMPDIR/end-date
+ tar czf $TMPDIR.tar.gz $TMPDIR >/dev/null 2>&1
+ echo
+ echo "+---------------------------------------------------------------------------------+"
+ echo "Please send $TMPDIR.tar.gz, output and informations to obtain support."
+ echo "NOTE: it may contains personal datas; inspect it before publish it!"
+ echo "+---------------------------------------------------------------------------------+"
+ fi
+ rm -f /var/lock/slackpkg.$$
exit $retval
} # END function cleanup()
@@ -595,7 +655,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then
##### ====== CORE FUNCTION ====== ######
# Extends getpkg() original function
# (rename getpkg -> getpkg_old, then redefine getpkg to call it)
+ set +x
eval "$(type getpkg | sed -e $'1d;2c\\\ngetpkg_old()\n' -e 's/Upgrading /Upgrading $5 => [$4]:/' -e 's/Installing /Installing [$4]:/' -e 's/nPackage/tPackage/g')"
+ set $XTRACE
function getpkg(){
local c
local q
@@ -1970,7 +2032,10 @@ if [ "$SLACKPKGPLUS" = "on" ];then
#### ===== OTHER ====== ######
function debug(){
- echo "DEBUG $(date +%H:%M:%S.%N) (${BASH_LINENO[*]}): $@" >&2
+ set +x
+ [ "$DEBUG" == "1" ]&&echo "DEBUG $(date +%H:%M:%S.%N) (${BASH_LINENO[*]}): $@" >&2
+ [ "$DEBUG" == "2" ]&&echo "DEBUG $(date +%H:%M:%S.%N) (${BASH_LINENO[*]}): $@" >&$BASH_XTRACEFD
+ set $XTRACE
} # END function debug()
function updatedeps(){
@@ -2233,8 +2298,8 @@ For details see 'man slackpkgplus.conf'"
fi
# 07. slackpkg+ version
- SPKGPLUS_VERSION="1.9.d"
- SPKGBUILD=1660151504
+ SPKGPLUS_VERSION="1.9.e"
+ SPKGBUILD=1660316417
VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION-$SPKGBUILD"
# 09. Be sure upgrade 14.2 to 15 does not delete /usr/bin/vi
diff --git a/src/zchangelog.sh b/src/zchangelog.sh
index de8598b..7f45396 100755
--- a/src/zchangelog.sh
+++ b/src/zchangelog.sh
@@ -31,8 +31,10 @@
if [ "$PLUGIN_ZCHANGELOG" == "enable" ];then
+set -x
test -n "$(declare -f cleanup)" # || return
eval "${_/cleanup/cleanup_orig}"
+set ${XTRACE:-+x}
function pkglistdiff (){
diff $WORKDIR/pkglist.copy $WORKDIR/pkglist|grep -v " SBO_"|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.