LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackpkg vs. third-party package repository (https://www.linuxquestions.org/questions/slackware-14/slackpkg-vs-third-party-package-repository-4175427364/)

zerouno 01-26-2016 01:54 PM

Please specify the slackpkg+ version that you are using and post your slackpkgplus.conf (stripped of commented '#' rows)

Here I will use the latest (1.7.b1) for the examples. I'm using slackware 32bit; for slackware 64bit you must substitute slackware with slackware64.
Upgrading from 1.6.1 to 1.7.b1 you do not need strictly to modify configuration file (it just add the STRICTGPG=on directive, but if not specified is on by default).

In slackware, the patches are all the packages with tag _slack14.1:
bash-4.2.053-i486-1_slack14.1
You can find it in 'patches' tree on slackware repository http://slackware.osuosl.org/slackware-14.1/patches
in slackpkg(+) that tree is also called as a repository 'patches' (even if it is an improper use).
When a package is both in release tree (slackware/ directory on repository, also called 'slackware' repository)

When you search a package that is present in slackware and patches repository, slackpkg show the patch as installed and the original as 'uninstalled(masked)'

Code:

# slackpkg search bash

DONE

The list below shows all packages with name matching "bash".

[ Status          ] [ Repository              ] [ Package                                  ]
  installed              patches                      bash-4.2.053-i486-1_slack14.1           
  uninstalled(masked)      slackware                    bash-4.2.045-i486-1

slackpkg 1.6.1 only show the installed package (the patch).
Do you have bash in /var/log/packages ?

while slackpkg info retrieve the list from /var/lib/slackpkg/PACKAGES.TXT and show all matching packages, both slackware and patches.

If you have only apr-1.4.6 upgraded and no other apr in that directory, you should also have the apr-1.5.0 in /var/log/packages. If no there may have been an error. See if you have /usr/doc/apr-*. If yes, your packages directory may be inconsistent. You should have an apr entry in /var/log/scripts and removed_scripts too.

to know if you have slackware package not installed type
# slackpkg install patches slackware64


The LASTUPDATE file is not used in slackpkg+. It just is used in slackpkg, so ignore it.


Quote:

Originally Posted by bamunds (Post 5487364)
1) should I find all patches installed on my system, or only those that are actively being used?

# ls /var/log/packages/*_slack14.1
are all installed patches.
# slackpkg search patches
show all available patches.
Quote:

2) should /var/lib/slackpkg/LASTUPDATE show the date of the last slackpkg(+) update?
No, it is not used
Quote:

3) is there a command to update the slackpkgplus search db (is it looking in /var/log/packages vs the online repository) so it properly shows the installed packages?
slackpkg db is /var/lib/slackpkg/pkglist; /var/log/packages is the slackware db.
# slackpkg update
will update the slackpkg db with the online infos. Slackware db is updated from pkgtools (installpkg/upgradepkg/removepkg); slackpkg does nothing. If something does not match you may have a corruption.
Quote:

4) if all should be installed, then what part of slackpkg.conf or slackpkgplus.conf should be configured to assure their installation?
Default configuration is sufficient for all.
# slackpkg upgrade-all
will install all patches available for installed packages only; if you does not have apr in slackware db, slackpkg search will not upgrade it.
run
# slackpkg install patches
to install patches for the not installed packages (but it is not be the best pratic)

Quote:

5) I did try the command slackpkg install slackware which responded with "No packages match the pattern for install." Which is what slackpkg upgrade-all also responds. This command is suppose to install every package of slackware available in the official repositories. Any clue what I should check for why the patches are showing as uninstalled for installed packages?
You have a 64bit slackware, so you have to run
# slackpkg install slackware64
This will show you all slackware packages not installed, but better is
# slackpkg install patches slackware64
that will show you all slackware packages not installed and the relative patch, then run
# slackpkg install-new
# slackpkg upgrade-all
# slackpkg clean-system

be sure that you have nothing in /etc/slackpkg/blacklist
This should 'repair' your slackware database by installing missing packages and upgrading all available.


I hope I made clear ideas (or maybe I confused more ;) )

yars 01-26-2016 02:30 PM

1 Attachment(s)
Seems in slackpkg+-current (since devel:3f16140) slackpkg upgrade-all is broken. Here is a patch to fix it (see attachments). Another problem is that the not enough a command line argiments when running slackpkg upgrade-all:
Code:

-------------
If you want to continue using slackpkg, disable the DIALOG option in
/etc/slackpkg/slackpkg.conf and try again.
Help us to make slackpkg a better tool - report bugs to the slackpkg


==============================================================================
  WARNING! One or more errors occurred while slackpkg was running
------------------------------------------------------------------------------
DIALOG ERROR:
-------------

Error: Expected at least 7 tokens for --checklist, have 4.
Use --help to list options.


developers

(chroot) root@notecomp:/#


zerouno 01-26-2016 03:59 PM

Thanks for patch. It affect the feature TAG_PRIORITY; do you use it?

About the dialog problem, please, run with VERBOSE=3 and post the contents of $TMPDIR/dialog.tmp

zerouno 01-26-2016 05:03 PM

I've pushed the SENSITIVE_SEARCH and the SPINNING patch.

Also I've backported it on the stable branch (for merging in a 1.6.1p2 version)

yars 01-28-2016 11:09 AM

What is a reason to have two ChangeLog's? Maybe one need to be a symlink to another?

zerouno 01-29-2016 08:10 AM

where are the two ChangeLog's?


Also, have you solved/replicated the DIALOG problem?

yars 01-29-2016 09:20 AM

1 Attachment(s)
Quote:

Originally Posted by zerouno (Post 5489312)
where are the two ChangeLog's?

One is in slackpkg+'s root directory, another copy is under src/. I see that in your github repository.

Quote:

Originally Posted by zerouno (Post 5489312)
Also, have you solved/replicated the DIALOG problem?

I am working on that.
My configuration file (without comments and blank lines) is here, the output of 'sh -x slackpkg upgrade-all' here, dialog.tmp is empty, but dialog.tmp.1 contains a line
Code:

bash-4.2.053-x86_64-1_slack14.1.txz "" on "installed: bash-4.2.045-x86_64-1  -->  available: "
EDIT: Dialog now works properly, but --item-help seems does nothing (I expect that this will show available bash version from patches/). Here is a patch:
Code:

From 11a5f2f0696ab03744ac1009390cde56db2d6480 Mon Sep 17 00:00:00 2001
From: Yaroslav Shmelev <yars068@yandex.ru>
Date: Fri, 29 Jan 2016 19:34:22 +0300
Subject: [PATCH] Fix DIALOG problem when upgrade-all command invoked

---
 src/slackpkgplus.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh
index 1a280c5..570072f 100755
--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -1081,7 +1081,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
          "tag")        SHOWORDER=10;;
          *)            SHOWORDER=6;;
        esac
-        cat $TMPDIR/dialog.tmp.1 | awk '{print $'$SHOWORDER',$0}'|sort|cut -f13- -d" " >$TMPDIR/dialog.tmp
+        cat $TMPDIR/dialog.tmp.1 | awk '{print $'SHOWORDER',$0}'|sort|cut -f13- -d" " >$TMPDIR/dialog.tmp
        HINT="--item-help"
 
      else # other than 'upgrade'
--
2.6.4

EDIT2: Patch is not right, sorry. Right one is here.

zerouno 01-29-2016 09:53 AM

Quote:

Originally Posted by yars (Post 5489355)
One is in slackpkg+'s root directory, another copy is under src/. I see that in your github repository.

oh, in the code...
Yes, the first ChangeLog is for github/repository, the second is for the real source code, where is the slackbuild that copy it in /usr/doc/...
No, is not a good thing to have links in a source code.

Quote:

Quote:

Also, have you solved/replicated the DIALOG problem?
I am working on that.
I meant to say not if you are working (on the code) to solve it.
I do not understand under which conditions do you obtain the error so that I can replicate it since I have not that error.




[edit]ok, I obtained the error now ;)

zerouno 01-29-2016 10:15 AM

solved

Code:

--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -760,7 +760,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
        LINEIDX=${PKGINFOS/:*/}      #LINEIDX=$(echo "$PKGINFOS" | cut -f1 -d":")
        PKGDATA=( ${PKGINFOS/*:/} )  #PKGDATA=( $(echo "$PKGINFOS" | cut -f2- -d":") )
        mv ${TMPDIR}/pkglist ${TMPDIR}/pkglist.old
-        sed -i --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist.old > ${TMPDIR}/pkglist
+        sed --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist.old > ${TMPDIR}/pkglist
        (( PRIORITYIDX++ ))
        if [ "$PKGDATA" ]; then
          NAME=${PKGDATA[1]}

pushed

yars 01-29-2016 12:43 PM

Great, thanks you! :)

zerouno 01-29-2016 02:47 PM

Do you usally use TAG_PRIORITY=on ?
It's a lot time that I does not use it.
It work fine?

zerouno 01-29-2016 03:45 PM

1.7.b2 released
..
just the cumulative patch release.
It also advise if there are upgrades in progress with manual upgradepkg, to avoid corrupt slackware database.

zerouno 01-30-2016 06:48 AM

See that:

Code:

--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -1253,6 +1253,16 @@ if [ "$SLACKPKGPLUS" = "on" ];then
    cat $TMPDIR/greylist.1|sed 's/^/SLACKPKGPLUS_/' >$TMPDIR/greylist.2
  fi
 
+  if [[ "$CMD" == "install-new" ]];then
+    if [[ "$INSTALL_NEW" == "install-all" ]];then
+      X86_64=$(ls $ROOT/var/log/packages/aaa_base*x86_64* 2>/dev/null|head -1|grep -o 64)
+      INPUTLIST="${PKGS_PRIORITY[*]}"
+      grep -q "^patches " $WORKDIR/pkglist && INPUTLIST="$INPUTLIST patches"
+      INPUTLIST="$INPUTLIST slackware$X86_64"
+      CMD=install
+    fi
+  fi
+
  INDEX=0
  PURE_PKGSPRIORITY=""
  for pp in ${PKGS_PRIORITY[@]} ; do

This modify the behavior of the install-new command.

Setting INSTALL_NEW=install-all in slackpkgplus.conf then "slackpkg install-new" give new packages not from 'grep Added' in ChangeLog, but it works as
# slackpkg install $PKGS_PRIORITY patches slackware
This may be used to:
1) transform a non-full installation to a full installation
2) if you put 'multilib' or 'ktown' in PKGS_PRIORITY the install-new check for new packages in that repositories, so the user does not need to run every time
# slackpkg install-new; slackpkg install ktown; slackpkg install multilib

Now I called new function 'install-all' but better may be 'install-full' or other.

in past the install-new command was extended to search updates from multilib repositories.
In this way install-new can be extended for multiple function.

I wait for feedback on this feature.

yars 01-30-2016 10:21 AM

Quote:

Originally Posted by zerouno (Post 5489537)
Do you usally use TAG_PRIORITY=on ?
It's a lot time that I does not use it.
It work fine?

Yes, I have that on my host machine, as in the chroot environment (I have it to test unstable slackpkg+), that works, but does not affected to command-line (e.g. TAG_PRIORITY=off slackpkg command args). I enabled slackonly repo, installed from already enabled alienbob repository the lua package, then do "slackpkg reinstall lua". In dialog, I see only package from alienbob. Then, I do "TAG_PRIORITY=off slackpkg reinstall lua". It again show only lua from alienbob. That is right behavior?

zerouno 01-30-2016 12:20 PM

Quote:

Originally Posted by yars (Post 5490364)
Yes, I have that on my host machine, as in the chroot environment (I have it to test unstable slackpkg+), that works, but does not affected to command-line (e.g. TAG_PRIORITY=off slackpkg command args). I enabled slackonly repo, installed from already enabled alienbob repository the lua package, then do "slackpkg reinstall lua". In dialog, I see only package from alienbob. Then, I do "TAG_PRIORITY=off slackpkg reinstall lua". It again show only lua from alienbob. That is right behavior?

TAG_PRIORITY just works with upgrade&upgrade-all


All times are GMT -5. The time now is 06:04 PM.