Getting packages from debian backports not working as documented
0
votes
1
answer
2090
views
Before dear community marks this question as duplicate please known that I've done site search and figured out there is no equivalent duplicate, for instance this [link](https://unix.stackexchange.com/questions/516664/debian-stretch-not-getting-package-from-stretch-backports) is not duplicate
I have followed the following instructions:
- https://wiki.debian.org/Backports
- https://backports.debian.org/Instructions
According to these instructions step No.1 is to update
/etc/apt/sources.list
by adding the following line:
- deb http://deb.debian.org/debian bookworm-backports main contrib non-free
When this step is done we need up update index by running sudo apt update
From this point on we have two options:
1. Explicitly install a package from backports, for example
- apt install -t bookworm-backports
2. Implicitly install a package from backports
- apt install /bookworm-backports
There is a significant difference between those 2 methods!
The first method will install package from backports but will also pull in all it's dependencides also from backports including their dpenedencies and so on which results in "bloated" installation of a package.
The second method is cleaner, better and recommended by debian because unlike first method it will reuse dependencies (from main, not from backports) and will pull in only the main package being installed that is from backports.
In other words second method will reuse dependencies that are alaready insalled on system without downloading them.
However under certain circumstances if that's not possible it will pull dependencies from backports (in rare scenarios though)
The problem I'm having is that first method with -t
options always works while the second method never works at all.
I want to know why that is and how can I make the second method work?
Here are two examples that are reproducible for you to test:
sudo apt install wine/bookworm-backports
sudo apt install passwordsafe/bookworm-backports
Here is the output from first example:
> sudo apt install wine/bookworm-backports
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package wine is a virtual package provided by:
wine 8.0~repack-4
You should explicitly select one to install.
E: Release 'bookworm-backports' for 'wine' was not found
As you can see bookworm-backports
was not found!
However if you run with -t
option you can confirm this is false:
sudo apt install wine -t bookworm-backports
Which will work just fine and offer you to install the package.
So the question is very simple, why doesn't second method (without the -t
option) not work and what do I need to do to make it work, do I do something wrong?
---
For additional information I'm using Debian 12 (bookworm)
And my sources.list
looks like this:
deb https://deb.debian.org/debian/ bookworm main
deb-src https://deb.debian.org/debian/ bookworm main
deb http://security.debian.org/debian-security bookworm-security main
deb-src http://security.debian.org/debian-security bookworm-security main
deb https://deb.debian.org/debian/ bookworm-updates main
deb-src https://deb.debian.org/debian/ bookworm-updates main
deb https://deb.debian.org/debian/ bookworm-backports main
deb-src https://deb.debian.org/debian/ bookworm-backports main
Asked by metablaster
(776 rep)
Jan 29, 2024, 08:02 PM
Last activity: Jan 29, 2024, 09:57 PM
Last activity: Jan 29, 2024, 09:57 PM