LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-02-2015, 03:44 AM   #286
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 882

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769

Hello,

Quote:
Originally Posted by zerouno View Post
If slackpkg+ found a package with the same tag in two or more repositories (for example restricted and alienbob contains many duplicated but differents packages with the same name and same tag), it will honor $REPOPLUS order.

The only exception where is not preserved the tag is when in a slackware-stable the installed package is an official slackware package and exists a patch for that package.
In my point of view, these two exceptions show that using tags to achieve what you want is not a good idea. Some users will not understand why some packages are upgraded as expected, and others not.

If you want slackpkg upgrade-all handles the packages according to their respective repositories, you should register the dynamic orders specified by (each) slackpkg install|upgrade repository:package somewhere, and merge them in front of PKGS_PRIORITY at runtime :

Code:
slackpkg install slacky:openjdk => register=(slacky:openjdk)+register
slackpkg install slackware:mozilla-firefox => register=(slackware:mozilla-firefox)+register
...

slackpkg upgrade-all => 
  PKGS_PRIORITY="slackware:mozilla-firefox slacky:openjdk "+PKGS_PRIORITY 
  upgrade-all

slackpkg upgrade alienbob:openjdk => 
  :register=(alienbob:openjdk)+register
  :PKGS_PRIORITY="alienbob:openjdk slackware:mozilla-firefox slacky:openjdk "+PKGS_PRIORITY
  :upgrade

Notes:

1. In case a package is already referenced in the register, it would be better to remove it before adding the new priority. For instance :

Code:
   register="slackware:mozilla-firefox slacky:openjdk"
   slackpkg upgrade alienbob:openjdk => register="alienbob:openjdk slackware:mozilla-firefox"
2. If you don't want to use an external register, you can dynamically update slackpkgplus.conf, and more precisely PKGS_PRIORITY, each time slackpkg install|upgrade repository:package is used. This could be better, no extra file to manage, and users will have a better control on that.

--
SeB

Last edited by phenixia2003; 07-02-2015 at 04:58 AM.
 
Old 09-08-2015, 05:03 AM   #287
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 882

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
Hello,

As you can see in this thread, the OP has trouble to install the multilib with the script setupmultilib.sh bundled with slackpkg+ (in /usr/doc/slackpkg+<version>).

The problem is due to a bug at line #70 of this script, the multilib repository being defined as "multilib:" while it should simply be "multilib" :

Code:
    sed -i -r -e '1,/^#PKGS_PRIORITY=.*$/s/^(#PKGS_PRIORITY=.*)$/\1\nPKGS_PRIORITY=( multilib: )\n/' $CONF/slackpkgplus.conf
--
SeB
 
Old 11-20-2015, 09:59 AM   #288
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 882

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
Hello,

As Noticed by Didier here, it would be better that, instead of the users, slackpkg+ ensures, itself, that repository urls have a trailing slash.

The patch below (and in attachment) for slackpkg+ 1.5.0 fixes it :

Code:
--- slackpkgplus.sh.orig        2015-11-20 16:34:54.633426641 +0100
+++ slackpkgplus.sh     2015-11-20 16:35:45.887428928 +0100
@@ -579,6 +579,12 @@
     done
   } # END searchlistEX()
 
+       # Ensure each repository url has a trailing slash...
+       #
+  for PREPO in "${!MIRRORPLUS[@]}" ; do
+       MIRRORPLUS[$PREPO]="${MIRRORPLUS[$PREPO]%/}/"
+  done
+
   touch $TMPDIR/greylist.1
   if [ -e $CONF/greylist ];then
     cat $CONF/greylist|sed -e 's/#.*//'|grep -v -e '^#' -e '^$'|awk '{print $1}'|sort -u >$TMPDIR/greylist.1
P.S: The patch (for slackpkg+ 1.5.0) attached to this post could be applied to fix troubles when searching the package xz.

--
SeB
Attached Files
File Type: txt slackpkgplus-1.5.0-repo-trailing-slash-fix.diff.txt (505 Bytes, 8 views)

Last edited by phenixia2003; 11-20-2015 at 10:54 AM.
 
1 members found this post helpful.
Old 11-20-2015, 10:46 AM   #289
bormant
Member
 
Registered: Jan 2008
Posts: 332

Rep: Reputation: 192Reputation: 192
phenixia2003,
the patches in the message body (first) and in the attachment (second) are slightly different:
Code:
-+       MIRRORPLUS[$PREPO]="${MIRRORPLUS[$PREPO]/}/"
++       MIRRORPLUS[$PREPO]="${MIRRORPLUS[$PREPO]%/}/"
and the second seems to be right.
 
Old 11-20-2015, 10:58 AM   #290
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 8,876

Rep: Reputation: Disabled
Quote:
Originally Posted by bormant View Post
phenixia2003,
the patches in the message body (first) and in the attachment (second) are slightly different:
That's due to a bug in LQ's on-line editor: if you edit a post (as SeB did) it "eats" a lot of characters, including the percent sign.

To fix that: edit the post, click "Go Advanced" to put the editor in the so-called "advanced" mode, insert the % again and click "Save".

I have reported this bug several times...

Last edited by Didier Spaier; 11-20-2015 at 11:00 AM.
 
Old 11-20-2015, 11:04 AM   #291
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 882

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
Hello,

Quote:
Originally Posted by bormant View Post
phenixia2003,
the patches in the message body (first) and in the attachment (second) are slightly different:
Code:
-+       MIRRORPLUS[$PREPO]="${MIRRORPLUS[$PREPO]/}/"
++       MIRRORPLUS[$PREPO]="${MIRRORPLUS[$PREPO]%/}/"
and the second seems to be right.
Thanks, fixed it. Had to double the % (!?), but I really don't understand why.


--
SeB
 
Old 11-20-2015, 11:06 AM   #292
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 882

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
Hello,

Quote:
Originally Posted by Didier Spaier View Post
That's due to a bug in LQ's on-line editor: if you edit a post (as SeB did) it "eats" a lot of characters, including the percent sign.

To fix that: edit the post, click "Go Advanced" to put the editor in the so-called "advanced" mode, insert the % again and click "Save".

I have reported this bug several times...
Ah, ok. Thanks.

--
SeB
 
Old 11-20-2015, 03:31 PM   #293
zerouno
Member
 
Registered: Oct 2009
Location: Italy
Distribution: Slackware
Posts: 568

Rep: Reputation: 161Reputation: 161
Patched in slackpkg+ 1.5.1

I had other fix to release.

Also a user reported me that setting

PKGS_PRIORITY=( multilib:glibc-solibs )

slackpkg+ offer instead
[*] glibc-2.17_multilib-x86_64-10alien.txz multilib



This should not be a slackpkg+ bug but sounds as the recent bug fixed in slackpkg-2.28.0-14 in slackware-current.
Quote:
+--------------------------+
Sun Aug 9 19:42:38 UTC 2015
ap/slackpkg-2.82.0-noarch-14.tgz: Rebuilt.
Patched to avoid false package name matches when the full name of a
package is a substring of another package's name, as happened recently
with atk-2.16.0 and at-spi2-atk-2.16.0. Thanks to Eric Hameleers.
+--------------------------+
so I just add a note to suggest to install slackpkg from slackware current even to slackware 14.1 users.


slackpkg+ changelog
Quote:
Version 1.5.1 - 20/Nov/2015
Note for Slackware 14.1 users: slackware-current introduce important bug fix
in slackpkg 2.82.0-14 (see Slackware ChangeLog) not backported in slackware
14.1; it is not mandatory but you are encouraged to upgrade it by download it
manually; be sure to graylist slackpkg to avoid an automatic downgrade.
- The trailing slash in MIRRORPLUS[] is now optional (thanks to phenixia2003
and Didier Spaier)
- Added DOWNLOADCMD option to add a custom downloader
- Fixed a bug that causes that ALL repositories fail if ONE repository fails
(thanks to FR on Alien Pasture for reporting)
- Fixed TAG_PRIORITY to avoid impact in slackpkg install
 
2 members found this post helpful.
Old 11-21-2015, 09:06 AM   #294
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 882

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
Hello,

Quote:
Originally Posted by zerouno View Post
Patched in slackpkg+ 1.5.1

I had other fix to release.

Also a user reported me that setting

PKGS_PRIORITY=( multilib:glibc-solibs )

slackpkg+ offer instead
[*] glibc-2.17_multilib-x86_64-10alien.txz multilib


This should not be a slackpkg+ bug but sounds as the recent bug fixed in slackpkg-2.28.0-14 in slackware-current.
This is a slackpkg+ bug, caused by the second grep statement at line #415. This (troublesome) statement has been added earlier to support version number in priority rules (ie. <repository-name>:<package-name>-<version>), which is, correct me if I'm wrong, useless, since a repository should not include more than one version of a package.

The patch slackpkgplus-1.5.1-givepriority-fix.diff.txt fixes this issue:
Code:
--- slackpkgplus.sh.orig        2015-11-21 12:59:57.349236501 +0100
+++ slackpkgplus.sh     2015-11-21 13:01:12.379239849 +0100
@@ -408,13 +408,11 @@
         # ARGUMENT is always a basename. But PAT can be:
         #   1. a regular expression (ie .*)
         #   2. a basename (openjdk)
-        #   3. a partial (or complete) package name (vlc-2.0.6, ).
         #
-        # The current "enhanced priority rule" is applied :
-        #   + In case (1) and (2) when ARGUMENT contains the pattern PAT
-        #   + In the case (3) when ARGUMENT starts the pattern PAT.
+        # The current "enhanced priority rule" is applied in case (1) 
+       # and (2) when ARGUMENT contains the pattern PAT
         #
-        if echo "$ARGUMENT" | grep -q "$PAT" || echo "$PAT" | grep "^$ARGUMENT" ; then
+        if echo "$ARGUMENT" | grep -q "$PAT" ; then
           PKGDATA=""
           PKGINFOS=$(grep -n -m 1 "^${DIR} ${ARGUMENT} " ${TMPDIR}/pkglist)
--
SeB
 
Old 11-22-2015, 09:16 AM   #295
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.2 64bit
Posts: 915
Blog Entries: 5

Rep: Reputation: 145Reputation: 145
I upgraded to slackpkg+ 1.5.1 yesterday from 1.5.0.

I'm using KDE 4.14.6 from alienBOB ktown repository except for package phonon-gstreamer. So when I run "slackpkg upgrade-all", I usually saw this package as a candidate for upgrade. With slackpkg+ 1.5.1, "slackpkg upgrade-all" shows me nothing to upgrade but "slackpkg upgrade phonon-gstreamer" works.

Any idea what went wrong?

Code:
$slackpkg search phonon-gstreamer

DONE

The list below shows all packages with name matching "phonon-gstreamer".

[ Status           ] [ Repository               ] [ Package                                  ]
   installed                                        phonon-gstreamer-4.6.3-x86_64-1           
  upgrade              ktown                        phonon-gstreamer-4.6.3-x86_64-1 --> phonon-gstreamer-4.8.0-x86_64-1alien
Code:
$slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall
Here's my /etc/slackpkg/slackpkgplus.conf:

Code:
# Configuration for slackpkg+. See /usr/doc/slackpkg+-*/README for more details

# Enable (on) / Disable (off) slackpkg+
SLACKPKGPLUS=on

# set to '0' to never show the download progress bar
# set to '1' to show the bar only in download packages (default)
# set to '2' to always show the download bar
# set to '3' for a debug mode
VERBOSE=1

# By default slackpkg+ deny to install 32bit packages.
#
# Set this flag to 'on' allow slackpkg+ to install 32bit packages on a 64bit slackware 
# installation (possibly unsafe). Please, do not install both 32 and 64bit of the same 
# package to avoid problems, and NEVER upgrade existant 64bit packages with relative 32bit package.
# Do not forget to install the multilibs.
ALLOW32BIT=off

# Enable (1) / Disable (0) the official slackpkg blacklist. May be useful to temporarily skip
# the slackware blacklist. You can also override it from command line:
# 'USEBL=0 slackpkg upgrade-all'
USEBL=1

# Add custom option to 'wget'.
# You can solve the repository indisponibility issue by set a timeout here
WGETOPTS="--timeout=20 --tries=2"

# If you want replace wget with another downloader search DOWNLOADCMD in documentation
# at /usr/doc/slackpkg+-*/README
#DOWNLOADCMD="wget -O"

# Enable (on) / Disable (off) notification events (see notifymsg.conf)
#ENABLENOTIFY=off

# Enable (on) / Disable (off) the greylist feature. See /etc/slackpkg/greylist
GREYLIST=on

# If two or more repositories contains some same packages, you can specify
# from which repository you prefer to search it.
# The syntax is "<repository_name>:<package_name>"
# Accepts regular expressions. To give priority to an entire repository use "<repository_name>"

# Examples:
#PKGS_PRIORITY=( restricted:vlc )
# OR
#PKGS_PRIORITY=( myrepo )
# 
# if you have two reporitories to give priority you must set both in the same line
#PKGS_PRIORITY=( myrepo restricted:vlc )
#
# if you want to install 'ktown' repository you must set it here
#PKGS_PRIORITY=( ktown )
# and DO NOT MISS to read special instruction on /usr/doc/slackpkg+-*/repositories.txt
#
# If you want a multilib system, uncomment the multilib repository and set:
#PKGS_PRIORITY=( multilib )
#
# (Use /usr/doc/slackpkg+-*/setupmultilib.sh to setup a multilib configuration)
#
# For both multilib and ktown set
PKGS_PRIORITY=( patches:.* slackpkgplus:.* alienbob:flashplayer-plugin alienbob:libreoffice ktown:.* mled:.* )

# Otherwise you can try to upgrade a package from a repository that contains a package with the
# same tag of the already installed package. Tipically that means to upgrade a package from the
# same author of the already installed package.
# Note that this method may not works properly where two repositories contains a package with the
# same tag.
# Set TAG_PRIORITY to 'on' to enable this function
TAG_PRIORITY=off

# List repositories you want to use (defined below)
# remember to launch 'slackpkg update' if you modify that row.
REPOPLUS=( slackpkgplus ktown mled extras alienbob )

# Define mirrors (uncomment one or more mirror; remember to add it to REPOPLUS)
# GPG Note: after adding a repository, you must to run 'slackpkg update gpg'
#           some repositories as salixos or slackel, have a partial GPG support;
#           for that repositories you may need to run slackpkg with 'slackpkg -checkgpg=off ...'

# Slackware 14.1 - x86_64
#MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/14.1/
MIRRORPLUS['ktown']=http://taper.alienbase.nl/mirrors/alien-kde/14.1/latest/x86_64/
MIRRORPLUS['mled']=http://www.microlinux.fr/microlinux/desktop-14.1-64bit/
MIRRORPLUS['extras']=http://www.microlinux.fr/microlinux/extras-14.1-64bit/
MIRRORPLUS['alienbob']=http://taper.alienbase.nl/mirrors/people/alien/sbrepos/14.1/x86_64/

# use this to keep the slackpkg+ package updated
MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/

# Slackware current - x86_64
#MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/current/

# Local repository:
#MIRRORPLUS['alienbob']=file://repositories/alien/sbrepos/14.1/x86/
#
# Local packages (you do not need metadata nor 'slackpkg update' command):
#MIRRORPLUS['myrepo']=dir://repositories/mypackages/
 
Old 11-22-2015, 09:42 AM   #296
zerouno
Member
 
Registered: Oct 2009
Location: Italy
Distribution: Slackware
Posts: 568

Rep: Reputation: 161Reputation: 161
@phenixia2003:
Really a reporitory CAN contains two versions of the same package (see extra:aspell-uk) but currently the version find does not work, and yes it has no sense.

But I'm not able to reproduce the reported error.

So yes, I can remove the second grep, but before I want to try to reproduce the error.

@gegechris99: I will verify

Last edited by zerouno; 11-22-2015 at 09:44 AM.
 
Old 11-22-2015, 11:01 AM   #297
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 882

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
Hello,

Quote:
Originally Posted by zerouno View Post
@phenixia2003:
Really a reporitory CAN contains two versions of the same package (see extra:aspell-uk) but currently the version find does not work, and yes it has no sense.

But I'm not able to reproduce the reported error.

So yes, I can remove the second grep, but before I want to try to reproduce the error.

@gegechris99: I will verify
You don't really need to reproduce the error.

At line #415, you have the faulty statement :
Code:
if echo "$ARGUMENT | grep -q "$PAT" || echo "$PAT" | grep "^$ARGUMENT" ; then
ARGUMENT is the basename of package passed to givepriority() and PAT is the pattern of the current priority.

So, when PRIORITY includes the rule multilib:glibc-solibs, and the basename glibc is passed to givepriority(), at a certain point you'll have this :

Code:
ARGUMENT=glibc
PAT=glibc-solibs
With this configuration, the faulty statement is evaluated as below :

Code:
$ echo "glibc" | grep "glibc-solibs" || echo "glibc-solibs" | grep "^glibc" 
glibc-solibs

To reproduce the error "for real", here is how to proceed :

On a slackware64/multilib:

To reproduce the issue on a up to date multilib installation, it is easier to substitute the rule slackware64:glibc-solibs :

1. add slackware64:glibc-solibs to PKGS_PRIORITY
2. slackpkg upgrade-all prints glibc and glibc-solibs packages from the "repository" slackware64 :
Code:
slackpkg -dialog=off upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... glibc-solibs
DONE

glibc-2.17-x86_64-7.txz
glibc-solibs-2.17-x86_64-7.txz

Total package(s): 2

Do you wish to upgrade selected packages (Y/n)?
On a slackware64/pure:

1. Activate the multilib repository
2. add multilib:glibc-solibs to PKGS_PRIORITY
3. slackpkg update
4. slackpkg upgrade-all prints glibc and glibc-solibs packages from the repository multilib.
--
SeB
 
Old 11-22-2015, 12:28 PM   #298
zerouno
Member
 
Registered: Oct 2009
Location: Italy
Distribution: Slackware
Posts: 568

Rep: Reputation: 161Reputation: 161
A small bigbug.
Sorry.

Code:
--- slackpkgplus.sh_1.5.1       2015-11-22 18:55:43.383684886 +0100
+++ slackpkgplus.sh     2015-11-22 19:10:38.183498349 +0100
@@ -611,7 +611,7 @@
     ((INDEX++))
   done
 
-  REPOPLUS=$(echo "${REPOPLUS[*]} ${PURE_PKGSPRIORITY[*]} ${!MIRRORPLUS[*]}"|sed 's/ /\n/g'|sed 's/:.*//'|awk '{if(!a[$1]++)print $1}')
+  REPOPLUS=( $(echo "${REPOPLUS[*]} ${PURE_PKGSPRIORITY[*]} ${!MIRRORPLUS[*]}"|sed 's/ /\n/g'|sed 's/:.*//'|awk '{if(!a[$1]++)print $1}') )
   PRIORITY=( ${PRIORITY[*]} SLACKPKGPLUS_$(echo ${REPOPLUS[*]}|sed 's/ / SLACKPKGPLUS_/g') )
 
   # Test repositories
 
Old 11-22-2015, 12:35 PM   #299
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 882

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
Hello,

Quote:
Originally Posted by gegechris99 View Post
I upgraded to slackpkg+ 1.5.1 yesterday from 1.5.0.

I'm using KDE 4.14.6 from alienBOB ktown repository except for package phonon-gstreamer. So when I run "slackpkg upgrade-all", I usually saw this package as a candidate for upgrade. With slackpkg+ 1.5.1, "slackpkg upgrade-all" shows me nothing to upgrade but "slackpkg upgrade phonon-gstreamer" works.

Any idea what went wrong?
No way to reproduce it. Can you post (or attach) :

1. the content of /var/lib/slackpkg/pkglist
2. the output of command :
Code:
$ ls -1 /var/log/packages/phonon*
--
SeB
 
Old 11-22-2015, 12:58 PM   #300
zerouno
Member
 
Registered: Oct 2009
Location: Italy
Distribution: Slackware
Posts: 568

Rep: Reputation: 161Reputation: 161
Quote:
Originally Posted by phenixia2003 View Post
You don't really need to reproduce the error.
...
...
thankyou for analisys. I will patch it in a short.

About @gegechris99 problem:
there was a casting problem in how to we manage the REPOPLUS variable.
It is used as an array from start
REPOPLUS=( .... )
and used sometime as a string and sometime as an array.

In 1.5.1 version I fixed that but I forgot the row 614 that is the mainly.

This broke the repositories order (and some repository duplication).

Released slackpkg+-1.5.1-noarch-2mt.txz
 
  


Reply

Tags
slackpkg


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Holding a package update from slackpkg gazj Slackware 2 01-25-2011 04:58 PM
Where can I find a 3rd Party Repository for RHEL 5? tightlikethat Linux - Newbie 3 02-27-2010 08:46 PM
Best 3rd Party RPM Repository for FC9 kromberg Fedora 11 11-13-2008 08:04 PM
Package Kit Error-- "Cannot retrieve repository metadata (repomd.xml) for repository" mbvpixies78 Linux - Newbie 11 08-22-2008 07:20 PM
3rd party package managers? crontab Slackware 3 10-06-2007 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration