Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-25-2014, 05:34 PM
|
#1
|
Member
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197
Rep:
|
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.
|
|
|
01-25-2014, 05:39 PM
|
#2
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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.
|
01-25-2014, 06:13 PM
|
#3
|
LQ Guru
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
|
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.
|
01-25-2014, 07:03 PM
|
#4
|
Member
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875
|
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.
|
01-25-2014, 08:50 PM
|
#5
|
LQ Guru
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
|
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.
|
01-26-2014, 01:26 AM
|
#6
|
Member
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197
Original Poster
Rep:
|
Quote:
Originally Posted by wildwizard
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.
|
|
|
01-26-2014, 03:08 AM
|
#7
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928
|
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.
|
|
|
01-26-2014, 07:33 AM
|
#8
|
Member
Registered: Nov 2013
Posts: 747
Rep:
|
|
|
|
All times are GMT -5. The time now is 09:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|