Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to set up apt repository priority ordering in Linux Mint Debian Edition 2012.04. In /etc/apt/preferences the order should be: LMDE -> Debian testing -> Debian unstable. In other words, I almost always want to use packages from LMDE semi-rolling repository, and only sometimes get them from testing and unstable only when absolutely necessary.

I looked at http://forums.linuxmint.com/viewtopic.php?f=201&t=78882 and http://forums.linuxmint.com/viewtopic.php?f=141&p=379226, but still have not been able to get repository priority ordering to work correctly.

What is the best way to do this?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

It seems that i succeeded at apt-pinning (setting apt repository priority) on LMDE. My /etc/apt/sources.list currently looks like this:

deb http://packages.linuxmint.com/ debian main upstream import
deb http://debian.linuxmint.com/latest testing main contrib non-free
deb http://debian.linuxmint.com/latest/security testing/updates main contrib non-free
deb http://debian.linuxmint.com/latest/multimedia testing main non-free

deb http://ftp.us.debian.org/debian/ testing main contrib non-free
deb http://ftp.us.debian.org/debian/ unstable main contrib non-free
deb http://ftp.us.debian.org/debian/ experimental main contrib non-free

My /etc/apt/preferences looks like this:

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

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

Package: *
Pin: release a=testing
Pin-Priority: 600

Package: *
Pin: release a=unstable
Pin-Priority: 200

Package: *
Pin: release a=experimental
Pin-Priority: 50

So sudo aptitude allows only packages originating from linuxmint.com to install, and to install packages from Debian distribution, i need to append -t <distribution>, where distribution is testing, unstable or experimental.

Sources:

share|improve this answer
add comment

It' didn't work for me --- my sysetem would still get updates from testing. I needed to:

    Package: *
    Pin: release a=testing
    Pin-Priority: -1

    Package: *
    Pin: release a=unstable
    Pin-Priority: -20

    Package: *
    Pin: release a=experimental
    Pin-Priority: -30
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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