Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 697  / 3 Years ago, tue, october 5, 2021, 1:09:44

I've installed a package from multiverse and then disabled multiverse and restricted in apt sources (in all urls). I disabled them so I don't install any new non-free packages or dependencies by accident.


When I did apt update and then upgrade on the package, apt says it's "already the newest version". But I believe I won't actually get upgrades for that package, right?


Is there a way to get upgrades just for the installed packages while still preventing any new packages from being installed from restricted or multiverse (without having to edit apt sources on every installation)?


I thought about leaving multiverse enabled on focal-security and focal-updates, but I think that's probably not gonna do what I expect.




My other somewhat related question:

I want to get a warning when apt installing from certain sources, like restricted and multiverse


More From » apt

 Answers
2

Disabling the source won't work (the system won't ever find out about upgraded versions of your package). What might work (I haven't tested it myself for this usecase) is APT pins. Leave the sources enabled and add something like the following to /etc/apt/preferences:


Package: your-favorite-package
Pin: release o=Ubuntu
Pin-Priority: 990

Package: *
Pin: release c=multiverse
Pin-Priority: -1

Package: *
Pin: release c=restricted
Pin-Priority: -1

The second and third blocks mark all packages from multiverse and restricted as "do not install", and the first block restores the defalt priority to your-favorite-package.


[#1951] Wednesday, October 6, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
;