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.
zerouno and phenexia2003, thank you both for the amazing and improving work on slackpkg+ which you are collaborating on. Please let us know when a beta is available that you want tested and where to get (git) it. I'm willing to help. BrianA_MN
Version 1.6.1p1 - 16/Jan/2015
- Bugfix: greylist did not work properly
- Fixed search that may fails to detect repository in certain conditions.
- Fixed a bug in slackpkg upgrade when used with $ROOT
The patch slackpkg+-enhanced-pkg-arg-handling.diff.txt introduces a regression when PKGS_PRIORITY is set when applied to slackpkg+ 1.7.a3 (tested before bashism patch to avoid conflicts)
# ls -l /var/log/packages/kde-baseapps*
/var/log/packages/kde-baseapps-15.12.0-i486-2alien
Before patch.
Code:
# slackpkg -batch=on -dialog=off -default_answer=no upgrade kde-baseapps
Checking local integrity... DONE
Looking for kde-baseapps in package list. Please wait... DONE
No packages match the pattern for upgrade. Try:
/usr/sbin/slackpkg install|reinstall
after patch:
Code:
# slackpkg -batch=on -dialog=off -default_answer=no upgrade kde-baseapps
Checking local integrity... DONE
Looking for kde-baseapps in package list. Please wait... DONE
[ Repository ] [ Package ]
slackware kde-baseapps-4.14.3-i586-2.txz
Total package(s): 1
Do you wish to upgrade selected packages (Y/n)? n
zerouno, I've subscribed to this thread to watch progress you are making. If you move testing to another thread please post note here of the new thread. I'll test new version when you indicate in this thread ""Testers needed" for new slackpkg+, just to make sure there isn't confusion with your statement "I need to test" which to me means that you don't want other testers just yet and you're still working on bugs. Thanks again and I'm able to help when you are ready. BrianA_MN
The patch slackpkg+-enhanced-pkg-arg-handling.diff.txt introduces a regression when PKGS_PRIORITY is set when applied to slackpkg+ 1.7.a3 (tested before bashism patch to avoid conflicts)
Code:
PKGS_PRIORITY=( ktown )
Code:
# ls -l /var/log/packages/kde-baseapps*
/var/log/packages/kde-baseapps-15.12.0-i486-2alien
Before patch.
Code:
# slackpkg -batch=on -dialog=off -default_answer=no upgrade kde-baseapps
Checking local integrity... DONE
Looking for kde-baseapps in package list. Please wait... DONE
No packages match the pattern for upgrade. Try:
/usr/sbin/slackpkg install|reinstall
after patch:
Code:
# slackpkg -batch=on -dialog=off -default_answer=no upgrade kde-baseapps
Checking local integrity... DONE
Looking for kde-baseapps in package list. Please wait... DONE
[ Repository ] [ Package ]
slackware kde-baseapps-4.14.3-i586-2.txz
Total package(s): 1
Do you wish to upgrade selected packages (Y/n)? n
--- slackpkgplus.sh.git.1.7.a5 2016-01-16 20:15:28.603145086 +0100
+++ slackpkgplus.sh 2016-01-16 20:15:28.603145086 +0100
@@ -1363,6 +1363,18 @@
NEWINPUTLIST=""
PRIORITYLIST=""
+ # The priorities in PRIORITYLIST_SX :
+ # * are *all* of kind ".*:<pattern>"
+ # * are defined to handle cases where a pattern, with version and/or a build number
+ # but without any repository, is passed to install|upgrade (ex: install basename-1.0.1)
+ #
+ # Since there's no way to distinguish patterns with version/build number to other, priorities
+ # of kind ".*:<pattern>" are also generated for patterns without version/build number. As a
+ # consequence, these priorities could interfer with other defined priorities (1). To prevent
+ # this, these priorities are handled after all other priorities.
+ #
+ PRIORITYLIST_SX=""
+
for pref in $INPUTLIST ; do
PRIORITY_FILTER_RULE=""
@@ -1506,7 +1518,7 @@
AUTOPRIORITY=" $AUTOPRIORITY -e $package "
if [ "$CMD" == "install" ] || [ "$CMD" == "upgrade" ] ; then
- PRIORITYLIST=( ${PRIORITYLIST[*]} ".*:${package}" )
+ PRIORITYLIST_SX=( ${PRIORITYLIST_SX[*]} ".*:${package}" )
fi
fi
@@ -1523,8 +1535,11 @@
INPUTLIST=$NEWINPUTLIST
- if [ ! -z "$PRIORITYLIST" ] ; then
- NEWPRIORITY=( ${PRIORITYLIST[*]} ${PRIORITY[*]} )
+ if [ ! -z "$PRIORITYLIST" ] || [ ! -z "$PRIORITYLIST_SX" ] ; then
+ # PRIORITYLIST_SX includes priority of kind .*:pattern. This kind of priority must be handled
+ # after all others, and are, by consequence, added at the end.
+ #
+ NEWPRIORITY=( ${PRIORITYLIST[*]} ${PRIORITY[*]} ${PRIORITYLIST_SX[*]} )
unset PRIORITY
# -- This is to avoid duplicated priority rules in the variable
There are no other official threads for slackpkg+ (just some for specific bugs reported by users, threads dead after solution; if you refeers to that topic, I saw it just now)
Quote:
Originally Posted by bamunds
just to make sure there isn't confusion with your statement "I need to test" which to me means that you don't want other testers just yet and you're still working on bugs.
No, it means that I have many confusion on my english grammar .
Should be something as "I need testing (i.e. tester) for...".
To make 1.7 lts I must to find a good way to backport patches from 1.8+ to 1.7; So I'm trying it backporting some patch from 1.7 to 1.6 (even if it won't be an lts). For this goal I made a branch "stable" on github that contains the patches to backport to master. The package 1.6.1p1 is the txz of that branch.
Regards a beta version I have to apply the latest patch from phenixia2003 and the improved search, and stabilizing something. After that should ready for beta.
--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -852,7 +852,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# R1:P is before R2:P in pkglist, and the user issue install|upgrade R2:P, slackpkg
# will install R1:P instead.
#
- sed -i --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist
+ mv ${TMPDIR}/pkglist ${TMPDIR}/pkglist.old
+ sed --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist.old > ${TMPDIR}/pkglist
(( PRIORITYIDX++ ))
fi
done
before
Code:
# time slackpkg -batch=on -dialog=off -default_answer=no upgrade ktown
Checking local integrity... DONE
Looking for SLACKPKGPLUS_ktown in package list. Please wait... DONE
No packages match the pattern for upgrade. Try:
/usr/sbin/slackpkg install|reinstall
real 0m25.989s
user 0m7.765s
sys 0m15.278s
after
Code:
# time slackpkg -batch=on -dialog=off -default_answer=no upgrade ktown
Checking local integrity... DONE
Looking for SLACKPKGPLUS_ktown in package list. Please wait... DONE
No packages match the pattern for upgrade. Try:
/usr/sbin/slackpkg install|reinstall
real 0m13.944s
user 0m6.306s
sys 0m4.397s
--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -852,7 +852,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# R1:P is before R2:P in pkglist, and the user issue install|upgrade R2:P, slackpkg
# will install R1:P instead.
#
- sed -i --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist
+ mv ${TMPDIR}/pkglist ${TMPDIR}/pkglist.old
+ sed --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist.old > ${TMPDIR}/pkglist
(( PRIORITYIDX++ ))
fi
done
before
Code:
# time slackpkg -batch=on -dialog=off -default_answer=no upgrade ktown
Checking local integrity... DONE
Looking for SLACKPKGPLUS_ktown in package list. Please wait... DONE
No packages match the pattern for upgrade. Try:
/usr/sbin/slackpkg install|reinstall
real 0m25.989s
user 0m7.765s
sys 0m15.278s
after
Code:
# time slackpkg -batch=on -dialog=off -default_answer=no upgrade ktown
Checking local integrity... DONE
Looking for SLACKPKGPLUS_ktown in package list. Please wait... DONE
No packages match the pattern for upgrade. Try:
/usr/sbin/slackpkg install|reinstall
real 0m13.944s
user 0m6.306s
sys 0m4.397s
When there are updates, I see no difference.
1. upgrade-all:
Old code:
Code:
$ time slackpkg -dialog=off -batch=on -default_answer=no upgrade-all
Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE
[ Repository ] [ Package ]
<snip>
Total package(s): 312
Do you wish to upgrade selected packages (Y/n)? n
real 0m10.329s
user 0m11.021s
sys 0m2.233s
New code:
Code:
$ time slackpkg -dialog=off -batch=on -default_answer=no upgrade-all
Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE
[ Repository ] [ Package ]
<snip>
Total package(s): 312
Do you wish to upgrade selected packages (Y/n)? n
real 0m10.274s
user 0m10.896s
sys 0m2.241s
2. upgrade ktown :
Old code:
Code:
$ time slackpkg -dialog=off -batch=on -default_answer=no upgrade ktown
Checking local integrity... DONE
Looking for SLACKPKGPLUS_ktown in package list. Please wait... DONE
[ Repository ] [ Package ]
<snip>
Total package(s): 230
Do you wish to upgrade selected packages (Y/n)? n
real 0m7.683s
user 0m5.952s
sys 0m1.296s
New code:
Code:
$ time slackpkg -dialog=off -batch=on -default_answer=no upgrade ktown
Checking local integrity... DONE
Looking for SLACKPKGPLUS_ktown in package list. Please wait... DONE
[ Repository ] [ Package ]
<snip>
Total package(s): 230
Do you wish to upgrade selected packages (Y/n)? n
real 0m7.700s
user 0m5.917s
sys 0m1.393s
Should impact repositories in PKGS_PRIORITY when there is an huge pkglist (about 15.000 packages).
The sed -i command write a temporary file then copy it over the original. They are 2 write operation on disk that may take a lot with huge pkglist.
I tried to count the time in givepriority (date +S%N at start and the end of function) and I saw that in upgrade ktown a single cycle on my machine has about 60 millisec with sed -i and 30 millisec without it. When running slackpkg upgrade slackware the cycle has about 20millisec with and without it.
See the 'sys' results in my outputs.
With /tmp in tmpfs should be no impact.
on my host slackware64 with SSD and /tmp in tmpfs and pkglist with 2500 row, there is no difference.
I noticed that some slackpkg functions, which use the spinning, is overridden in slackpkg+. So I can rework this pull-request to revert back the lost spinning in these functions. Not sure that will not affect the performance, but spinning is working as a separated process.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.