Install a package from debian testing

Questions about applications and software
Forum rules
Before you post please read this

Install a package from debian testing

Postby nomadicME on Mon Jul 14, 2014 2:25 pm

I need to install motion from the debian testing (jessie) repository as it is not currently in the LMDE latest repositories. I created an additional file called debian-repositories.list under /etc/apt/sources.list.d and placed in it:


Then I created another file called debian-repositories.pref under /etc/apt/preferences.d and placed in it:
Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 400

Package: *
Pin: origin http.debian.net
Pin-Priority: 400


The way I hoped this would work was only packages not available from the LMDE repositories would be installed from the debian repositories regardless of package versions. The way it is actually working is if the package version in the debian repository is higher than the package version in the LMDE repositories then the debian testing version is installed. This is backed up by the information provied on the debian wiki:


I do realize that I can just enable the debian testing repository while I install a package and then disable it, but I'm looking for a more elegant solution.

So my question is: Is there any way to only install a package from the debian testing repository if there does not exist any version of this package in the LMDE repositories? Thanks.
Last edited by karlchen on Mon Jul 14, 2014 6:11 pm, edited 1 time in total.
Reason: Moved thread to "Software & Applications"
nomadicME
Level 1
Level 1
 
Posts: 2
Joined: Mon Jul 14, 2014 2:08 pm

Linux Mint is funded by ads and donations.
 

Re: Install a package from debian testing

Postby Monsta on Mon Jul 14, 2014 2:49 pm

nomadicME wrote: I can just enable the debian testing repository while I install a package and then disable it

This is the best solution as it frees your mind from figuring out how the preferences work. :)
Monsta
Level 8
Level 8
 
Posts: 2415
Joined: Fri Aug 19, 2011 3:46 am

Re: Install a package from debian testing

Postby nomadicME on Mon Jul 14, 2014 5:23 pm

Monsta, thank you for your reply, but the point of my post is that I want to figure out how the preferences (or any other mechanism) works so I can do it right. If there aren't any other options I can also accept that as an anwer.
nomadicME
Level 1
Level 1
 
Posts: 2
Joined: Mon Jul 14, 2014 2:08 pm

Re: Install a package from debian testing

Postby Monsta on Tue Jul 15, 2014 3:56 am

Code: Select all
man apt_preferences
will give you almost all the information you need.

After you learn enough about it, you can also read the "Pinning errata" part of this document. It will tell you about various quirks of the pinning system.
Monsta
Level 8
Level 8
 
Posts: 2415
Joined: Fri Aug 19, 2011 3:46 am

Re: Install a package from debian testing

Postby Monsta on Tue Jul 15, 2014 5:07 am

The pinning of Testing can be tricky in LMDE due to the fact that LMDE repo is a snapshot of Testing, and so they both have
Code: Select all
release o=Debian,a=testing,n=jessie
in their properties.

You can run
Code: Select all
apt policy
(without other arguments) to see it for yourself.

The pinning by "origin" is a solution to distinguish between LMDE repo and Testing:
Code: Select all
Package: *
Pin: release o=linuxmint
Pin-Priority: 700

Package: *
Pin: origin packages.linuxmint.com
Pin-Priority: 700

Package: *
Pin: origin http.debian.net
Pin-Priority: 400

Package: *
Pin: release o=Debian
Pin-Priority: 500
Note that due to the way the pinning system works, this new entry should be placed before the last one (with "release").

Also I'm not sure about giving it the priority of 400 like you did above. I'd give it something between 1 and 99 so the packages from that repo would never be installed/upgraded automatically, unless you explicitly tell apt-get to do so. But that depends on what you're trying to achieve here. :)
Monsta
Level 8
Level 8
 
Posts: 2415
Joined: Fri Aug 19, 2011 3:46 am


Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 1 guest