LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 05-10-2006, 08:32 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
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
and my /etc/apt/preferences file looks like this:
Code:
Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 700

Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 500

Package: autofs
Pin: release o=Debian,a=unstable,a=testing,l=Debian,c=main
Pin-Priority: -10
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.

I even tried Pinning on the version like this:
Code:
Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 700

Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 500

Package: autofs
Pin: version 4.1.4-9
Pin-Priority: -10
But still it does not help.

I spent like 2 hrs on this googling and reading APT-GET how to on Debian docs but still no luck.

Any one please tell me what is going on here????
 
Old 05-10-2006, 11:56 PM   #2
THEHERO
Member
 
Registered: Aug 2003
Distribution: Debian Testing
Posts: 165

Rep: Reputation: 30
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.

Mine looks like this

$ cat /etc/apt/preferences

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

Package: *
Pin: release a=unstable
Pin-Priority: 650
 
Old 05-11-2006, 12:08 AM   #3
THEHERO
Member
 
Registered: Aug 2003
Distribution: Debian Testing
Posts: 165

Rep: Reputation: 30
Try that out with out the version #.


Package: autofs
Pin: version *
Pin-Priority: -10

and http://www.die.net/doc/linux/man/man...erences.5.html has some good docs

Last edited by THEHERO; 05-11-2006 at 12:09 AM.
 
Old 05-11-2006, 03:20 AM   #4
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by THEHERO
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.

Mine looks like this

$ cat /etc/apt/preferences

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

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

'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.

Thank you once again.
 
Old 05-11-2006, 10:12 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 53
Try this one:

Code:
Package: autofs
Pin-Priority: 1001
 
Old 05-11-2006, 01:37 PM   #6
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by nx5000
Try this one:

Code:
Package: autofs
Pin-Priority: 1001
No that does not work either....

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.....

Help...
 
Old 05-12-2006, 02:39 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 53
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.

Last edited by nx5000; 05-12-2006 at 02:42 AM.
 
Old 05-12-2006, 02:46 AM   #8
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by nx5000
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...
 
Old 05-15-2006, 09:30 AM   #9
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 53
Last try

What about this:
Code:
Package: autofs
Pin: release a=*
Pin-Priority: 1001
?



If you get an answer, I'm interested.
 
Old 05-15-2006, 01:09 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by nx5000
Last try

What about this:
Code:
Package: autofs
Pin: release a=*
Pin-Priority: 1001
?



If you get an answer, I'm interested.

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.

Can you please clear this confusion??

Thanks for your help......
 
Old 05-16-2006, 03:51 AM   #11
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 53
Quote:
Originally Posted by kushalkoolwal

Can you please clear this confusion??
No



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.
 
Old 05-16-2006, 04:39 AM   #12
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by nx5000
No



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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
APT Pinning not working as expected kushalkoolwal Debian 10 03-13-2006 09:54 PM
apt pinning question divukman Debian 3 12-01-2005 11:49 AM
Apt-get build-dep and Pinning McCloud Debian 2 09-07-2005 06:36 AM
Package pinning problem postb99 Debian 2 03-22-2005 03:09 PM
apt-pinning h/w Debian 6 02-25-2004 12:57 PM


All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration