LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-13-2018, 08:17 AM   #1
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,427

Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
Question How and When to removepkg in -current


All --

There were numerous Removed Packages in this morning's -current ChangeLog ( below )

I don't use an advanced Package Manager so I intend to `removepkg` then `upgradepkg --install-new` the other Upgraded Packages.

Opinions wanted: is that the best way to go about it ( remove first then upgrade ) ?

Thanks !

-- kjh

These are the Removed Packages from last night:

Code:
# gawk -F ':' '{ if ( match( $1, /^+-----*+/ )){ exit( 0 ) } ; if ( ! match( $2, / *Removed/ )){ next } ; Pkg = $1 ; gsub( /^[a-z][a-z]*\//, "", Pkg ) ; gsub( /.txz$/, "",Pkg ) ; print "  removepkg " Pkg " \t\t# " $1 }' ChangeLog.txt

  removepkg bigreqsproto-1.1.2-noarch-1                 # x/bigreqsproto-1.1.2-noarch-1.txz
  removepkg compositeproto-0.4.2-noarch-1               # x/compositeproto-0.4.2-noarch-1.txz
  removepkg damageproto-1.2.1-noarch-1          # x/damageproto-1.2.1-noarch-1.txz
  removepkg dmxproto-2.3.1-noarch-1             # x/dmxproto-2.3.1-noarch-1.txz
  removepkg dri2proto-2.8-x86_64-2              # x/dri2proto-2.8-x86_64-2.txz
  removepkg dri3proto-1.0-x86_64-2              # x/dri3proto-1.0-x86_64-2.txz
  removepkg evieext-1.1.1-noarch-1              # x/evieext-1.1.1-noarch-1.txz
  removepkg fixesproto-5.0-x86_64-2             # x/fixesproto-5.0-x86_64-2.txz
  removepkg fontcacheproto-0.1.3-noarch-1               # x/fontcacheproto-0.1.3-noarch-1.txz
  removepkg fontsproto-2.1.3-noarch-1           # x/fontsproto-2.1.3-noarch-1.txz
  removepkg glproto-1.4.17-noarch-1             # x/glproto-1.4.17-noarch-1.txz
  removepkg inputproto-2.3.2-noarch-1           # x/inputproto-2.3.2-noarch-1.txz
  removepkg kbproto-1.0.7-noarch-1              # x/kbproto-1.0.7-noarch-1.txz
  removepkg presentproto-1.1-x86_64-1           # x/presentproto-1.1-x86_64-1.txz
  removepkg printproto-1.0.5-noarch-1           # x/printproto-1.0.5-noarch-1.txz
  removepkg randrproto-1.5.0-noarch-1           # x/randrproto-1.5.0-noarch-1.txz
  removepkg recordproto-1.14.2-noarch-1                 # x/recordproto-1.14.2-noarch-1.txz
  removepkg renderproto-0.11.1-noarch-1                 # x/renderproto-0.11.1-noarch-1.txz
  removepkg resourceproto-1.2.0-noarch-1                # x/resourceproto-1.2.0-noarch-1.txz
  removepkg scrnsaverproto-1.2.2-noarch-1               # x/scrnsaverproto-1.2.2-noarch-1.txz
  removepkg videoproto-2.3.3-noarch-1           # x/videoproto-2.3.3-noarch-1.txz
  removepkg xcmiscproto-1.2.2-noarch-1          # x/xcmiscproto-1.2.2-noarch-1.txz
  removepkg xextproto-7.3.0-x86_64-2            # x/xextproto-7.3.0-x86_64-2.txz
  removepkg xf86bigfontproto-1.2.0-noarch-1             # x/xf86bigfontproto-1.2.0-noarch-1.txz
  removepkg xf86dgaproto-2.1-noarch-1           # x/xf86dgaproto-2.1-noarch-1.txz
  removepkg xf86driproto-2.1.1-noarch-1                 # x/xf86driproto-2.1.1-noarch-1.txz
  removepkg xf86miscproto-0.9.3-noarch-1                # x/xf86miscproto-0.9.3-noarch-1.txz
  removepkg xf86vidmodeproto-2.3.1-noarch-1             # x/xf86vidmodeproto-2.3.1-noarch-1.txz
  removepkg xineramaproto-1.2.1-noarch-1                # x/xineramaproto-1.2.1-noarch-1.txz
  removepkg xproto-7.0.31-noarch-1              # x/xproto-7.0.31-noarch-1.txz
 
Old 03-13-2018, 08:35 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,632

Rep: Reputation: Disabled
Caveat: I don't run slackware-current at the moment.

I don't think that the order matters.

To feel 100% safe I would just do that in runlevel 3 and check that all updates be successfull before starting X again. If I understand well xorg-proto xorgproto replaces all the other X prototype packages.

Last edited by Didier Spaier; 03-13-2018 at 09:11 AM.
 
2 members found this post helpful.
Old 03-13-2018, 08:42 AM   #3
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,427

Original Poster
Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
Quote:
Originally Posted by Didier Spaier View Post
Caveat: I don't run slackware-current at the moment.

I don't think that the order matters.

To feel 100% safe I would just do that in runlevel 3 and check that all updates be successfull before starting X again. If I understand well xorg-proto replaces all the other X prototype packages.
Thanks for input and a BIG THANKS for the runlevel 3 reminder Didier Spaier !

While I always do X-related updates from a runlevel 3 session, it sure is helpful to spell it out in this thread !

-- kjh
 
1 members found this post helpful.
Old 03-13-2018, 08:55 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,632

Rep: Reputation: Disabled
I mistakenly wrote xorg-proto instead of xorgproto, sorry.

And while I am at it, as I am a big fan of sed:
Code:
sed -n '
/Removed/{
    s@.*/@@
    s/.txz.*//p
}
/+--/q
' ChangeLog.txt > to_be_removed

Last edited by Didier Spaier; 03-13-2018 at 09:12 AM. Reason: typo, again!
 
1 members found this post helpful.
Old 03-13-2018, 08:58 AM   #5
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,427

Original Poster
Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
Quote:
Originally Posted by Didier Spaier View Post
I mistakenly wrote xorg-proto instead of xorg-pro, sorry.

And while I am at it, as I am a big fan of sed:
Code:
sed -n '
/Removed/{
    s@.*/@@
    s/.txz.*//p
}
/+--/q
' ChangeLog.txt > to_be_removed
No worries

Very nice script, Didier Spaier !

Thanks again !

-- kjh
 
Old 03-13-2018, 09:14 AM   #6
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 357

Rep: Reputation: 205Reputation: 205Reputation: 205
They are just header files, only needed when compiling X stuff. So you don't need to exit X or change runlevels. Just don't compile X programs during the upgrade...
 
2 members found this post helpful.
Old 03-13-2018, 09:22 AM   #7
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,427

Original Poster
Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
Quote:
Originally Posted by Petri Kaukasoina View Post
They are just header files, only needed when compiling X stuff. So you don't need to exit X or change runlevels. Just don't compile X programs during the upgrade...
Good info Petri Kaukasoina.

I'll go ahead rebuild SBo System/xrdp and neutrinolabs/xorgxrdp 'just in case'.

Thank you !

-- kjh
 
Old 03-13-2018, 09:37 AM   #8
shevegen
Member
 
Registered: May 2004
Distribution: Slackware / GoboLinux / LFS / VoidLinux
Posts: 107

Rep: Reputation: 22
On a side note, does anyone know why slackware
removed the various proto packages recently?

Example:

http://www.slackware.com/changelog/c...php?cpu=x86_64

"x/bigreqsproto-1.1.2-noarch-1.txz: Removed.
x/compositeproto-0.4.2-noarch-1.txz: Removed.
x/damageproto-1.2.1-noarch-1.txz: Removed."

etc...
 
Old 03-13-2018, 10:11 AM   #9
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
kjh, I would always add and upgrade before removing.

If the upgrade procedure needs something that is being replaced, you want to have the new stuff installed before you remove the old stuff, otherwise the upgrade procedure will break and you won't be able to complete it.

Exactly the same considerations apply whether you're doing it manually or otherwise, hence the standard slackpkg rigmarole:

slackpkg update ; slackpkg install-new ; slackpkg upgrade-all ; slackpkg clean-system


Meanwhile:

Quote:
Originally Posted by shevegen View Post
On a side note, does anyone know why slackware
removed the various proto packages recently?
The answer is right there in the ChangeLog. They're all now bundled up into one package.

Code:
x/xorgproto-2018.4-x86_64-1.txz:  Added.
 
2 members found this post helpful.
Old 03-13-2018, 10:24 AM   #10
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,427

Original Poster
Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
Quote:
Originally Posted by 55020 View Post
kjh, I would always add and upgrade before removing.

If the upgrade procedure needs something that is being replaced, you want to have the new stuff installed before you remove the old stuff, otherwise the upgrade procedure will break and you won't be able to complete it.

Exactly the same considerations apply whether you're doing it manually or otherwise, hence the standard slackpkg rigmarole:

slackpkg update ; slackpkg install-new ; slackpkg upgrade-all ; slackpkg clean-system
Thanks 55020 !

Your logic makes perfect sense.

All done now via a remote ssh session ( with the box booted at runlevel 3 ).

I did rebuild xrdp and xorgxrdp -- they recompiled and run fine although I am not sure the Removed Packages and the new xorgproto Package had any effect on them.

I am able to log into KDE via RDesktop and at the Console via startx so ... [SOLVED] !

Quote:
Originally Posted by 55020 View Post
Meanwhile:

The answer is right there in the ChangeLog. They're all now bundled up into one package.

Code:
x/xorgproto-2018.4-x86_64-1.txz:  Added.
Thanks ... while I did see the new xorgproto Package, you saved me a ton of google-time

EDIT: P.S. I meant to link this: https://www.archlinux.org/packages/extra/any/xorgproto/ from the Arch Site.

And as always, thanks to all who replied.

-- kjh

Last edited by kjhambrick; 03-13-2018 at 10:32 AM. Reason: add p.s.
 
Old 03-13-2018, 11:04 AM   #11
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,474

Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
To feel 100% safe I would just do that in runlevel 3 and check that all updates be successfull before starting X again. If I understand well xorg-proto xorgproto replaces all the other X prototype packages.
This is not required. This function someone else (I don't recall who) posted here at LQ a while ago should report any stale pids from programs that have been upgraded and not restarted.

Code:
stale-pids () 
{ 
    if [ "$1" = '-v' ]; then
        find -H /proc/{1..9}*/map_files -type l -ilname '*lib*.so* (deleted)' -printf '%h %l\n' 2> /dev/null | sed -e 's|/proc/||;s|/map_files||';
    else
        find -H /proc/{1..9}*/map_files -type l -ilname '*lib*.so* (deleted)' -printf '%h\n' 2> /dev/null | cut -f3 -d'/';
    fi | sort -u | grep --color=auto -F ''
}
Edit: Fixed the function which didn't paste correctly...

Additionally even if something like xorg is upgraded, the old xorg session should still mostly work and if this worries anyone closing the xorg session and starting a new one should resolve this.

Last edited by orbea; 03-13-2018 at 11:22 AM.
 
1 members found this post helpful.
Old 03-13-2018, 11:19 AM   #12
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,427

Original Poster
Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
Thanks for the very useful stale_pids() function, orbea !

-- kjh
 
Old 03-13-2018, 11:23 AM   #13
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,474

Rep: Reputation: Disabled
I didn't paste it correctly unfortunately so I updated my post.
 
Old 03-13-2018, 11:25 AM   #14
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,632

Rep: Reputation: Disabled
Quote:
Originally Posted by 55020 View Post
If the upgrade procedure needs something that is being replaced, you want to have the new stuff installed before you remove the old stuff, otherwise the upgrade procedure will break and you won't be able to complete it.
Isn't that the purpose of the pre-installation in /sbin/upgradepkg?

I just realized that it can be done twice (before and after the removal of the old package)

Here is the end of upgradepkg, on Slackware version 14.2:
Code:
  # Print a banner for the current upgrade:
  cat << EOF

+==============================================================================
| Upgrading $OLD package using $INCOMINGDIR/$NNAME
+==============================================================================

EOF

  # Next, the new package is pre-installed:
  if [ "$VERBOSE" = "verbose" ]; then
    /sbin/installpkg $INCOMINGDIR/$NNAME
    RETCODE=$?
  else
    echo "Pre-installing package $NEW..."
    /sbin/installpkg $INCOMINGDIR/$NNAME 1> /dev/null
    RETCODE=$?
  fi
  # Make sure that worked:
  if [ ! $RETCODE = 0 ]; then
    echo "ERROR:  Package $INCOMINGDIR/$NNAME did not install"
    echo "correctly.  You may need to reinstall your old package"
    echo "to avoid problems.  Make sure the new package is not"
    echo "corrupted."
    sleep 30
    # Skip this package, but still try to proceed.  Good luck...
    continue;
  fi

  # Now, the leftovers from the old package(s) can go.  Pretty simple, huh? :)
  for rempkg in "$ROOT/var/log/packages/"*"-$TIMESTAMP"; do
    if [ "$VERBOSE" = "verbose" ]; then
      /sbin/removepkg "${rempkg##*/}"
    else
      /sbin/removepkg "${rempkg##*/}" | grep -v 'Skipping\.\|Removing files:'
    fi
  done
  echo

  # Again!  Again!
  # Seriously, the reinstalling of a package can be crucial if any files
  # shift location, so we should always reinstall as the final step:
  if [ ! "$NOT_PARANOID" = "true" ]; then
    /sbin/installpkg $INCOMINGDIR/$NNAME
  fi

  echo "Package $OLD upgraded with new package $INCOMINGDIR/$NNAME."
  ERRCODE=0
done

if [ ! "$DRY_RUN" = "true" ]; then
  echo
fi
exit $ERRCODE
Isn't this enough to make order of commands unimportant?
 
Old 03-13-2018, 12:43 PM   #15
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
But Didier, upgradepkg can't do that dance when the 'old' packages have already been removed

Quote:
Originally Posted by kjhambrick View Post
I intend to `removepkg` then `upgradepkg --install-new` the other Upgraded Packages.
 
  


Reply


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
[SOLVED] current: removepkg fails to remove all files from kbd-1.15.3 package aaazen Slackware 14 09-16-2016 02:15 PM
Removepkg pkgtools and removepkg tar problem.. pepe41695 Linux - Newbie 3 08-26-2013 05:11 AM
removepkg behavior rvo Slackware 8 01-15-2009 04:19 PM
RemovePkg Recursively? Kenji Miyamoto Slackware 3 05-23-2005 09:33 AM
removepkg alternative props666999 Slackware 2 11-10-2004 01:10 AM

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

All times are GMT -5. The time now is 09:21 PM.

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