LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-21-2020, 06:49 PM   #1
budrz89
Member
 
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 99

Rep: Reputation: Disabled
Question Reinstall package if upgrading only a dependency


Hi,

Maybe this is a noob question but I am still curious: if I only needed to upgrade a dependency of a package, would I have to reinstall that particular package for changes to be put into effect? For example, I need to upgrade NSS for security reasons but FireFox depends on NSS, so would I need to reinstall FireFox?

I'm not sure if I fully understand how dependencies work but in my mind, if there are problems/holes in a dependency, wouldn't that imply the same for the other package that depends on it? Or are they separate entities and all links/paths immediately get updated?

I should probably know the answer to this question as I have a suspicion that I wouldn't have to reinstall the other package, but I am not confident in my reasoning and would like to check with someone who knows as I am still learning.

Last edited by budrz89; 05-21-2020 at 06:53 PM. Reason: For clarification
 
Old 05-22-2020, 02:44 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
It depends. Sometimes, e.g. when the soname of a library changes you'll need to rebuild all the packages depending on that library.

This is where the difference between LFS and a distro relying on a package management system really comes to light. Such systems conventionally record versioned dependencies into the package and will force you to reinstall dependent packages if needed. OTOH, in LFS you're on your own. You'll need to investigate yourself what has changed in NSS and how it can affect its compatibility with your Firefox build. A simple security fix most probably won't.

That said, rebuilding Firefox won't hurt. You'll stay on the safe side this way, and it's an piece of software that needs to be updated frequently anyway. But this can quickly become a royal PITA when a library like Glibc that a lot of stuff depends on, gets an upgrade.
 
Old 05-22-2020, 04:20 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Quote:
Originally Posted by budrz89 View Post
I'm not sure if I fully understand how dependencies work but in my mind, if there are problems/holes in a dependency, wouldn't that imply the same for the other package that depends on it? Or are they separate entities and all links/paths immediately get updated?
If it's a library (and most dependencies are libraries), it works through two symbolic links. There is libfoo.so (the linkname) and that is what the program is actually built against. libfoo.so points to libfoo.so.x (the soname), which in turn points to the actual library libfoo.so.x.y.z. So as long as x doesn't change (i.e. it's not a new major version), the linkname doesn't need to be updated.
 
Old 05-22-2020, 04:21 AM   #4
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by budrz89 View Post
For example, I need to upgrade NSS for security reasons but FireFox depends on NSS, so would I need to reinstall FireFox?
That, in fact, is a bad example as Firefox contains its own internal nss, so is not dependant on the nss package. And in fact most nss updates do not force recompilations as their API is consistent, you just replace the new package only.

But as sometone else already remarked: if the MAJOR version of a .so file changes, i.e. from .so.42 to .so.43 then you will have to recompile everything that depends ON that .so library.
 
Old 05-22-2020, 08:41 AM   #5
budrz89
Member
 
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 99

Original Poster
Rep: Reputation: Disabled
Thanks guys, that was informative!

After writing that post and thinking about it later, I figured it would depend on the package because some packages require a re-installation like shadow or harfbuzz. But as shruggy said, in LFS you're on your own which is why I had to ask to double check.

@ehartman, it was a bad example, maybe harfbuzz and freetype or shadow and linux-pam would of been better examples.
 
  


Reply



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] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
how can i see all the dependency package of on package wakkana12 Slackware 6 12-25-2009 10:44 PM
To reinstall or not to reinstall...that's the question.. minike Slackware 3 09-17-2005 06:24 PM
reinstall windows, reinstall GRUB too? leupi Linux - Software 1 05-07-2005 10:50 AM
can reinstall the rpm package without delete the rpm package eye Red Hat 1 10-20-2003 07:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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