LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-12-2009, 08:05 AM   #1
unev_21
Member
 
Registered: Mar 2009
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 16
Lightbulb Help in writing apt-get 'sources.list'


Hi,

Im tring to understand how to write a sources.list file. I have the following questions-

1) Assume my sources.list has two sources A & B to pick the packages from. A has latest version for few packages & B has latest for remaining packages. How should I write my sources.list file

Regards,
unev
 
Old 09-12-2009, 08:35 AM   #2
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 unev_21 View Post
Hi,

Im tring to understand how to write a sources.list file. I have the following questions-

1) Assume my sources.list has two sources A & B to pick the packages from. A has latest version for few packages & B has latest for remaining packages. How should I write my sources.list file

Regards,
unev
In the very first thread of this forum (Debian) there zillions of examples of sources.list files. Just look at a few and you'll get the idea. The order in which you put the files is irrelevant since (in principle) no source should have the same packages in the same version (Lenny, Squeeze, Sid, Experimental, etc.) as any other. In most cases these sources come in pairs: the binary packages and the source (src) packages.

cheers,
jdk
 
Old 09-12-2009, 09:06 AM   #3
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
if you dont do some magic like pinning or editing conf-files the package-managing will pick the newest version. out of box.

-----
eg: this line in /etc/apt/apt.conf
Code:
APT::Default-Release "testing";
will set the default release to testing if you run a mixed testing/unstable system (to install from unstable you would need to do it like in the next example)


if you got a lenny-backports for lenny, or experimental-repo and sid,you need explicit tell apt* to install from there:
Code:
apt-get install -t lenny-backports package_name
apt-get install -t experimental package_name
u can run a simultated installation to check if it works out the way you want it:
Code:
apt-get install -s package_name
i for one am very happy with the official debian-repos (either lenny and lenny-backports or a pure debian-unstable repo. + e17 repos, but thats a different story.)

greetings

(replace apt-get with aptitude or synaptic or any tool you prefer).

Last edited by j1alu; 09-12-2009 at 09:07 AM.
 
Old 09-12-2009, 10:37 AM   #4
unev_21
Member
 
Registered: Mar 2009
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 16
thanks guys...let me try out the examples jdkaye pointed out...
 
Old 09-12-2009, 11:12 PM   #5
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 unev_21 View Post
thanks guys...let me try out the examples jdkaye pointed out...
Just remember to use the sources.list appropriate to your installation. If you're using Lenny, then make sure that lenny or stable appear in each repo. I use testing (aka squeeze) so my repos look like this:
Code:
deb http://ftp.de.debian.org/debian/ testing main non-free contrib
Got it?
jdk
 
Old 09-13-2009, 03:48 AM   #6
unev_21
Member
 
Registered: Mar 2009
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 16
Not exactly jdkaye....
You mentioned "deb http://ftp.de.debian.org/debian/ testing main non-free contrib" Here there is no reference to squeeze. How does apt-get know that it has to download packages for squeeze..

I just dont get the concept of how apt-get works...It will be great if some one can direct me to appropriate knowledge base...

Last edited by unev_21; 09-13-2009 at 03:49 AM.
 
Old 09-13-2009, 04:28 AM   #7
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
Quote:
Originally Posted by unev_21 View Post
Not exactly jdkaye....
You mentioned "deb http://ftp.de.debian.org/debian/ testing main non-free contrib" Here there is no reference to squeeze. How does apt-get know that it has to download packages for squeeze..

I just dont get the concept of how apt-get works...It will be great if some one can direct me to appropriate knowledge base...
Squeeze is the current codename for the Testing distribution.
So you can use either squeeze or testing in your sources.list.
It makes no difference to apt at the moment.
 
Old 09-13-2009, 04:52 AM   #8
unev_21
Member
 
Registered: Mar 2009
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 16
Thanks all.

I found a primer for apt-get. http://www.linux.com/archive/feature/113879
It answered all my queries....
 
Old 09-13-2009, 08:54 AM   #9
culaterout
Member
 
Registered: Jul 2006
Location: colorado
Distribution: Debian, Arch Linux, Linux Mint, Ubuntu, Fedora, Suse, Mepis, Redhat, Sayabon, mandrake and android (
Posts: 192

Rep: Reputation: 29
Quote:
Originally Posted by unev_21 View Post
Thanks all.

I found a primer for apt-get. http://www.linux.com/archive/feature/113879
It answered all my queries....
Thank you for posting this!!!


Starting to understand what makes Debian so much better then Linux Mint or Ubuntu...

yes, I can see how I could setup Ubuntu for this, but its kinda spotty...

Not as much control as with Debian....
 
Old 09-13-2009, 11:50 PM   #10
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
As you're just getting started, I would recommend that you use aptitude and not apt-get for your packages. If you wish to know why, just search LQ for aptitude apt-get and you'll find loads of threads discussing this point.
cheers,
jdk
 
  


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
disabling cd sources in apt/sources.list revod_neb Linux - Newbie 4 05-25-2013 12:03 PM
apt-get; E: Type 'GPG' is not known on line 20 in source list /etc/apt/sources.list tomorrow Linux - Newbie 9 05-21-2009 08:42 AM
Need Recommendation for Debian Etch sources.list ( /etc/apt/sources.list ) forgox Debian 6 05-05-2007 01:57 PM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 12:28 PM
apt-get sources.list utw-mephisto Debian 5 05-17-2005 11:36 PM

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

All times are GMT -5. The time now is 04:21 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