Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Dependency resolution, apt-get dist-upgrade with backports

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
MartinK
Posts: 28
Joined: 2015-05-14 21:55
Location: United Kingdom

Dependency resolution, apt-get dist-upgrade with backports

#1 Post by MartinK »

I'm running Debian 9 Stretch. I had a problem with sound not working from the speakers in my HDMI connected monitor after resume from suspend. Found a bug report describing the fault as fixed in kernel 4.14. I have enabled backports, installed the updated kernel and sound fault fixed. Great!

In future, to keep software up to date, do I run;

Code: Select all

sudo apt-get upgrade
sudo apt-get -t stretch-backports upgrade
and if any packages are not upgraded;

Code: Select all

sudo apt-get dist-upgrade
sudo apt-get -t stretch-backports dist-upgrade
In the process of installing the new kernel I have done all 4. Looking O.K., nothing has exploded but is there a better method?

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: Dependency resolution, apt-get dist-upgrade with backpor

#2 Post by tynman »

I'm no expert on maintaining Debian, but my thought when I saw your post was the commands you ran could be expected to install a lot more than a new kernel, and that may or may not be suitable for what you wanted to do. As you say, nothing has blown up, so maybe it's fine.

If I wanted to install the 4.14 kernel, I would run

Code: Select all

# apt-get -t stretch-backports install linux-image-4.14.0-0.bpo.3-amd64

MartinK
Posts: 28
Joined: 2015-05-14 21:55
Location: United Kingdom

Re: Dependency resolution, apt-get dist-upgrade with backpor

#3 Post by MartinK »

I think we have a misunderstanding. I did use the exact code you suggest to install the kernel.

I also installed the matching version of linux-headers because I run virtualbox which needs to build a driver to work with the new kernel.

My question comes from what happened after that. Subsequent software update/upgrade showed packages not being upgraded and packages no longer required. The packages in question, and those offered by a dist-upgrade looked sensible so I went ahead with autoremove and install.

The OS is behaving normally. What I am unsure of is how upgrades are best handled after you have installed a kernel from backports?

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1389
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 66 times

Re: Dependency resolution, apt-get dist-upgrade with backpor

#4 Post by None1975 »

From Debian Backports FAQ
Q: Is there security support for packages from backports.debian.org?
A: Unfortunately not. This is done on a best effort basis by the people who track the package, usually the ones who originally did upload the package into backports. When security related bugs are fixed in Debian unstable the backporter is permitted to upload the package from directly there instead of having to wait until the fix hits testing. You can see the open issues for jessie-backports in the security tracker (though there may be false positives too, the version compare isn't perfect yet)
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Dependency resolution, apt-get dist-upgrade with backpor

#5 Post by stevepusser »

It's considered best practice by Debian gurus, and recommended by backports itself, to only update programs one at a time from there. This help track down any issues that may pop up from the update. That's why backports has a low apt priority, and the packages won't upgrade automatically.
MX Linux packager and developer

MartinK
Posts: 28
Joined: 2015-05-14 21:55
Location: United Kingdom

Re: Dependency resolution, apt-get dist-upgrade with backpor

#6 Post by MartinK »

O.K. I shall continue on the basis that now backports is enabled I have two different package management routines, backports and the rest.

A shame that fixing a very annoying bug required leaving the 'stable' build. Thanks all.

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Dependency resolution, apt-get dist-upgrade with backpor

#7 Post by Thorny »

@stevepusser
You may want to review this discussion:
https://lists.debian.org/debian-devel/2 ... 00521.html
Re: Backports upgrade policy (ButAutomaticUpdates:yes)

I do agree that one should only install one or a few necessary backports.

I think I agree with tynman, I'm surprised that a mess hasn't been created by

Code: Select all

sudo apt-get -t stretch-backports upgrade
sudo apt-get -t stretch-backports dist-upgrade
But I have never tried that. I don't think I would choose to, I'd be afraid it might do what I asked.

MartinK
Posts: 28
Joined: 2015-05-14 21:55
Location: United Kingdom

Re: Dependency resolution, apt-get dist-upgrade with backpor

#8 Post by MartinK »

I have two bootable copies of Debian stretch on the same PC, one on SSD one on HDD, and duplicate my data between the two. I only make changes to one system at a time so always have a 'hot standby' ready. EFI system partition on both drives, from which either copy of the OS can be loaded. Good for trying things out.

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Dependency resolution, apt-get dist-upgrade with backpor

#9 Post by Thorny »

I'm sorry but I had to go after posting my last comment but now it is what serves as morning for me, so I have time for a bit more.

It's good that you have a sane method of testing things and a fallback strategy.

When you install a package from the backports repository as you have done, it will be upgraded with a new backports version when it is available along with your other upgrades. Backports are marked in the release file as "NotAutomatic: yes" which would give them a pin priority of 1 but they are also marked as "ButAutomaticUpgrades: yes", so when you force one to install it has a pin priority of 100, thus APT knows to upgrade it when you issue the apt-get upgrade command after doing your apt-get update. No need to do any separate upgrading of the backport.

Apt-cache policy linux-image-4.14.0-0.bpo.3-amd64 should show you a pin of 100

As I mentioned, I'm not sure in what condition those other commands you did left your system.

I believe you could find out by issuing

Code: Select all

dpkg-query -W | grep ~bpo
and hopefully it does not return a long list. It should just have the backports, kernel and headers, that you wanted to install.

Since you are using stretch, it would probably be a good idea to start to familiarize yourself with the more modern "apt" command which you can read about in the manual.
Last edited by Thorny on 2018-02-23 07:11, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Dependency resolution, apt-get dist-upgrade with backpor

#10 Post by Head_on_a_Stick »

To keep the backported kernel up to date, install the (backported) metapackage:

Code: Select all

# apt install linux-image-amd64/stretch-backports
deadbang

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Dependency resolution, apt-get dist-upgrade with backpor

#11 Post by Thorny »

H_o_a_S's advice is a good idea.

MartinK
Posts: 28
Joined: 2015-05-14 21:55
Location: United Kingdom

Re: Dependency resolution, apt-get dist-upgrade with backpor

#12 Post by MartinK »

Thanks very much guys. I got myself fixated on a wrong idea last night. With a clear eye this morning I can see past my 'mad moment'.

The list of ~bpo files is not long, I can roll back a few odd ones if needs be.

I will also install the stretch-backports package.

As for apt vs. apt-get, I will have to catch up on the 'news'. I had noticed that you are now prompted to autoremove no longer needed packages with apt, but didn't realise the significance of that change.

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Dependency resolution, apt-get dist-upgrade with backpor

#13 Post by Thorny »

MartinK wrote: With a clear eye this morning I can see past my 'mad moment'.
Martin,
I can't help but wonder if that was a mad moment or a madduck moment. ;-)

Post Reply