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

mrjayviper

Weaksauce
Joined
Jul 17, 2012
Messages
91
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
 
download.hosting.com is a bad dns. I imagine that could be the issue.

I'm not a big ubuntu guy but why would you want to do things that way instead of just using a PPA.

If you want the absolute latest versions of specific software the best way to go about that is to add a PPA. In the case of most major software like handbreak they even have official PPAs so there is no worry about ending up with odd crap.

Handbrake links to an official PPA if you want a newer version.
https://handbrake.fr/downloads.php
https://launchpad.net/~stebbins/+archive/ubuntu/handbrake-releases

Code:
sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update

then you can install with;

Code:
apt-get install handbrake-gtk
or
apt-get install handbrake-cli

If you want bleeding edge handbrake

Code:
sudo add-apt-repository ppa:stebbins/handbrake-git-snapshots
sudo apt-get update
 
Last edited:
Back
Top