Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1193  / 2 Years ago, fri, august 19, 2022, 12:02:29

I am curious for both answers since a brief google didn't show any result. But I was wondering how would you handle installing a program that has the same name in two different repositories. Or changing one already installed so it receives updates from a new one.



Specifically what brought this to attention is OBS studio, since it's included in the default Ubuntu repositories, but the obsproject repo has a higher version of the program.


More From » apt

 Answers
5

Every repository hold a Release file that clients will look for when preforming apt commands.
The Release file holds information about the available dists and components (such as bionic main universe and etc.).
It specifies the locations and hash sums of every component.
Once getting the relevant dist, the client then searches for a package list, containing every available debian, its location, its full name, version, hash sums, size and more.
That is how you can differ packages from one repo to another.



If you would like to request a specific version or a target repo, you'll need to use the -t option while using apt-get.
If that version exists in the repo, it will be downloaded.
Note: when choosing a specific repo, it first must exist in the source list.



Below a quote from apt-get man page:



-t, --target-release, --default-release
This option controls the default input to the policy engine, it creates a default pin at priority 990 using the specified
release string. This overrides the general settings in /etc/apt/preferences. Specifically pinned packages are not affected by
the value of this option. In short, this option lets you have simple control over which distribution packages will be retrieved
from. Some common examples might be -t '2.1*', -t unstable or -t sid. Configuration Item: APT::Default-Release; see also the
apt_preferences(5) manual page.

[#4149] Saturday, August 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
utschang

Total Points: 357
Total Questions: 120
Total Answers: 119

Location: Croatia
Member since Sat, May 2, 2020
4 Years ago
utschang questions
Mon, Aug 30, 21, 14:09, 3 Years ago
Tue, May 17, 22, 20:44, 2 Years ago
Sun, Jul 11, 21, 23:54, 3 Years ago
Tue, Sep 7, 21, 04:23, 3 Years ago
;