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.
Ok, this is the reason. However I've to thank you since I learned a new thing: $'s/\r//' is better than 's/^M//'
Quote:
Originally Posted by rworkman
I was referring to the replacement of the spinnythingy :-)
I'm sorry (I did read from smartphone)
Quote:
Originally Posted by denydias
Now I have a question about SBOURL. Default one is https://www.slackbuilds.org/slackbuilds/14.2/. Is there a way so it can use ponce's -current SBo fork? It's url is git://github.com/Ponce/slackbuilds.git@current.
Unfortunately seems that Ponce does not add SLACKBUILDS.TXT.gz that is required
Quote:
Originally Posted by chrisretusn
Works as advertised. Neat feature. Suggestion, add a SBOOFF variable to turn on SBOURL. Typing 'SBOOFF=on slackpkg search ffmpeg' it a bit easier to remember than 'SBOURL=https://www.slackbuilds.org/slackbuilds/14.2/ slackpkg search ffmpeg'.
You does not need that. Just put 'SBOURL=https://www.slackbuilds.org/slackbuilds/14.2/' in slackpkgplus.conf then run slackpkg update
Quote:
Originally Posted by chrisretusn
Not really sure what you mean by package group.
ap , a , d , xap ... are package groups.
I hope I haven't forgotten anything.
For ffmpeg and related search-output I have to reread the posts , but currently is midnight
This is zlookkernel.sh zlookkernel.sh.txt
Put it in /usr/libexec/slackpkg/functions.d (stripped of txt extention) and where the kernel will be updated you will obtain an help to rebuild lilo/elilo/initrd.
It is optional an in test. Not really a part of slackpkg+
I understand that the (masked) label refers to packages that are not candidates to be installed as an upgrade because repository priorities forbid them to do so.
In my case, I have "PKGS_PRIORITY=( restricted ktown )" in place, so even though slackware64's ffmpeg is newer (4.2.2) than the one I've currently installed (4.2.1), the prior will not be installed as the later is the one "masking" it.
The word "masked" explains very little of this, as well as the place where it's applied to. Is there a better wording for this? Or maybe:
Slackpkg is not masking the restricted package for ffmpeg, it is installed and will be upgraded when a new version is made available in the restricted repository. Those other packages are "masked" (or hidden) from being acted upon by slackpkg.
Code:
The list below shows all packages with name matching "fmpeg-4".
[ Status ] [ Repository ] [ Package ]
installed restricted ffmpeg-4.2.1-x86_64-1alien
uninstalled(masked) extra ffmpeg-4.2.2-x86_64-1_alsa
uninstalled(masked) slackware64 ffmpeg-4.2.2-x86_64-1
slackpkgplus.conf:
PKGS_PRIORITY=( nonslack slackpkgplus multilib ktown testing restricted slackware64:id3lib alienbob )
REPOPLUS=( nonslack slackpkgplus multilib ktown restricted alienbob )
I see that the ffmpeg package from restricted is installed will be the package that will be acted upon by slackpkg when a newer version of that packages is available in restricted. That list tells me my settings in slackpkgplus.conf are good for what I want.
I my previous post I was thinking I should see another ffmpeg in the list, the one in the alienbob repository:
Code:
The list below shows all packages with name matching "fmpeg-4".
[ Status ] [ Repository ] [ Package ]
uninstalled(masked) alienbob ffmpeg-4.2.1-x86_64-1alien
installed restricted ffmpeg-4.2.1-x86_64-1alien
uninstalled(masked) extra ffmpeg-4.2.2-x86_64-1_alsa
uninstalled(masked) slackware64 ffmpeg-4.2.2-x86_64-1
There is a condition for that bug.
If you install the non-Eric ffmpeg you see all ok. If you install alienbob or restricted ffmpeg you have the bug.
I'm investigating
You does not need that. Just put 'SBOURL=https://www.slackbuilds.org/slackbuilds/14.2/' in slackpkgplus.conf then run slackpkg update
Hmm. Reread what I wrote above, my thinking cap was not screwed on very well.
My thinking was keep 'SBOURL=https://www.slackbuilds.org/slackbuilds/14.2/' enabled (uncommented) in slackpkgplus.conf. Add another variable e.g., 'SBOSHOW=on/off' to show/not show the "Also found in SBo:" list. The default would be "on", if "off", then it can be enabled via the CLI: 'SBOSHOW=on slackpkg search gnucash'
It's just an idea and not a big issue for me.
Quote:
You: slackpkg+ did not work properly when run as a package group instead single packages.
Me: Not really sure what you mean by package group.
You: ap , a , d , xap ... are package groups.
Ah.. yes.
It took some playing around by I think I have it figured out.
'slackpkg reinstall|install slackware64:d' for example.
There is a condition for that bug.
If you install the non-Eric ffmpeg you see all ok. If you install alienbob or restricted ffmpeg you have the bug.
I'm investigating
With an unchanged PKGS_PRIORITY, the now installed slackware64 version is missing.
With an unchanged PKGS_PRIORITY, the now installed slackware64 version is missing.
This may be correct since for the currently installed package "ffmpeg-4.2.2-x86_64-1" there is an upgrade available.
Unfortunately Eric chose to use the same tag for all his repositories, so duplicate names can happen and slackpkg can't know which is the installed package but only try to guess it. The complexity grows when the installed package with full name no longer is in the repository since there is an update available. In this case slackpkg+ can tell u in which repository is the new package but can't tell u in which repository was the original package.
This is the exact reason for which slackpkg+ does not show you the alienbob ffmpeg. And I don't know if I can fix it quickly.
Also I've an uncommited patch that replace the spinning with a progress system; also it supports TERSE.
I might be interested in that for upstream... hint hint :-)
I reread the post. I did not read your nick .
from slackpkgplus github:
git diff e48690319130149997d67f80b6c2a8313608c335 2993f0a512f343a96af8f0709b820286a950ada0 slackpkgplus.sh
in givepriority():
upgrade-all already know how many packages have to scan, so it can calculate the progress percentage
upgrade and install does not know it so I just print a counter.
Code:
if [ "$CMD" == "upgrade-all" ];then
if [ -z "$TOPROCESS" ];then
TOPROCESS=$(comm -1 -2 ${TMPDIR}/lpkg ${TMPDIR}/dpkg | comm -1 -2 - ${TMPDIR}/spkg|wc -l)
fi
let INPROGRESS++
printf "%3s%%\b\b\b\b" "$[$INPROGRESS*100/$TOPROCESS]"
else
let INPROGRESS++
printf "%4s\b\b\b\b" "$INPROGRESS"
fi
at the end of code (before return to core slackpkg), before start the application:
Code:
INPROGRESS=0
Also a slower operation is not to search packages but to prepare the list to show:
showlist()
Code:
q=$(echo $1|wc -w)
c=1
echo -n "Preparing list "
if [ "$2" = "upgrade" ]; then
Code:
else # other than 'upgrade'
for i in $1; do
printf "%10s\b\b\b\b\b\b\b\b\b\b" "[$c/$q]"
let c++
Also I added a counter in upgrade_pkg() and install_pkg() that know the selected packages:
Code:
q=$(echo $SHOWLIST|wc -w)
download packages:
Code:
c=1
for i in $SHOWLIST; do
echo -n "[$c/$q]"
let c++
install package:
Code:
c=1
for i in $SHOWLIST; do
...
REPOPOS=$(grep -m1 " $(echo $i|sed 's/\.t.z//') " $TMPDIR/pkglist|awk '{print $1}'|sed 's/SLACKPKGPLUS_//')
echo -n "[$c/$q]"
let c++
Should not difficult to port it on mainstream. Tell me if you need more.
the full diff:
Code:
diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh
index 053f8be..37746cd 100755
--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -292,20 +292,29 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# Overrides original upgrade_pkg(). Required by the notification mechanism.
function upgrade_pkg() {
local i
+ local q
+ local c
+ q=$(echo $SHOWLIST|wc -w)
if [ "$DOWNLOAD_ALL" = "on" ]; then
OLDDEL="$DELALL"
DELALL="off"
+ c=1
for i in $SHOWLIST; do
+ echo -n "[$c/$q]"
+ let c++
getpkg $i true
done
DELALL="$OLDDEL"
fi
ls -1 $ROOT/var/log/packages/ > $TMPDIR/tmplist
+ c=1
for i in $SHOWLIST; do
PKGFOUND=$(grep -m1 -e "^$(echo $i|rev|cut -f4- -d-|rev)-[^-]\+-[^-]\+-[^-]\+$" $TMPDIR/tmplist)
REPOPOS=$(grep -m1 " $(echo $i|sed 's/\.t.z//') " $TMPDIR/pkglist|awk '{print $1}'|sed 's/SLACKPKGPLUS_//')
+ echo -n "[$c/$q]"
+ let c++
getpkg $i upgradepkg Upgrading
if [ "$DOWNLOADONLY" != "on" ];then
if [ -e "$ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//')" ];then
@@ -322,21 +331,30 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# Overrides original install_pkg(). Required by the notification mechanism.
function install_pkg() {
local i
-
+ local q
+ local c
+
+ q=$(echo $SHOWLIST|wc -w)
if [ "$DOWNLOAD_ALL" = "on" ]; then
OLDDEL="$DELALL"
DELALL="off"
+ c=1
for i in $SHOWLIST; do
+ echo -n "[$c/$q]"
+ let c++
getpkg $i true
done
DELALL="$OLDDEL"
fi
+ c=1
for i in $SHOWLIST; do
INSTALL_T='installed: '
if [ -e $ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//') ];then
INSTALL_T='reinstalled:'
fi
REPOPOS=$(grep -m1 " $(echo $i|sed 's/\.t.z//') " $TMPDIR/pkglist|awk '{print $1}'|sed 's/SLACKPKGPLUS_//')
+ echo -n "[$c/$q]"
+ let c++
getpkg $i installpkg Installing
if [ "$DOWNLOADONLY" != "on" ];then
if [ -e "$ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//')" ];then
@@ -903,6 +921,17 @@ if [ "$SLACKPKGPLUS" = "on" ];then
unset LINEIDX
unset PKGINFOS
+ if [ "$CMD" == "upgrade-all" ];then
+ if [ -z "$TOPROCESS" ];then
+ TOPROCESS=$(comm -1 -2 ${TMPDIR}/lpkg ${TMPDIR}/dpkg | comm -1 -2 - ${TMPDIR}/spkg|wc -l)
+ fi
+ let INPROGRESS++
+ printf "%3s%%\b\b\b\b" "$[$INPROGRESS*100/$TOPROCESS]"
+ else
+ let INPROGRESS++
+ printf "%4s\b\b\b\b" "$INPROGRESS"
+ fi
+
AUTOP=no
if [[ "$CMD" == "upgrade" || "$CMD" == "upgrade-all" ]];then
(
@@ -944,7 +973,6 @@ if [ "$SLACKPKGPLUS" = "on" ];then
FULLNAME=$(echo "${PKGDATA[5]}.${PKGDATA[7]}")
fi
fi
-
for CPRIORITY in ${PRIORITY[@]} ; do
[ "$PKGDATA" ] && break
@@ -1344,10 +1372,14 @@ if [ "$SLACKPKGPLUS" = "on" ];then
>$TMPDIR/greylist
fi
rm -f $TMPDIR/dialog.tmp
-
+ q=$(echo $1|wc -w)
+ c=1
+ echo -n "Preparing list "
if [ "$2" = "upgrade" ]; then
ls -1 $ROOT/var/log/packages/ > $TMPDIR/tmplist
for i in $1; do
+ printf "%10s\b\b\b\b\b\b\b\b\b\b" "[$c/$q]"
+ let c++
TMPONOFF=$ONOFF
BASENAME=$(cutpkg $i)
PKGFOUND=$(grep -m1 -e "^${BASENAME}-[^-]\+-[^-]\+-[^-]\+$" $TMPDIR/tmplist)
@@ -1376,6 +1408,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
else # other than 'upgrade'
for i in $1; do
+ printf "%10s\b\b\b\b\b\b\b\b\b\b" "[$c/$q]"
+ let c++
TMPONOFF=$ONOFF
REPOPOS=$(grep -m1 " $(echo $i|sed 's/\.t.z//') " $TMPDIR/pkglist|awk '{print $1}'|sed 's/SLACKPKGPLUS_//')
( echo $i;grep -m1 " $(echo $i|sed 's/\.t.z//') " $TMPDIR/pkglist ) | grep -q -Ew -f $TMPDIR/greylist && TMPONOFF="off"
@@ -1575,6 +1609,10 @@ if [ "$SLACKPKGPLUS" = "on" ];then
### =========================== MAIN ============================ ###
+
+ SPINNING=off
+ #if [ "$CMD" == "upgrade-all" ];then SPINNING=off ;fi
+
export LC_ALL=C
if [ "$DOWNLOADONLY" == "on" ];then
@@ -2129,3 +2167,6 @@ if [ "$SLACKPKGPLUS" = "on" ];then
fi # "$CMD" == "check-updates"
fi
+
+INPROGRESS=0
+
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.