LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-09-2006, 07:19 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
APT Pinning not working as expected


I decided to track stable debian along with etch(testing) and here is my /etc/apt/preferences file:
Code:
Package: *
Pin: release a=sarge
Pin-Priority: 700

Package: *
Pin: release a=etch
Pin-Priority: 600
Now, I tried to installed the package 'bootcd' by simply giving
apt-get install bootcd

and next I see is that, apt-get downloads the package from etch rather then stable.

According to this tutotrial, it should have donwloaded from stable
http://jaqque.sbih.org/kplug/apt-pinning.html

The above tutorial says:
Code:
To install a new package, it is just as it ever was, apt-get install <package>. If the package exists in Stable, then that is what it will grab. If the package exists only in Unstable, then from Unstable it will be gotten.

What if the package exists in both Stable and Unstable, but we want the Unstable version? There are two ways we can do that, each with a slightly different syntax, and each with a slightly different effect.
apt-get install <package>/unstable

This will install the unstable version of the package, and try to meet any dependencies from Stable. This may not work, but it will tell you why:
Now the bootcd package is in both stable and testing, then why did it get downloaded from testing??

Thanks
 
Old 03-09-2006, 11:01 PM   #2
lavluda
Member
 
Registered: Jan 2006
Location: Dhaka, Bangladesh
Distribution: Debian sid, Suse 9.3 pro, Mandrake 10.0, Redhat 7-9, FC-2,3, Gentoo 2006,2006.1
Posts: 89
Blog Entries: 2

Rep: Reputation: 15
yea, it's true, you are giving priority to stable. But i think the bootcd is much latest in testing then the bootcd of stable. That's why it's taking the bootcd from testing. Can you please inform the booth version of bootcd ?
 
Old 03-09-2006, 11:36 PM   #3
dracae
Member
 
Registered: Feb 2006
Location: Oklahoma
Distribution: Debian Sid and Etch
Posts: 423

Rep: Reputation: 30
What is the output of
apt-cache policy bootcd
 
Old 03-10-2006, 05:01 PM   #4
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by dracae
What is the output of
apt-cache policy bootcd

Following is the output of apt-cache policy bootcd

Code:
bootcd:
  Installed: 2.52
  Candidate: 2.52
  Version Table:
 *** 2.52 0
        500 http://mirrors.kernel.org etch/main Packages
        100 /var/lib/dpkg/status
     2.48 0
        500 http://mirrors.kernel.org sarge/main Packages
 
Old 03-10-2006, 06:18 PM   #5
dracae
Member
 
Registered: Feb 2006
Location: Oklahoma
Distribution: Debian Sid and Etch
Posts: 423

Rep: Reputation: 30
Make sure that the preferences file is spelled correctly and make sure you run apt-get update

Pinning is more for specific packages, to set the default release add to /etc/apt/apt.conf
Code:
APT::Default-Release "sarge";
To install from testing use the -t switch
apt-get -t etch install bootcd

Last edited by dracae; 03-10-2006 at 06:21 PM.
 
Old 03-10-2006, 06:48 PM   #6
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by dracae
Make sure that the preferences file is spelled correctly and make sure you run apt-get update
Yes it is spelled correctly and I run apt-get update everytime

Quote:
Pinning is more for specific packages, to set the default release add to /etc/apt/apt.conf
Code:
APT::Default-Release "sarge";
To install from testing use the -t switch
apt-get -t etch install bootcd
Yes I will add those line in the apt.conf file and see if it still downloads packages from etch instead of stable.

EDIT: Also of Pinning is specific to package, then why did the specific package bootcd got installed from etch.

Thanks

Last edited by kushalkoolwal; 03-10-2006 at 07:11 PM.
 
Old 03-11-2006, 10:23 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by kushalkoolwal
Yes it is spelled correctly and I run apt-get update everytime



Yes I will add those line in the apt.conf file and see if it still downloads packages from etch instead of stable.

EDIT: Also of Pinning is specific to package, then why did the specific package bootcd got installed from etch.

Thanks
Well I went one step ahead. I changed all the instances of Sarge with Stable and Etch with testing in the /etc/apt/preferences, /etc/apt/sources.lst, /etc/apt/apt.conf. And now apt-get downloads package from stable instead of testing.

How do you explain this???

According to Debian Doc, Stable is just a pointer to Sarge and it should not matter what name you give?
 
Old 03-12-2006, 01:31 AM   #8
dracae
Member
 
Registered: Feb 2006
Location: Oklahoma
Distribution: Debian Sid and Etch
Posts: 423

Rep: Reputation: 30
Is it case sensitive?
 
Old 03-12-2006, 03:08 AM   #9
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by dracae
Is it case sensitive?
No, I mean in all my 3 files, I had written sarge and etch written everywhere which I changed to stable and testing respectively.

So For e.g. earlier my file /etc/apt/preferences was
Code:
Package: *
Pin: release a=sarge
Pin-Priority: 700

Package: *
Pin: release a=etch
Pin-Priority: 600
and now it is
Code:
Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 600
I know this should not make any difference theoritically, but it works in this case. I don't know how?
 
Old 03-12-2006, 02:06 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by kushalkoolwal
No, I mean in all my 3 files, I had written sarge and etch written everywhere which I changed to stable and testing respectively.

So For e.g. earlier my file /etc/apt/preferences was
Code:
Package: *
Pin: release a=sarge
Pin-Priority: 700

Package: *
Pin: release a=etch
Pin-Priority: 600
and now it is
Code:
Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 600
I know this should not make any difference theoritically, but it works in this case. I don't know how?
Ok guys, it is confirmed that that /etc/apt/preferences file does not work with aliases "sarge", "etch". It only works if you put stable and testing. This is so strange. Isn't it??
 
Old 03-13-2006, 08:54 PM   #11
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by kushalkoolwal
Ok guys, it is confirmed that that /etc/apt/preferences file does not work with aliases "sarge", "etch". It only works if you put stable and testing. This is so strange. Isn't it??
Any takers???
 
  


Reply



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 question divukman Debian 3 12-01-2005 10:49 AM
Apt-get build-dep and Pinning McCloud Debian 2 09-07-2005 05:36 AM
Crontab not working as expected nro Linux - Newbie 7 08-29-2005 12:56 PM
Partial upgrade with APT pinning (debian)? MaulingMonkey Linux - Software 1 01-21-2005 06:11 AM
apt-pinning h/w Debian 6 02-25-2004 11:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:52 AM.

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
Open Source Consulting | Domain Registration