LinuxQuestions.org
Visit Jeremy's Blog.
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 01-25-2014, 05:34 PM   #1
Holering
Member
 
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197

Rep: Reputation: 22
Unhappy UPGRADEPKG doesn't overwrite and replace old libraries and links?


Recently downgraded Glibc to a previous version with upgradepkg --reinstall and had a lot of libraries and links from the removed package left intact (in /lib64/). Ended up getting errors from coreutils, file, and other common programs that use glibc (GLIBC_2.XX not found). Was able to fix by booting from slackware dvd and manually removing the old ld-2.xx.so files and fixing the broken links by hand (very time consuming). Errors and problems went away.

Apparently upgradepkg didn't completely remove the package and replace it with the one I chose to install. Why is that?

I'm bothered by this encounter since I normally bootstrap my system when doing a major software change (like changing glibc version and/or kernel-headers). Basically I recompile and re-install every package in 3 passes.

Was this an unlucky encounter due to the fact Glibc is pretty much the most critical dependency and upgradepkg is overly sensitive to this particular package? Or does upgradepkg not overwrite previous files even if they're the same? If they're different files that belong to the removed package, why were they not removed and links replaced-updated?

Have I been bootstrapping my system in vain with upgradepkg, always having old links and libraries left intact with all other packages?

Regards

Last edited by Holering; 01-25-2014 at 05:38 PM.
 
Old 01-25-2014, 05:39 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116
A package you should never attempt to downgrade is glibc, but you've noticed as much...
Instant death for the system.

Eric
 
4 members found this post helpful.
Old 01-25-2014, 06:13 PM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
Blog Entries: 15

Rep: Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117
Glibc is a hard and locked dependency in GNU/Linux and usually it's only upgraded through a major near-to-full distribution rebuild against it. Even a small update in glibc can break many packages. When glibc-2.18 was released, many existing packages that worked fine with glibc-2.17 required various sed edits and patch files, and still do to some extent to build against 2.18. I don't think Patrick has upgraded to 2.18 either due to the amount of edits, patches, and rebuilds required against it.

When I've seen Slackware update glibc in the past, it's usually accompanied by a huge update of various core system packages, a new Linux kernel, glibc-kernel-headers, and any other packages found to be broken against the new glibc.

As Eric pointed out, unless you absolutely know what you're doing, never touch glibc or the glibc-kernel-headers... Ever. And downgrading any core system package in a GNU/Linux distribution is never recommended.

Last edited by ReaperX7; 01-25-2014 at 06:14 PM.
 
3 members found this post helpful.
Old 01-25-2014, 07:03 PM   #4
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Also the glibc package is designed to not uninstall as it drops the libs in a different directory and then moves them into place, pkgtools simply does not handle those file moves so the package can not be removed.
 
4 members found this post helpful.
Old 01-25-2014, 08:50 PM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
Blog Entries: 15

Rep: Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117
Even the LFS books state very clearly, you can roughly update about everything in LFS minus glibc. If you upgrade glibc it's best to just rebuild LFS, or you'll have issues. If that book says no, on any other distribution it means the same thing.

Last edited by ReaperX7; 01-25-2014 at 08:59 PM.
 
2 members found this post helpful.
Old 01-26-2014, 01:26 AM   #6
Holering
Member
 
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by wildwizard View Post
Also the glibc package is designed to not uninstall as it drops the libs in a different directory and then moves them into place, pkgtools simply does not handle those file moves so the package can not be removed.
Okay, so what happens if I don't change glibc versions but re-install it after compiling? Will it replace all the libraries with the ones I recompiled?

What about other library packages; if there's a version update to Glib2, will the old libraries and links be replaced with new ones, or will upgradepkg just ignore them all and install the new ones on the side?

Appreciate the responses.

EDIT:
Compared date of /var/log/packages/packagename with package library file and they match. So old libraries do get replaced when re-installing the same package. The links however, did not get re-created it seems (date was from older package date) though they point to the same file anyway (the actual file is different which is what matters).

I'm going to run a script maybe, from another forum member (grapefruitgirl). It checks for broken links and files that don't belong to any installed package. Think this would be useful for custom Slackware setups; also because upgradepkg doesn't seem to re-create links.

So as everyone pretty much told me, upgradepkg doesn't handle glibc downgrades without borking the system...

Glibc is the most critical library for anything to function (kind of how the kernel is important). Should've known that before blaming upgradepkg. Stupid me!

Last edited by Holering; 01-26-2014 at 06:29 AM.
 
Old 01-26-2014, 03:08 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
Ordinarily, upgradepkg will overwrite any existing items even if they are the same. But, if you really used this syntax:
"downgraded Glibc to a previous version with upgradepkg --reinstall"
'reinstall' will do nothing unless the version is the same.
 
Old 01-26-2014, 07:33 AM   #8
genss
Member
 
Registered: Nov 2013
Posts: 747

Rep: Reputation: Disabled
it is a quite peculiar problem

http://www.tldp.org/FAQ/Linux-FAQ/sy...hough-trashing
 
  


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
Slack: script to detect orphaned libraries, broken lib links, missing dependencies GrapefruiTgirl Slackware 69 10-13-2019 04:39 PM
symbolic links - error while loading shared libraries mroost Linux - Newbie 6 11-30-2009 07:43 AM
Thunderbird doesn't open links johnerskine SUSE / openSUSE 4 03-15-2005 11:08 AM
links ... doesn't work vwal_13 Slackware 6 04-14-2004 09:34 AM
Search and replace links xtrude Linux - Newbie 4 01-29-2003 12:55 PM

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

All times are GMT -5. The time now is 09:01 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
Open Source Consulting | Domain Registration