Dependency resolution, apt-get dist-upgrade with backports

Kernels & Hardware, configuring network, installing services

Dependency resolution, apt-get dist-upgrade with backports

Postby MartinK » 2018-02-22 16:35

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?
MartinK
 
Posts: 25
Joined: 2015-05-14 21:55
Location: United Kingdom

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

Postby tynman » 2018-02-22 16:51

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
tynman
 
Posts: 77
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

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

Postby MartinK » 2018-02-22 17:07

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?
MartinK
 
Posts: 25
Joined: 2015-05-14 21:55
Location: United Kingdom

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

Postby None1975 » 2018-02-22 17:47

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 9.4 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 627
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

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

Postby stevepusser » 2018-02-22 18:39

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9915
Joined: 2009-10-06 05:53

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

Postby MartinK » 2018-02-22 19:46

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.
MartinK
 
Posts: 25
Joined: 2015-05-14 21:55
Location: United Kingdom

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

Postby Thorny » 2018-02-22 20:16

@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.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

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

Postby MartinK » 2018-02-22 21:33

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.
MartinK
 
Posts: 25
Joined: 2015-05-14 21:55
Location: United Kingdom

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

Postby Thorny » 2018-02-23 07:06

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
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

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

Postby Head_on_a_Stick » 2018-02-23 07:10

To keep the backported kernel up to date, install the (backported) metapackage:
Code: Select all
# apt install linux-image-amd64/stretch-backports
User avatar
Head_on_a_Stick
 
Posts: 7904
Joined: 2014-06-01 17:46
Location: /dev/chair

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

Postby Thorny » 2018-02-23 07:13

H_o_a_S's advice is a good idea.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

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

Postby MartinK » 2018-02-23 08:16

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.
MartinK
 
Posts: 25
Joined: 2015-05-14 21:55
Location: United Kingdom

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

Postby Thorny » 2018-02-23 08:31

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. ;-)
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40


Return to System configuration

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable