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/)

Raveriux 10-16-2013 03:54 PM

Also dont remember to put x86 or x86_64 directory for Alien Bob ktown :D

chess 10-16-2013 10:24 PM

@zerono: MATE SlackBuilds repositories for 14.0 and 14.1:

Code:

msb: http://slackware.org.uk/msb/14.0/1.6/x86/
msb: http://slackware.org.uk/msb/14.0/1.6/x86_64/
msb: http://slackware.org.uk/msb/14.1/1.6/x86/
msb: http://slackware.org.uk/msb/14.1/1.6/x86_64/

Thanks!

zerouno 10-21-2013 08:44 AM

Quote:

Version 1.0rc2 - 21/Oct/2013
- Looks like we get a slackpkg+ 1.0 release candidate 2... but things are
pretty much nailed down at this point. Please test and report any last :D
- Updated some repository to 14.1
I could not resist ;)

zerouno 10-22-2013 09:36 AM

I want to add that script in /usr/doc/slackpkg+-*

the idea is that isn't really explicit how to setup slackpkg+ to add multilib support.

I tested it only a few (I do not use the alienbob multilib ;) ).

/usr/doc/slackpkg+-*/setupmultilib.sh
Code:

#!/bin/bash

ISX64=$(ls /var/log/packages/aaa_base-*-x86_64-*|wc -l)
if [ $ISX64 -ne 1 ];then
  echo "Slackware multilib's are only supported from slackware x86_64!"
  exit 1
fi
SVER=$(grep -v ^\# /etc/slackpkg/mirrors|sed -r 's,^.*/slackware64-(current|14.1|14.0|13.37|13.0)/,\1,'|head -1)
if [ -z "$SVER" ];then
  echo "Which slackware version do you have? (current/14.1/14.0/13.37/13.0)"
  read $SVER
fi
if ! echo $SVER|egrep -q '^(current|14.1|14.0|13.37|13.0)$';then
  echo "Invalid slackware version ($SVER)"
  exit 1
fi

if grep -q -e '^PKGS_PRIORITY=.* multilib:\.\* .*$' -e '^MIRRORPLUS..multilib..=.*multilib.*' /etc/slackpkg/slackpkgplus.conf;then
  echo "slackpkg+ seem to be already configured for multilib support. Would you deconfigure it? (y/N)"
  read ANS
  if [ "$ANS" == "y" -o "$ANS" == "Y" ];then
    cp /etc/slackpkg/slackpkgplus.conf /etc/slackpkg/slackpkgplus.conf.backup
    sed -i -r \
      -e 's/^PKGS_PRIORITY=(.*) multilib:\.\* (.*)$/PKGS_PRIORITY=\1 \2/' \
      -e 's/^(PKGS_PRIORITY=\( +\).*)$/#\1/' \
      -e 's/^(MIRRORPLUS..multilib..=.*multilib.*)$/#\1/' \
      -e 's/^REPOPLUS=(.*) multilib (.*)/REPOPLUS=\1 \2/' \
      -e 's/^(REPOPLUS=\( +\).*)$/#\1/' /etc/slackpkg/slackpkgplus.conf
    echo "multilib support deconfigured from slackpkg+. You need now to remove installed packages (using slackpkg)."
    echo "Do you want to remove it now? (y/N)"
    read ANS
    if [ "$ANS" == "y" -o "$ANS" == "Y" ];then
      slackpkg update
      slackpkg upgrade gcc glibc
      slackpkg remove multilib
      echo "Multilib removed!!"
      exit 0
    else
      echo "To remove installed packages type:"
      echo "# slackpkg update"
      echo "# slackpkg upgrade gcc glibc"
      echo "# slackpkg remove multilib"
      exit 0
    fi
  else
    echo "Aborted"
    exit 1
  fi
fi

echo "Would you setup slackpkg+ to add multilib support? (y/N)"
read ANS
if [ "$ANS" == "y" -o "$ANS" == "Y" ];then
  MULTILIBREPO="MIRRORPLUS['multilib']="$(grep -m1 '> multilib: ' repositories.txt|awk '{print $3}'|sed "s/{.*}/$SVER/")
  cp /etc/slackpkg/slackpkgplus.conf /etc/slackpkg/slackpkgplus.conf.backup
  if grep -q ^PKGS_PRIORITY= /etc/slackpkg/slackpkgplus.conf;then
    sed -i -r -e 's/^PKGS_PRIORITY=\( (.*) \)/PKGS_PRIORITY=( multilib:.* \1 )/' /etc/slackpkg/slackpkgplus.conf
  else
    sed -i -r -e 's/^(REPOPLUS=.*)$/PKGS_PRIORITY=( multilib:.* )\n\1/' /etc/slackpkg/slackpkgplus.conf
  fi
  sed -i -r -e 's|^(REPOPLUS=.*)$|\1\n'"$MULTILIBREPO|" /etc/slackpkg/slackpkgplus.conf
  sed -i.backup -r -e 's/^(\[0-9\]\+compat32)$/\#\1/' /etc/slackpkg/blacklist
  echo "slackpkg+ is now configured for multilib support."
  echo "Do you want install then multilib now? (y/N)"
  read ANS
  if [ "$ANS" == "y" -o "$ANS" == "Y" ];then
    slackpkg update
    slackpkg upgrade multilib
    slackpkg install multilib
    echo "Multilib installed"
  else
    echo "To install multilib type:"
    echo "# slackpkg update"
    echo "# slackpkg upgrade gcc glibc"
    echo "# slackpkg remove multilib"
  fi
  echo "To keep multilib updated, simply type:"
  echo "# slackpkg upgrade-all"
  if [ "$SVER" == "current" ];then
    echo "Remember... When you see NEW packages with 'slackpkg install-new' command,"
    echo "you may need to install the related multilib package"
  fi
  exit 0
else
  echo "Aborted"
  exit 1
fi

please, test it before slackware 14.1 is released!

zerouno 10-28-2013 06:46 AM

rc3 released

Raveriux 10-28-2013 07:37 AM

Quote:

Originally Posted by zerouno (Post 5053626)
rc3 released

with code name "zerouno strikes again" :D

zerouno 11-06-2013 05:02 AM

Can someone test that patch before I insert it in slackpkg+ (that is rc)

Code:

--- zdialogplus.sh    2013-11-06 10:34:21.831730648 +0100
+++ zdialogplus.sh      2013-11-06 11:51:05.902978757 +0100
@@ -26,9 +26,21 @@
                        for i in $1; do
                                BASENAME=$(cutpkg $i)
                                PKGFOUND=$(grep -m1 -e "^${BASENAME}-[^-]\+-\(noarch\|fw\|${ARCH}\)" $TMPDIR/tmplist)
+                              PKGCURRVER=$(echo $i|rev|cut -f3- -d-|rev|sed 's/-/ /g')
+                              PKGFOUNDVER=$(echo $PKGFOUND|rev|cut -f3- -d-|rev|sed 's/-/ /g')
+                              ONOFFTMP=off
+                              if [ $(echo -e "$PKGCURRVER\n$PKGFOUNDVER"|sort -n|md5sum|awk '{print $1}') == $(echo -e "$PKGCURRVER\n$PKGFOUNDVER"|md5sum|awk '{print $1}') ];then
+                                NEWER="OLD"
+                              else
+                                NEWER="NEW"
+                                if [ "$ONOFF" == "on" ];then
+                                  ONOFFTMP=on
+                                fi
+                              fi
+
                                REPOPOS=$(grep -m1 " $(echo $i|sed 's/\.t.z//') "  $TMPDIR/pkglist|awk '{print $1}'|sed 's/SLACKPKGPLUS_//')
 
-                              echo "$i \"$REPOPOS\" $ONOFF \"currently installed: $PKGFOUND\"" >>$TMPDIR/dialog.tmp
+                              echo "$i \"($NEWER) $REPOPOS\" $ONOFFTMP \"currently installed: $PKGFOUND\"" >>$TMPDIR/dialog.tmp
                        done
                        HINT="--item-help"
                else
@@ -52,7 +64,7 @@
                        awk '{ NF=3 ; print $0 }' $TMPDIR/dialog2.tmp > $TMPDIR/dialog.tmp
                        HINT=""
                fi
-              cat $TMPDIR/dialog.tmp|xargs dialog --title $2 --backtitle "slackpkg $VERSION" $HINT --checklist "Choose packages to $2:" 19 70 13 2>$TMPDIR/dialog.out
+              cat $TMPDIR/dialog.tmp|xargs dialog --title $2 --backtitle "slackpkg $VERSION" $HINT --checklist "Choose packages to $2:" 19 75 17 2>$TMPDIR/dialog.out
                case "$?" in
                        0|123)
                                dialog --clear


the results should be:
Code:

┌────────────────────────────────upgrade──────────────────────────────────┐
│ Choose packages to upgrade:                                            │ 
│ ┌─────────────────────────────────────────────────────────────────────┐ │ 
│ │  [ ] chromium-30.0.1599.66-x86_64-1sl.txz          (OLD) slacky    │ │ 
│ │[*] libreoffice-4.1.3-x86_64-1alien.txz            (NEW) alienbob  │ │ 
│ │[*] libreoffice-l10n-it-4.1.3-x86_64-1alien.txz    (NEW) alienbob  │ │ 
│ │[*] libreoffice-mozplugin-4.1.3-x86_64-1alien.txz  (NEW) alienbob  │ │ 
│ │  [ ] libvdpau-0.5-x86_64-1sl.txz                    (OLD) slacky    │ │ 
│ │  [ ] tightvnc-1.3.10-x86_64-1gv.txz                (OLD) salixos  │ │ 
│ │                                                                    │ │ 
│ │                                                                    │ │ 
│ │                                                                    │ │ 
│ │                                                                    │ │ 
│ │                                                                    │ │ 
│ │                                                                    │ │ 
│ │                                                                    │ │ 
├─│                                                                    │─┤ 
│ └───────────────────<  OK  >───────────<Cancel>───────────────────────┘ │ 
└─────────────────────────────────────────────────────────────────────────┘

slackpkg TRY to detect if the package is newer of the installed package (may fail) and deselect it by default if it is older.

detection may fail on packages as 1.2 vs. 1.12 ( 2 is alphabetically after 12; that problem may be partially solved in a future review).
I may decide to disallow the check if it is from the official slackware repository.

Raveriux 11-06-2013 05:09 AM

Maybe better aproach would be to write somewhere in the dialog "installed: version". or not?

Alien Bob 11-06-2013 05:13 AM

Please do not add version comparison checks to the script, or at least leave it disabled by default when you add this.

Your change to the script goes against the way Slackware looks at package upgrades: Slackware does not care if a version is older or newer. That is a strength, not a weakness. Just like the lack of dependency checks is a strength, not a weakness.

Also you will not be able to be 100% accurate on version checks.
Suppose a developer releases a beta version of his software and calls the version "1.0b". Then he releases his stable release and calls it "1.0". Your algorithm would incorrectly consider "1.0b" as a higher version than "1.0".

Eric

zerouno 11-06-2013 05:21 AM

The user can see the version in the last line of screen.
Insert the version inline enlarge the dialog out-of-screen (you must put also the build version), and the user must to check manually all packages listed.

I already tried it.

(however the patch contains a bug ;) )

Code:

│ │[ ] chromium-30.0.1599.66-x86_64-1sl.t(31.0.1608.1-x86_64-1i7sl) slac│ │
│ │[ ] libvdpau-0.5-x86_64-1sl.txz      (0.7-x86_64-1i7sl) slacky      │ │
│ │[*] tightvnc-1.3.10-x86_64-1gv.txz    (1.3.10-x86_64-1) salixos      │ │

or
Code:

│ │[*] chromium-30.0.1599.66-x86_64-1sl.txz  (31.0.1608.1) slacky    │ │
│ │  [ ] libvdpau-0.5-x86_64-1sl.txz          (0.7) slacky            │ │
│ │[*] tightvnc-1.3.10-x86_64-1gv.txz        (1.3.10) salixos        │ │

note that tightvnc differs only for build version.

zerouno 11-06-2013 05:28 AM

Quote:

Originally Posted by Alien Bob (Post 5059260)
Please do not add version comparison checks to the script, or at least leave it disabled by default when you add this.

I will add an entry in slackpkgplus.conf

Quote:

Your change to the script goes against the way Slackware looks at package upgrades: Slackware does not care if a version is older or newer. That is a strength, not a weakness. Just like the lack of dependency checks is a strength, not a weakness.
Quote:

Originally Posted by zerouno
I may decide to disallow the check if it is from the official slackware repository.

yes, some slackware upgrades are 'downgrade' ;)

Quote:

Also you will not be able to be 100% accurate on version checks.
I will try to increase the accuratation, but I may add an entry in slackpkgplus.conf that does not de-check by default then package if it is older.

Quote:

Suppose a developer releases a beta version of his software and calls the version "1.0b". Then he releases his stable release and calls it "1.0". Your algorithm would incorrectly consider "1.0b" as a higher version than "1.0".
yes, is better in a future beta and/or in a development branch. The rc is freezed.

ruario 11-06-2013 05:38 AM

Quote:

Originally Posted by zerouno (Post 5059274)
I will add an entry in slackpkgplus.conf

IMHO, You would be better off just not doing it, so that slackpkg+ is not wildly different from the other Slackware tools.

gegechris99 11-06-2013 06:01 AM

Quote:

Originally Posted by ruario (Post 5059278)
IMHO, You would be better off just not doing it, so that slackpkg+ is not wildly different from the other Slackware tools.

+1. slackpkg+ is a very useful addition to any Slacker's toolbox. It fits perfectly with the KISS philosophy of the distro.

So when listing potential upgrades, just let the user decide what to upgrade.

My 2 cts.

zerouno 11-06-2013 06:33 AM

changes discharged!


I was thinking for a method, even without the autodeselect and only for third-party repositories, to show the user quickly if a third-party package is newer or older without having to compare one by one, and maybe leave him choose to install or not.

In practice I have, in my system, a series of packages that are newer than those found in the configured repositories, and each upgrade-all I get that packages listed.
I do not blacklist them because I would have no more any update notifications, but in the meantime I have to deselect them every time.

And when there are big updates (today I've updated ktown) it can miss to deselect one, so start a downgrade.


But evidently the functionality should be thought best to reduce the intrusiveness and maintain the philosophy of slackware.

kikinovak 11-06-2013 07:13 AM

@zerouno: slackpkg+ is just perfect as is. As far as I'm concerned, you should be given a "Handy Slackware Tool Of The Year Award" for it. Anyway, I've added a big THANK YOU note in my repository (http://www.microlinux.fr/slackware/README.txt).

The only thing that's left to do is correct a few typos, but that's all.

Keep up the good work.

Niki


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