Is holding packages with APT or Synaptic recursive?
DebianThis forum is for the discussion of Debian 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.
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.
Location: In a Fascist nightmare that used to be the USA. Said Fascist nightmare currently infiltrating the Internet, my other place of residence.
Distribution: Debian 10 (only to run Blender), Devuan Chimaera (for everything else)
Posts: 46
Rep:
Is holding packages with APT or Synaptic recursive?
Hello.
-Running an older computer, with Debian Squeeze Stable, using the older kernel (2.35, as I recall) with a "package hold" in Synaptic, since I need to keep it to use an Nvidia legacy driver. The driver is also under a "package hold", since I need it for an old graphics card. I pinned the kernel because the legacy driver absolutely is not supported by the newer kernels. However, now I have 53 updates in Update Manager, tugging at my sleeve. I have not installed them yet, because I don't know if they will wreck this system. With the older kernel and driver, it's a kluge, but it works, and does what I need it to do, so I don't want to wreck it.
I have googled (unsuccessfully) and read "man pages", and APT how-tos, and Synaptic how-tos, for several hours, and can't find the answer to this set of questions:
When a package is under "package-hold" in APT, does it also put a "hold" on the _dependencies of_ the held package? -Or will the dependencies be upgraded without touching the held package, but thus possibly cutting functionality of the held package, and wrecking the system?
Also, will APT / Synaptic prevent the upgrade of packages that _depend on_ the held packages? -Like, could APT install a newer version of an application that depends on a newer kernel to work, and thus make the app unusable?
In short, is putting a package on "hold" an automatically recursive operation, in either, or both, directions?
OR... do I need to go down the list of depends, and "hold package" for each of them? -And if so, do I then need to put a "hold package" on any depends of the depends, etc.?
AND... would I then need to go through the system, and figure out what programs depend on the held packages, and then hold them as well, and so on? Like any sane person, I don't want to fight that Hydra if I don't have to. -Unless APT will do it for me!
Any input, or leads, would be much appreciated. Thanks!
Location: In a Fascist nightmare that used to be the USA. Said Fascist nightmare currently infiltrating the Internet, my other place of residence.
Distribution: Debian 10 (only to run Blender), Devuan Chimaera (for everything else)
Posts: 46
Original Poster
Rep:
Thanks, craigevil!
It doesn't directly answer my question, but that was a useful exercise, I think. No giant warnings or errors came up during the sim, so I guess I could reasonably expect that to succeed for real.
I laughed when I read your last bit. So, Synaptic ignores dpkg holds, and apt-get ignores Synaptic holds. Does dpkg ignore apt holds? I suppose that much symmetry is too much to ask for. Scissors, paper, rock?
So, I just went through with the upgrade for real, and no obvious problems so far. Apparently successful -(turns out it was mostly OpenOffice upgrades and security fixes to libraries). I think I'll leave off marking the post solved, though, since I'm still curious about that aspect of "hold package". Your info allowed me to make an educated guess, and it worked, but I'd really like to know how holds are handled by those programs, and how much cascading occurs. No idea how a different set of upgrades that were more directly connected to the held packages would work.
-But for now, I'm toddling on about my business! Thank you!
There seems to be a general misunderstanding here. You are running Debian Stable. Version numbers, including the kernel version, will never change in Debian Stable. So there is no need to hold back kernel updates, in fact it only leaves you with unfixed security holes.
hold is a status flag that tells the package manager to not automatically upgrade a package. To hold a package 'echo $package hold|dpkg --set-selections' or 'aptitude hold $package'. Note that "aptitude hold" is ignored by other package managers (i.e. Update Manager, synaptic, apt-get) and aptitude won't necessarily use holds set with dpkg; see Debian bug #137771.
unhold
echo packagename install | dpkg --set-selections, or "aptitude unhold packagename" if the package is held in aptitude
Although as already pointed out not much of a reason when running Stable to mess with putting anything on hold.
Location: In a Fascist nightmare that used to be the USA. Said Fascist nightmare currently infiltrating the Internet, my other place of residence.
Distribution: Debian 10 (only to run Blender), Devuan Chimaera (for everything else)
Posts: 46
Original Poster
Rep:
Thanks for the replies; sorry I took so long to respond.
TobiSGD, are you saying that Debian Stable will not upgrade the kernel once I have chosen it, or are you telling me to go ahead and let the kernel upgrade? I have let that happen back when I ran Ubuntu, and was offered newer kernels by Synaptic. I let it upgrade, got a newer kernel, and it broke functionality of my legacy drivers, more than once. That's why I have the holds in place. I'm dealing with end-of-useful-hardware-life problems. That older kernel and driver is my hardware's non-negotiable demand.
My question is about whether Synaptic (or Update Manager) will respect this choice, and not upgrade me right out of having OK graphics. Must I also hold the depends of these held packages, or will Synaptic "see" the holds, and not change anything that might break the held packages? -And in the other direction, if I have apps that work fine with the older kernel and drivers, will APT / Synaptic / Update Manager refuse to upgrade to versions that require newer kernel and drivers than I have, due to the hold?
I have a fine new example of the sort of thing I'm talking about. Update Manager shows me a "libgl1-nvidia-alternatives" package. The version goes from 195.36.31-6 to 195.46.31-6squeeze2, and it's described as a security patch. -But does Synaptic "understand" that I have the 96 drivers, on hold? Is this patch even relevant to a legacy driver, or is it for a newer driver, as the version numbers would seem to suggest? Update Manager's "details" tab is not clear about that. Although the legacy 96 drivers use a few packages that have 195.36.xx numbers, I've had a few such higher-version packages relating to the graphics drivers break the graphics (in the past). So, allow the upgrade, because Synaptic / Update Manager would never let a package by that would wreck a "hold", and break my graphics set-up? -OR, go into Synaptic, and put a "hold" on the old libgl1-nvidia-etc, to prevent graphics breakage?
This is just an example. I want to understand how holds are handled, so I don't have to come around asking questions, for every package, every time there's an update; I want to understand how automatic (or not) package management holds are, in the Debian family. Can I just update and breathe, or must I go around slapping more holds on every package that threatens to update, that even looks like it might wreck my graphics?
Thank you for your responses so far. I may just be dense here, but I really am not understanding (yet).
If you're running squeeze you do not need those package holds. Kernel updates are simply security/bug fixes, not new kernel versions - if your nvidia driver breaks it's likely because you did not install it correctly - install the legacy driver via the Debian repositories and you won't have any issues.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.