apt-pinning does not obey to Not install the package
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
apt-pinning does not obey to Not install the package
Hi Guys,
I am using Debian etch(mainly) with some packages from unstable and I was playing around with the apt-pinning feature of Debian. I want that the autofs package does not get installed on my system by mistake so I did the following:
Code:
#deb file:///cdrom/ sarge main
deb http://mirrors.kernel.org/debian/ testing main non-free contrib
#deb-src http://mirrors.kernel.org/debian/ testing main non-free contrib
deb http://mirrors.kernel.org/debian/ unstable main non-free contrib
#deb-src http://mirrors.kernel.org/debian/ unstable main non-free contrib
#deb http://security.debian.org/ testing/updates main contrib non-free
# Sid/Etch Dapper/Breezy and others:
#deb http://splashy.alioth.debian.org/debian main unstable
#deb-src http://splashy.alioth.debian.org/debian main unstable
Even after this when I do:
apt-get update
apt-get -s install autofs
I get the following output:
Code:
root@debian:~# apt-get -s install autofs
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
autofs
0 upgraded, 1 newly installed, 0 to remove and 88 not upgraded.
Inst autofs (4.1.4-9 Debian:testing)
Conf autofs (4.1.4-9 Debian:testing)
root@debian:~#
Why is still autofs package being installed. According to man apt_preferences a priority < 1 will cause package not to install.
What happens if you try an apt-get update and upgrade?
Does it try to install autofs still?
I'm not too sure if this will help but I have never seen this "o=Debian" in the preferences before.
What happens if you try an apt-get update and upgrade?
Does it try to install autofs still?
I'm not too sure if this will help but I have never seen this "o=Debian" in the preferences before.
'o' stands for origin. It is pretty common in most of the APT-Pinning tutorial. the link that you have sent in your last past is bascially the man page for apt_preferences. I have gone through that man page. Although I will try your suggestion too and let you know.
It stills wants to install the package. Am I missing something? I have heard so much about APT-Pinning for keep a package from not installing and when I actually tried it thinking it is pretty easy it does not work that way I thought or the manual says.....
I've never seen apt-pinning for one package working. There are open bugs on apt bts concerning this thing. There have been discussions, I haven't followed them.
Apt-pinning to negative values works for a complete repository but it doesn't help you in this case.
Maybe somebody will give you a clear answer, or dig in other forums/google/..?
Sorry!
edit:
In general apt won't install a package which is not absolutely needed due to dependency.
If you want to stick to a special version, you have to put it on hold. There is a drawback here: if you are in version 1, and you don't want version 2. Then the package goes in version 3. It won't be upgraded.
I've never seen apt-pinning for one package working. There are open bugs on apt bts concerning this thing. There have been discussions, I haven't followed them.
Apt-pinning to negative values works for a complete repository but it doesn't help you in this case.
Maybe somebody will give you a clear answer, or dig in other forums/google/..?
Sorry!
edit:
In general apt won't install a package which is not absolutely needed due to dependency.
If you want to stick to a special version, you have to put it on hold. There is a drawback here: if you are in version 1, and you don't want version 2. Then the package goes in version 3. It won't be upgraded.
Thanks for your input. Actually I don;t have any version of that package i.e. autofs. I simply don;t want to install that package. No special reasons but I am trying to learn more about Debian Packaging system...
Well, that worked!!! I guess the problem was with the line:
Pin-Priority: -10
When I changed the above line to:
Pin-Priority: 1001
it worked. Having said that, why 1001 works and not anynumber less than 0(<0). I always thought that 1001 is for downgrading package and <0 is if you do not want to install the package.
Sorry...
On the BTS, some have classified this as wishlist..
Still my problem is the manpage for apt-preferences that not-so-clearly states that <0 should do the job. Something has to be changed.
I'm checking with some other debian users, I'll inform you if I find something.
Sorry...
On the BTS, some have classified this as wishlist..
Still my problem is the manpage for apt-preferences that not-so-clearly states that <0 should do the job. Something has to be changed.
I'm checking with some other debian users, I'll inform you if I find something.
Thanks nx5000 for keep track of this thread. Please do let me know if you find answer to this mystry. man apt_preferences needs to be change or be specific as you said.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.