0

I have several Pin-Priority files set in /etc/apt/preferences.d/ but their settings do not reflect in apt-cache policy

Example:

avery@ChubbyChipmunk:/etc/apt/preferences.d$ ls -la

total 23
drwxr-xr-x 2 root root  7 Oct 22 08:25 .
drwxr-xr-x 7 root root 11 Oct 22 08:13 ..
-rw-r--r-- 1 root root 61 Oct 22 08:19 all-i386
-rw-r--r-- 1 root root 72 Oct 22 08:20 groovy-proposed
-rw-r--r-- 1 root root 59 Oct 22 08:19 origin-pop-os
-rw-r--r-- 1 root root 62 Oct 22 08:20 origin-ppa
-rw-r--r-- 1 root root 66 Oct 22 08:25 origin-ppa-launchpad-net-system76-pop-ubuntu

avery@ChubbyChipmunk:/etc/apt/preferences.d$ cat *

Package: *
  Pin: release o=Ubuntu,b=i386
  Pin-Priority: 50
Package: *
  Pin: release o=Ubuntu,a=groovy-proposed
  Pin-Priority: 50
Package: *
  Pin: origin apt.pop-os.org
  Pin-Priority: 50
Package: *
  Pin: origin ppa.launchpad.net
  Pin-Priority: 50
Package: *
  Pin: release o=LP-PPA-system76-pop
  Pin-Priority: 1

avery@ChubbyChipmunk:/etc/apt/preferences.d$ sudo apt update

Hit:1 http://apt.pop-os.org/proprietary groovy InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:3 https://download.mono-project.com/repo/ubuntu stable-focal InRelease     
Hit:4 http://packages.microsoft.com/ubuntu/18.04/mssql-server-2019 bionic InRelease
Hit:5 http://ppa.launchpad.net/linuxuprising/shutter/ubuntu groovy InRelease   
Hit:6 https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04  InRelease
Hit:7 http://ppa.launchpad.net/system76/pop/ubuntu groovy InRelease            
Hit:8 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu focal InRelease
Get:9 http://ppa.launchpad.net/system76/pop/ubuntu groovy/main amd64 Packages [44.4 kB]
Get:10 http://ppa.launchpad.net/system76/pop/ubuntu groovy/main Translation-en [18.1 kB]
Hit:11 http://mirrors.vcea.wsu.edu/ubuntu groovy InRelease   
Hit:12 http://mirrors.vcea.wsu.edu/ubuntu groovy-updates InRelease             
Hit:13 http://mirrors.vcea.wsu.edu/ubuntu groovy-backports InRelease           
Get:14 http://mirrors.vcea.wsu.edu/ubuntu groovy-security InRelease [88.4 kB]  
Hit:15 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed InRelease            
Hit:17 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease       
Hit:18 http://archive.canonical.com/ubuntu groovy InRelease                    
Hit:16 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease 
Fetched 151 kB in 6s (26.2 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
26 packages can be upgraded. Run 'apt list --upgradable' to see them.

avery@ChubbyChipmunk:/etc/apt/preferences.d$ apt-cache policy

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu focal/main amd64 Packages
     release v=20.04,o=LP-PPA-webupd8team-y-ppa-manager,a=focal,n=focal,l=Y PPA Manager,c=main,b=amd64
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/system76/pop/ubuntu groovy/main amd64 Packages
     release v=20.10,o=LP-PPA-system76-pop,a=groovy,n=groovy,l=Pop!_OS PPA,c=main,b=amd64
     origin ppa.launchpad.net
 500 https://packagecloud.io/slacktechnologies/slack/debian jessie/main amd64 Packages
     release v=1,o=packagecloud.io/slacktechnologies/slack,a=jessie,n=jessie,l=slack,c=main,b=amd64
     origin packagecloud.io
 500 http://apt.pop-os.org/proprietary groovy/main amd64 Packages
     release v=20.10,o=system76,a=groovy,n=groovy,l=System76,c=main,b=amd64
     origin apt.pop-os.org
 500 https://download.mono-project.com/repo/ubuntu stable-focal/main amd64 Packages
     release v=20.04,o=XamarinFocal,a=stable-focal,n=focal,l=Xamarin-Stable-Focal,c=main,b=amd64
     origin download.mono-project.com
 500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
     release o=microsoft-ubuntu-bionic-prod bionic,a=bionic,n=bionic,l=microsoft-ubuntu-bionic-prod bionic,c=main,b=amd64
     origin packages.microsoft.com
 500 http://ppa.launchpad.net/linuxuprising/shutter/ubuntu groovy/main amd64 Packages
     release v=20.10,o=LP-PPA-linuxuprising-shutter,a=groovy,n=groovy,l=Shutter screenshot tool and dependencies,c=main,b=amd64
     origin ppa.launchpad.net
 500 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages
     release v=1.0,o=Google LLC,a=stable,n=stable,l=Google,c=main,b=amd64
     origin dl.google.com
 500 https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04  Packages
     release o=obs://build.opensuse.org/devel:kubic:libcontainers:stable/xUbuntu_20.04,n=xUbuntu_20.04,l=devel:kubic:libcontainers:stable,c=
     origin download.opensuse.org
 500 http://packages.microsoft.com/ubuntu/18.04/mssql-server-2019 bionic/main amd64 Packages
     release o=mssql-server-2019-bionic bionic,a=bionic,n=bionic,l=mssql-server-2019-bionic bionic,c=main,b=amd64
     origin packages.microsoft.com
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed/main i386 Packages
     release v=20.10,o=Ubuntu,a=groovy-proposed,n=groovy,l=Ubuntu,c=main,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed/main amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy-proposed,n=groovy,l=Ubuntu,c=main,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed/multiverse i386 Packages
     release v=20.10,o=Ubuntu,a=groovy-proposed,n=groovy,l=Ubuntu,c=multiverse,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed/multiverse amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy-proposed,n=groovy,l=Ubuntu,c=multiverse,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed/restricted i386 Packages
     release v=20.10,o=Ubuntu,a=groovy-proposed,n=groovy,l=Ubuntu,c=restricted,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed/restricted amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy-proposed,n=groovy,l=Ubuntu,c=restricted,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed/universe i386 Packages
     release v=20.10,o=Ubuntu,a=groovy-proposed,n=groovy,l=Ubuntu,c=universe,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-proposed/universe amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy-proposed,n=groovy,l=Ubuntu,c=universe,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-security/universe i386 Packages
     release v=20.10,o=Ubuntu,a=groovy-security,n=groovy,l=Ubuntu,c=universe,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-security/universe amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy-security,n=groovy,l=Ubuntu,c=universe,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-security/main i386 Packages
     release v=20.10,o=Ubuntu,a=groovy-security,n=groovy,l=Ubuntu,c=main,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy-security/main amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy-security,n=groovy,l=Ubuntu,c=main,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://archive.canonical.com/ubuntu groovy/partner amd64 Packages
     release v=20.10,o=Canonical,a=groovy,n=groovy,l=Partner archive,c=partner,b=amd64
     origin archive.canonical.com
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy/multiverse i386 Packages
     release v=20.10,o=Ubuntu,a=groovy,n=groovy,l=Ubuntu,c=multiverse,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy/multiverse amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy,n=groovy,l=Ubuntu,c=multiverse,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy/universe i386 Packages
     release v=20.10,o=Ubuntu,a=groovy,n=groovy,l=Ubuntu,c=universe,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy/universe amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy,n=groovy,l=Ubuntu,c=universe,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy/restricted i386 Packages
     release v=20.10,o=Ubuntu,a=groovy,n=groovy,l=Ubuntu,c=restricted,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy/restricted amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy,n=groovy,l=Ubuntu,c=restricted,b=amd64
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy/main i386 Packages
     release v=20.10,o=Ubuntu,a=groovy,n=groovy,l=Ubuntu,c=main,b=i386
     origin mirrors.vcea.wsu.edu
 500 http://mirrors.vcea.wsu.edu/ubuntu groovy/main amd64 Packages
     release v=20.10,o=Ubuntu,a=groovy,n=groovy,l=Ubuntu,c=main,b=amd64
     origin mirrors.vcea.wsu.edu
Pinned packages:

I've been able to get Pin-Priority to work before, I have no idea what's going on. I've already spent two hours trying to figure it out, I'm just going to have to comment out the repos in the .list files.

I think I'm going to file a bug report in launchpad.

Any ideas?

  • You didn't really tell us about the problem. What is the problem exactly? Are you unable to update your software? What errors are you getting? Also, since grovvy hasn't been released yet, it's not supported here yet. Yes, you should file a bug report if you have a bug on a development release. – Nmath Oct 22 '20 at 16:24
  • 1
    @Nmath I guess 20.10 is official as of today, though they're not hosting their YouTube thing until tomorrow? That's what I gathered from my earlier news searches. Here is one such article. I thought it wasn't until Friday, but it looks like it was today - the 22nd. – KGIII Oct 22 '20 at 16:52
  • Until the official release is available, you are still using a development build. And even in one week after release, if you didn't reinstall the OS, you're still technically using a development build... – Nmath Oct 22 '20 at 16:55
  • If dev branch not supported, I will refrain from posting questions here regarding it for the next week. Thanks for the heads up. BTW I did indeed file a bug report before I saw the solution below, which worked. – AveryFreeman Oct 22 '20 at 20:14
1

Try losing the indentations. I tested with indents and a preference did not take effect. Without any indents, the preference worked. It might also help to have a blank line at the end of each file because that separates the records.

For example

Package: *
Pin: origin apt.pop-os.org
Pin-Priority: 50

  • Well I guess I get to update my bug report now. Thanks for the solution, it worked great. – AveryFreeman Oct 22 '20 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.