apt preferences pin: origin local?
Asked Answered
J

4

7

I have dropped fglrx from my notebook and return to the free drivers but xfce4-power-manager fails to start. it was a known bug

I got apt-get source, apply the patch, build and install it. now all works perfect, I have reported this bug to debian. but now I want to hold this package to prevent upgrades for some time

I know that clumsy way is to bump the package build version part. for example 1.0.10-5 and then hold package by a version:

Package: xfce4-power-manager
Pin: version 1.0.10-5
Pin-priority: 1001

I think the best way is to hold packages by the origin:

Package: xfce4-power-manager
Pin: origin "local origin?"
Pin-priority: 1001

Is this possible? I cant find this in docs

Johnstone answered 6/2, 2012 at 19:10 Comment(1)
I answer with an apt_preferences approach, but you can also use a command like apt-mark hold instead: askubuntu.com/questions/18654/…Lavonda
C
2

Using "run" or "now" as the origin should work:

Package: xfce4-power-manager
Pin: release o=now
Pin-priority: 1001
Cesta answered 14/5, 2014 at 4:20 Comment(0)
S
2

Straight from the man page (man 5 apt_preferences):

       This general-form entry in the APT preferences file applies only to
       groups of packages. For example, the following record assigns a
       high priority to all package versions available from the local
       site.

           Package: *
           Pin: origin ""
           Pin-Priority: 999

I believe this is what you are looking for. I have never used pinning to do this, so I'm not sure if this solves your problem.

Secondrate answered 17/2, 2012 at 6:0 Comment(0)
C
2

Using "run" or "now" as the origin should work:

Package: xfce4-power-manager
Pin: release o=now
Pin-priority: 1001
Cesta answered 14/5, 2014 at 4:20 Comment(0)
S
1

Recent versions of apt (tested on Debian 9.8, stretch) support installing local debs, as long as a deb of the same name isn't available from a configured repo, in which case the repo version is preferred. For example, after commenting out the relevant repo from the local apt configuration, this works for me:

    sudo apt install ./packagename_0.0.1_all.deb

apt does need the ./ prefix or full path to find the local file.

Sibyls answered 30/4, 2019 at 13:51 Comment(0)
L
1

release o=now won't work, but release a=now will.

You can get various ways to refer to your machine's package sources from the output of apt policy (or apt-cache policy). In /etc/apt/preferences.d/myprefs put:

Package: xfce4-power-manager
Pin: release a=now
Pin-priority: 1000

Then, if you run:

apt policy xfce4-power-manager

You'll see the installed version has priority 1000.

Lavonda answered 19/10, 2023 at 14:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.