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.
This is useful when
1) I must do a distribution upgrade
2) I want trasform a non-full to a full installation
The idea is that
1) the install-new command just install packages added from latest stable
2) many files are presents in more than one package and in more than one repository
3) when I have two packages with different name in two different repositories, the upgrade of a package override the other that may be unwanted; for example when you install ktown5 you should uninstall kscreen becouse ktown5 has kscreen2; if you do not that, when slackware upgrade kde4 kscreen override kscreen2 even if it is in PKGS_PRIORITY. This script avoid it.
The script does
1) slackpkg install-new
2) slackpkg install all missing packages in PKGS_PRIORITY and patches and slackware repositories
3) slackpkg upgrade-all
4) slackpkg remove packages not in PKGS_PRIORITY or patches or slackware (so it remove extra and other REPOPLUS repository not in PKGS_PRIORITY)
5) check if packages installed at step 3 did some override some not opportune override
6) slackpkg clean-system
7) slackpkg new-config
I can add optionally the check of conflicts package installed previously; this take many time to run since has to test all packages, but it's the only way to repair a previous bad upgrade (tipically a large slackpkg upgrade as kde upgrade when there is ktown installed).
I wouldn't use it. I would feel a lot safer using one of the known to work documented methods (either following UPGRADE.TXT or http://docs.slackware.com/howtos:sla...:systemupgrade), after having taken notes about all third party packages that I have installed, databases and such.
Actually I am even more comfortable doing a fresh installation, then installing the new versions of the third party packages and checking that they work, copying my data, eventually moving only when everything works as expected in the new system.
IMHO too much automation hurts. I am afraid that if users less knowledgeable than you use it, you will receive more support requests than you can handle.
Last edited by Didier Spaier; 02-10-2016 at 11:59 AM.
feature to show the url of package and full filelist in slackpkg info.
What do you think?
Code:
# DETAILED_INFO=yes slackpkg info slackpkg+
PACKAGE NAME: slackpkg+-1.7.b2-noarch-1mt.txz
PACKAGE MIRROR: http://www.slakfinder.org/slackpkg+dev/
PACKAGE LOCATION: ./pkg
PACKAGE SIZE (compressed): 32 K
PACKAGE SIZE (uncompressed): 160 K
PACKAGE DESCRIPTION:
slackpkg+: slackpkg+ plugin for third-party repositories
slackpkg+:
slackpkg+: Slackpkg is a package manager for Slackware.
slackpkg+:
slackpkg+: Slackpkg+ is a plugin for slackpkg.
slackpkg+: It adds support for third-party repositories.
slackpkg+: You can install, upgrade and search from multiple repositories.
slackpkg+:
slackpkg+:
slackpkg+:
slackpkg+:
Package: slackpkg+-1.7.b2-noarch-1mt
Repository: slackpkgplus
Path: ./pkg/slackpkg+-1.7.b2-noarch-1mt.txz
Url: http://slakfinder.org/slackpkg+dev/pkg/slackpkg+-1.7.b2-noarch-1mt.txz
Code:
# DETAILED_INFO=filelist slackpkg info slackpkg+
PACKAGE NAME: slackpkg+-1.7.b2-noarch-1mt.txz
PACKAGE MIRROR: http://www.slakfinder.org/slackpkg+dev/
PACKAGE LOCATION: ./pkg
PACKAGE SIZE (compressed): 32 K
PACKAGE SIZE (uncompressed): 160 K
PACKAGE DESCRIPTION:
slackpkg+: slackpkg+ plugin for third-party repositories
slackpkg+:
slackpkg+: Slackpkg is a package manager for Slackware.
slackpkg+:
slackpkg+: Slackpkg+ is a plugin for slackpkg.
slackpkg+: It adds support for third-party repositories.
slackpkg+: You can install, upgrade and search from multiple repositories.
slackpkg+:
slackpkg+:
slackpkg+:
slackpkg+:
Package: slackpkg+-1.7.b2-noarch-1mt
Repository: slackpkgplus
Path: ./pkg/slackpkg+-1.7.b2-noarch-1mt.txz
Url: http://slakfinder.org/slackpkg+dev/pkg/slackpkg+-1.7.b2-noarch-1mt.txz
Filelist:
./
etc/
etc/slackpkg/
etc/slackpkg/notifymsg.conf.new
etc/slackpkg/greylist.new
usr/
usr/doc/
usr/doc/slackpkg+-1.7.b2/
usr/doc/slackpkg+-1.7.b2/slackpkgplus.x86.sample
usr/doc/slackpkg+-1.7.b2/slackpkg+.SlackBuild
usr/doc/slackpkg+-1.7.b2/checkrepos.sh
usr/doc/slackpkg+-1.7.b2/setupmultilib.sh
usr/doc/slackpkg+-1.7.b2/slackpkgplus.x86_64.sample
usr/doc/slackpkg+-1.7.b2/ChangeLog.txt
usr/doc/slackpkg+-1.7.b2/README
usr/doc/slackpkg+-1.7.b2/repositories.lst
usr/doc/slackpkg+-1.7.b2/repositories.txt
usr/libexec/
usr/libexec/slackpkg/
usr/libexec/slackpkg/functions.d/
usr/libexec/slackpkg/functions.d/slackpkgplus.sh
usr/libexec/slackpkg/makeinstlog.sh
install/
install/doinst.sh
install/slack-desc
Code:
diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh
index 07191e6..4695169 100755
--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -114,10 +114,37 @@ if [ "$SLACKPKGPLUS" = "on" ];then
##### ====== END BLACKLIST FUNCTIONS === #####
##### ====== INSTALL/POSTINSTALL FUNCTIONS ====== #####
+ function more_info(){
+ echo
+ cat $WORKDIR/pkglist|grep -E "^[^ ]* $NAME "|while read repository name version arch tag namepkg fullpath ext;do
+ echo "Package: $namepkg"
+ echo "Repository: ${repository/SLACKPKGPLUS_/}"
+ echo "Path: ${fullpath/\/SLACKPKGPLUS_${repository/SLACKPKGPLUS_/}/}/$namepkg.$ext"
+ URLFILE=${SOURCE}${fullpath}/${namepkg}.${ext}
+ if echo $URLFILE|grep -q /SLACKPKGPLUS_;then
+ PREPO=$(echo $URLFILE|sed -r 's#^.*/SLACKPKGPLUS_([^/]+)/.*$#\1#')
+ URLFILE=$(echo $URLFILE|sed "s#^.*/SLACKPKGPLUS_$PREPO/#${MIRRORPLUS[$PREPO]}#")
+ fi
+ echo "Url: ${URLFILE/.\//}"
+ if [ "$DETAILED_INFO" == "filelist" ];then
+ FILELIST="$(zgrep ^${fullpath/\/${repository}/}/$namepkg.$ext $WORKDIR/$repository-filelist.gz 2>/dev/null)"
+ if [ -z "$FILELIST" ];then
+ echo "Filelist: no file list available"
+ else
+ echo "Filelist:"
+ echo "$FILELIST"|sed "s/ /\n/g"|tail +2|sed 's/^/ /'
+ fi
+ fi
+ echo
+ done
+ }
# Override cleanup() to improve log messages and debug functions
#
function cleanup(){
+ if [ "$CMD" == "info" ];then
+ [[ "$DETAILED_INFO" != "none" ]]&&more_info
+ fi
rm -f ${TMPDIR}/waiting
if [ "$CMD" == "update" ];then
if [ "$ANSWER" != "Y" ] && [ "$ANSWER" != "y" ]; then
I do not see the need for one more front-end when for instance the file list can already be displayed several ways: pkgtool => view or "most /var/log/packages/<package name>".
“Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher.” (Antoine de Saint-Exupéry).
Yes, I agree, but the var/log/packages contains just the installed packages.
For all other I must download it then tar tvf it or grep in /var/lib/slackpkg
Who use slackpkg & slackpkg+ WANT a frontend. There are other frontend for that?
regards the issue for dir:// repositories, I fixed it and substituted ls with find.
When I wrote it, I did not use find becouse I can't know the structure of the tree, and if it contains many subdir it can slow down the start of slackpkg in any command (search,upgrade,update,...).
In effect, dir:// may be a dedicated directory containing just packages, but may be a directory containing any other things.
So I tried to put dir://home/ as local repository (about 200.000 mixed files)
It take about 10 seconds before start commands.
I think that it is an acceptable time (how many people set the entire home as local repository? He does it at his own risk).
currently
slackpkg+1.6/ is a link to slackpkg+/
slackpkg+1.7/ and slackpkg+current/ is a link to slackpkg+dev/
When slackpkg+ 1.7 stable will be released, slackpkg+/ will be a link to slackpkg+1.7/, so all users automatically upgrade to it.
Who want continue to use slackpkg+ 1.6 have to point to slackpkg+1.6/ directly.
slackpkg+current/ will be a snapshot of slackpkg+dev/ tree
slackpkg+1.6/ will be mantained for fixes
slackpkg+1.7/ will be mantained for fixes and minor updates
what do you think of that plan?
Currently repositories.txt contains some 14.2 repository from microlinux.
Someone are preparing some 14.2 repository?
currently
slackpkg+1.6/ is a link to slackpkg+/
slackpkg+1.7/ and slackpkg+current/ is a link to slackpkg+dev/
[...]
slackpkg+current/ will be a snapshot of slackpkg+dev/ tree
slackpkg+1.6/ will be mantained for fixes
slackpkg+1.7/ will be mantained for fixes and minor updates
what do you think of that plan?
current and dev branches look like duplicates to me. Or do you really see a case when you'd want to play in dev/ without adjusting current/ accordingly?
Why not try to follow an approach similar to Slackware: One stable version + one development version?
You could have slackpkg+/ link to the latest stable version (1.6 today and 1.7 when it's released). So I would see:
slackpkg+dev/ will be the development tree (I would not name it "current" to avoid a possible confusion that it's a package for Slackware -current. It's not)
slackpkg+/ will be a link to the latest stable version (slackpkg+1.6/ for now)
slackpkg+1.7/ will be created when a new stable version is released based on dev tree. slackpkg+/ will then be changed to link to this latest stable version.
In git, usually, the master branch is a development code, for stable versions you may use git tags and any non-master branches, and for testing new features you can use another branch(es). That will just simplify your work. Yes, I know, you prefer to do all the actions manually, but why you don't use git, I don't understand. IMO git is not so difficult to learn...
current and dev branches look like duplicates to me. Or do you really see a case when you'd want to play in dev/ without adjusting current/ accordingly?
I don't know. I think that in dev/ I'm more free to do experiments, add features (or simplest patches), and then remove it.
The -current even if it is not a -stable tree, however should have less experiments.
The reason for a public -dev is just becouse I want keep public all experiments.
Quote:
Why not try to follow an approach similar to Slackware: One stable version + one development version?
Slackware has many stable versions, one -current version (that is not a development version), and one or more non-public tree for internal development.
Quote:
You could have slackpkg+/ link to the latest stable version (1.6 today and 1.7 when it's released).
yes
Quote:
So I would see:
slackpkg+dev/ will be the development tree (I would not name it "current" to avoid a possible confusion that it's a package for Slackware -current. It's not)
good observation. slackpkg+current should not exists with that name.
Quote:
Originally Posted by yars
In git, usually, the master branch is a development code
opinions...
however for git I'm trying to reorganizing the ideas, and one it to put -current as master and -dev in another branch. Many time I used git reset and git push forced in a branch; the -master branch is not a good candidate for that operation.
Quote:
for stable versions you may use git tags and any non-master branches
I did never used tags, but the idea is a branch 1.6 and a branch 1.7
Quote:
and for testing new features you can use another branch(es). That will just simplify your work. Yes, I know, you prefer to do all the actions manually, but why you don't use git, I don't understand. IMO git is not so difficult to learn...
I like git but I prefer to apply patches then commit&push instead to merge from other fork becouse I'm free to review before apply it.
Also git give best results when a project has many indipendent files. Here I've a single big file that is not simple to manage (I already tried to cut in in multiple files, but it did not add many value). Here git is just used to
1) keep track of modifies
2) keep it public in a simplest way
3) allow me to work from many computers
To discuss patches and bug the best way is linuxquestions (the real best place should be slacky.eu in italian language , but I cannot ask the moon ).
I have some new code (beta) that should be, I guess, useful.
This is currently for slackpkg+/devel (ie. 1.7.b3), but could be backported to previous version(s), and even, to slackpkg.
This is a simple extension to the dialog shown in response to commands install, upgrade, and upgrade-all, which allows users to check the changelog for the selected packages.
To do that, I added a button, called ChangeLog, between the Ok and Cancel buttons of the packages selection dialog.
For instance, running slackpkg upgrade patches will show this :
When the button ChangeLog is clicked, a textbox is displayed with the changelog entries for the selected packages, like as below :
When the changelog textbox is closed, the packages selection dialog is restored, with the exact same selection as before. For instance:
The code is in beta stage and must be tested and reviewed by anyone interrested.
--- slackpkgplus.sh.git.1.7.b3 2016-03-10 11:09:31.987399437 +0100
+++ slackpkgplus.sh 2016-03-10 18:07:39.172698579 +0100
@@ -1079,14 +1079,102 @@
export DIALOG_ITEM_HELP="2"
export DIALOG_OK="0"
+ # Prints, into a dialog box, the changelog entries about the packages listed in file $1
+ #
+ function showChangeLogInfo() {
+ local PKGREGEX="[.]t[blxg]z[:][ ]+(added|moved|rebuilt|removed|upgraded)"
+ local SEPREGEX="^[+][-]+[+][ ]*$"
+ local Cpkg
+ local CpkgInfos
+ local Idx
+ local CLogStartIdx
+ local CLogEndIdx
+ local Pathname
+ local Status
+ local Cline
+
+ # Extract each package entry in ChangeLog.txt and store them in
+ # $WORKDIR/ChangeLog-packages.idx
+ #
+ # The output file is formatted as below :
+ # <idx>:<pathname>: <status>
+ #
+ # <idx> is the line index of the entry in original ChangeLog.txt
+ # <pathname> is the full pathname of the package (ie. a/cryptsetup-1.7.1-x86_64-1.txz)
+ # <status> is the package status, which can be added,moved,rebuilt,removed,upgraded)
+ #
+ # [PENDING] this should be done only once when slackpkg update is called
+ #
+ grep -inE "$PKGREGEX" $WORKDIR/ChangeLog.txt > $WORKDIR/ChangeLog-packages.idx
+
+ echo -n "" > $TMPDIR/Packages.clog
+
+ for Cpkg in $(<$TMPDIR/dialog.out) ; do
+
+ # get infos about the current package from changeLog-packages.idx file, if any. The
+ # variable CpkgInfos is a string formatted as below:
+ # <idx1>:<clogidx>:<pathname>: <status>
+ #
+ # idx1=index of the line in changelog-packages.idx which match Cpkg
+ # clogidx=line index of the entry in ChangeLog.txt that match Cpkg
+ #
+ CpkgInfos=( $(grep -n $Cpkg $WORKDIR/ChangeLog-packages.idx | tr ":" " ") )
+
+ if [ ! -z "$CpkgInfos" ] ; then
+ Idx=${CpkgInfos[0]}
+ CLogStartIdx=${CpkgInfos[1]}
+ Pathname=${CpkgInfos[2]}
+ Status=$(echo ${CpkgInfos[3]} | tr --delete " .")
+
+ echo "$Pathname ($Status)" >> $TMPDIR/Packages.clog
+
+ # extra information on package Cpkg can be found in ChangeLog.txt file
+ # starting at line CLogStartIdx+1 and ending the line before the first
+ # line matching the regular expression SEPREGEX or PKGREGEX.
+ #
+ # SEPREGEX match the "standard" changelog separator entry, ie. a string
+ # which start with a plus followed by dashes and a plus. For instance:
+ # +----------------------+
+ #
+ # PKGREGEX match the "standard" changelog package entry, ie. a string
+ # which starts with a package pathname followed by colon, one or more
+ # space and the status. For instance:
+ # n/bind-1.2.3-x86_64-1.txz: Upgraded.
+
+ ((CLogStartIdx++))
+
+ tail -n "+$CLogStartIdx" $WORKDIR/ChangeLog.txt | while read Cline ; do
+ if ! echo "$Cline" | grep -qiE "($SEPREGEX)|($PKGREGEX)" ; then
+ echo -e "\t$Cline" >> $TMPDIR/Packages.clog
+ else
+ break
+ fi
+ done
+ echo "" >> $TMPDIR/Packages.clog
+ fi
+ done
+
+ dialog --title "ChangeLog" \
+ --backtitle "slackpkg $VERSION" $HINT \
+ --textbox $TMPDIR/Packages.clog 19 70
+ }
+
+
# Show the lists and asks if the user want to proceed with that action
# Return accepted list in $SHOWLIST
#
function showlist() {
+ local CLOGopt=false
+ local EXIT=false
+
if [ "$ONOFF" != "off" ]; then
ONOFF=on
fi
+ if [ "$2" == "upgrade" ] || [ "$2" == "upgrade-all" ] || [ "$2" == "install" ] ; then
+ CLOGopt=true
+ fi
+
cat $TMPDIR/greylist.* >$TMPDIR/greylist
if [ "$GREYLIST" == "off" ];then
>$TMPDIR/greylist
@@ -1149,23 +1237,90 @@
if [ "$DOWNLOADONLY" == "on" ];then
DTITLE="$DTITLE (download only)"
fi
- cat $TMPDIR/dialog.tmp|xargs dialog --title "$DTITLE" --backtitle "slackpkg $VERSION" $HINT --checklist "Choose packages to $2:" 19 70 13 2>$TMPDIR/dialog.out
- case "$?" in
- 0|123)
- dialog --clear
- ;;
- 1|124|125|126|127)
- dialog --clear
- echo -e "DIALOG ERROR:\n-------------" >> $TMPDIR/error.log
- cat $TMPDIR/dialog.out >> $TMPDIR/error.log
- echo "-------------"
- echo "If you want to continue using slackpkg, disable the DIALOG option in"
- echo "$CONF/slackpkg.conf and try again."
- echo "Help us to make slackpkg a better tool - report bugs to the slackpkg"
- echo "developers" >> $TMPDIR/error.log
- cleanup
- ;;
- esac
+
+ if $CLogOpt ; then
+ # When the user "click" the button <ChangeLog> to read the changelog of
+ # the selected pacakges, the
+ # duplicate TMPDIR/dialog.tmp so that all items are deselected to be able to
+ # regenerate the list of selected items when showChangeLogInfo() returns, ie.
+ # when the user has checked the changelog.
+
+ # When the user "clicks" the button "<ChangeLog>" to read the changelog of
+ # currently selected packages, the dialog to select packages is terminated
+ # and the changelog is printed in a textbox.
+ #
+ # When the user exits from the textbox, the user must retrieve the packages
+ # selection dialog with the packages that were selected previously. To do that,
+ # the file $TMPDIR/dialog.tmp is duplicated with all items deselected into
+ # file $TMPDIR/dialog.tmp.off, so that the list of selected packages can
+ # be regenerated using the data in file $TMPDIR/dialog.out when
+ # showChangeLogInfos() returns.
+
+ cat $TMPDIR/dialog.tmp | sed "s/ on / off /g" > $TMPDIR/dialog.tmp.off
+ fi
+
+ while ! $EXIT ; do
+
+ if $CLOGopt ; then
+ dialog --extra-button \
+ --extra-label "ChangeLog" \
+ --title "$DTITLE" \
+ --backtitle "slackpkg $VERSION" $HINT \
+ --checklist "Choose packages to $2:" \
+ 19 70 13 \
+ --file $TMPDIR/dialog.tmp 2>$TMPDIR/dialog.out
+ else
+ dialog --title "$DTITLE" \
+ --backtitle "slackpkg $VERSION" $HINT \
+ --checklist "Choose packages to $2:" \
+ 19 70 13 \
+ --file $TMPDIR/dialog.tmp 2>$TMPDIR/dialog.out
+ fi
+
+ case $? in
+ 0|1)
+ EXIT=true
+ dialog --clear
+ ;;
+
+ 3)
+ dialog --clear
+
+ if $CLOGopt ; then
+
+ if [ -s $TMPDIR/dialog.out ] ; then
+ showChangeLogInfo $TMPDIR/dialog.out
+
+ # regenerate the list of selected package from the patterns
+ # in TMPDIR/dialog.out and the file TMPDIR/dialog.tmp.off
+
+ PKGS_REGEX=$(cat $TMPDIR/dialog.out|sed "s/ /\\\|/g")
+
+ cat $TMPDIR/dialog.tmp.off > $TMPDIR/dialog.tmp
+ sed -i -e "/^$PKGS_REGEX/ s= off = on =" $TMPDIR/dialog.tmp
+ else
+ # all packages are deselected ...
+ cat $TMPDIR/dialog.tmp.off > $TMPDIR/dialog.tmp
+ fi
+ else
+ EXIT=true
+ fi
+ ;;
+
+ -1)
+ EXIT=true
+ dialog --clear
+ echo -e "DIALOG ERROR:\n-------------" >> $TMPDIR/error.log
+ cat $TMPDIR/dialog.out >> $TMPDIR/error.log
+ echo "-------------"
+ echo "If you want to continue using slackpkg, disable the DIALOG option in"
+ echo "$CONF/slackpkg.conf and try again."
+ echo "Help us to make slackpkg a better tool - report bugs to the slackpkg"
+ echo "developers" >> $TMPDIR/error.log
+ cleanup
+ ;;
+ esac
+ done
echo
echo
SHOWLIST=$(cat $TMPDIR/dialog.out | tr -d \")
“Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher.” (Antoine de Saint-Exupéry).
I have some new code (beta) that should be, I guess, useful.
I was searching the code for the beta4
Version 1.7.b4 - 14/Mar/2016
- slackpkg search now search in dir:// repositories too.
- subdirectory allowed in dir:// repositories.
- slackpkg search honour correctly the '+' character
- Added 'ChangeLog' dialog box to show the changelog of selected packages
(thanks to phenixia2003)
the dialog function(s) contain a bug regard the size of it.
For the changelog, the dialog is 19x70, but the slackware changelog contains rows up to 79 columns.
For package list, 'package name'+'repository name' may be longer than 70 characters.
This is not a large problem since few packages have long name, and the changelog dialogbox is a non-critical feature, but I think it's the time to solve it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.