LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-31-2009, 06:25 PM   #1
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Rep: Reputation: 46
Thumbs up Confused with Apt-Pinning


Currently running Squeeze and wanted to learn some programming (Just a book on python3)
#aptitude search python3.1 - returns nothing.


Googled and understand that python3.1 is in experimental and read about apt-pinning (http://jaqque.sbih.org/kplug/apt-pinning.html). Added the unstable and experimental repository and the /etc/atp/preferences file.

#aptitude search python3.1 returns a list of apps now - good.


Now,
#aptitude install python3.1 - allows me to install python3.1
#aptitude -t experimental install python3.1 - also allows installing of python3.1


Q1. As the above 2 command gives the identical outcome, what is the difference between the 2 command above?

Q2. Assuming I keep the repositories, in future how would I know if the packages I install is from which repositories?
 
Old 08-01-2009, 12:11 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
The reason is your preferences file. You give weighted preferences (presumably higher for squeeze than experimental). Now you want to install python3.1 so the system first looks in the squeeze repos and can't find it. Then it tries (as per your preferences file) the experimental repos and there it is. You would only see a difference in behaviour of your two commands (with or without the -t experimental) if the package you want to install has the same name in both repos.

Hope that's clear.
Cheers,
jdk
 
Old 08-01-2009, 05:30 AM   #3
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by jdkaye View Post
The reason is your preferences file. You give weighted preferences (presumably higher for squeeze than experimental). Now you want to install python3.1 so the system first looks in the squeeze repos and can't find it. Then it tries (as per your preferences file) the experimental repos and there it is. You would only see a difference in behaviour of your two commands (with or without the -t experimental) if the package you want to install has the same name in both repos.

Hope that's clear.
Cheers,
jdk
Hi jdk, thanks for replying.

So, my perception that experimental will be triggered only with the -t experimental option is wrong.

Q1. Apt-get (aptitude) will install whatever is available in any of the repositories listed in source.list - preference given to the higher weighted repositories?

The -t experimental option will force an install from the experimental repositories even if the package is available in other repositories.


Q2. If I am to do a apt-get upgrade, does it mean that I will be upgrading from SID instead of Testing?


Q3. If you allow me to sidetrack a little. Assuming that the mirror that I've configured for testing is

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

Am I right to safely assume that the unstable and experimental repository will be:

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


Thanks in advance for the help

Last edited by michalng; 08-01-2009 at 05:49 AM.
 
Old 08-01-2009, 07:32 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by michalng View Post
Hi jdk, thanks for replying.

So, my perception that experimental will be triggered only with the -t experimental option is wrong.

Q1. Apt-get (aptitude) will install whatever is available in any of the repositories listed in source.list - preference given to the higher weighted repositories?
That's correct.

Quote:
The -t experimental option will force an install from the experimental repositories even if the package is available in other repositories.
correct.


Quote:
Q2. If I am to do a apt-get upgrade, does it mean that I will be upgrading from SID instead of Testing?
No, you will be upgrading whatever version is currently installed. If you installed a testing version of program X and a later testing
version is now available that will be installed. You can see that this must work this way. Otherwise you'd wind up with a pure Sid installation.

Quote:
Q3. If you allow me to sidetrack a little. Assuming that the mirror that I've configured for testing is

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

Am I right to safely assume that the unstable and experimental repository will be:

deb http://http.us.debian.org/debian/ unstable main contrib non-free
deb http://http.us.debian.org/debian/ experimental main contrib non-free
I'm sure that's true for unstable. That's what I use. You'd have to check about experimental yourself.
Quote:
Thanks in advance for the help
you're quite welcome
jdk
 
Old 08-01-2009, 07:39 AM   #5
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,886
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
You might take a look at Howto: Set up and Maintain a Mixed Testing/Unstable System - http://forums.debian.net/viewtopic.php?f=16&t=15612
 
Old 08-01-2009, 06:05 PM   #6
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Original Poster
Rep: Reputation: 46
After reading all your comments and link http://forums.debian.net/viewtopic.php?t=15612

I'll remove the /etc/apt/prefereneces and create /etc/apt/apt.conf with contents
Quote:
echo 'APT:efault-Release "testing";
Installation of python3 will be by the command
Quote:
aptitude install python3.1/experimental

The repositories that I will be using will be :

deb http://ftp.jaist.ac.jp/pub/Linux/Debian/ testing main contrib non-free
deb http://ftp.jaist.ac.jp/pub/Linux/Debian/ unstable main contrib non-free
deb http://ftp.jaist.ac.jp/pub/Linux/Debian/ experimental main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free




Thanks again for the help
 
  


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 /etc/apt/apt.conf parent's_basement Debian 5 10-26-2008 05:50 PM
apt pinning aquaboot Debian 2 10-14-2008 03:44 AM
Apt-pinning question Tortanick Debian 3 06-02-2007 09:16 AM
apt pinning question divukman Debian 3 12-01-2005 10:49 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 10:08 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
Open Source Consulting | Domain Registration