Ubuntu 16.04: help with apt pinning. apt list not showing version from 3rd party repo

mrjayviper

Junior Member
Mar 13, 2017
23
0
66
So I have a custom repo here which I added by creating a mrjayviper.list file inside /etc/apt/sources.list.d/

Code:
deb https://download.hosting.com/mrjayviper/deb all main
deb https://download.hosting.com/mrjayviper/deb xenial main

I then created this file /etc/apt/preferences with the following contents

Code:
Package: *
Pin: origin download.hosting.com
Pin-Priority: 999

note: I've tried other numbers like 800 and 900 and 1100 instead of 999.

My issue is that when I run (see below), it's showing Ubuntu's copy and not the one from the 3rd party repo.

Code:
=> apt list | grep handbrake
   
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

handbrake/xenial 0.10.2+ds1-2build1 amd64 (from official repo)
handbrake-cli/xenial 0.10.2+ds1-2build1 i386 (from official repo)
handbrake-gtk/xenial 1.0.4-zhb-1ppa1~xenial1 amd64 (from 3rd party repo)

The 3rd party repo has a much newer version of the handbrake-cli (same version as handbrake-gtk) and I thought apt pinning should take priority anyway using whatever version is in the 3rd party repo even if it's a lower version.

things I've also done:
- I've deleted my apt database (sudo rm -rf /var/lib/apt/lists) and re-running apt-get update after creating the preferences file.
- I've tried the apt list command with and without /etc/apt/preferences. Same results

My aim is to understand and get apt pinning to work and not getting the latest version of handbrake-cli which probably can be done by compiling source anyway.

Any ideas what I could be doing wrong?

Thanks
 

mrjayviper

Junior Member
Mar 13, 2017
23
0
66
I can see other packages from the 3rd party repo. The only I cannot see are the ones that's also available in official repos.
 

lxskllr

No Lifer
Nov 30, 2004
57,459
7,661
126
Did you give the official repos a pin priority? Without that, your custom repo won't have a number to compare to.
 

mrjayviper

Junior Member
Mar 13, 2017
23
0
66
I didn't pin anything else other than the 3rd part repo. perhaps it's pinned "behind the scenes".

My workaround is to put my repo entries at the top of /etc/apt/sources.list and delete mrjayviper.list