LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-18-2005, 09:56 AM   #1
nazdrowie
Member
 
Registered: Oct 2004
Distribution: Debian
Posts: 39

Rep: Reputation: 15
all i want is a decent /etc/apt/sources.list file


I was just wondering if somebody could explain to me the intricacies of the /etc/apt/sources.list file on a debian system. I've read some documenation and articles and none of them seem complete.

The apt how-to (http://www.debian.org/doc/manuals/ap...s-sources.list) has the following example:

Quote:
We usually find the following in the default Debian sources.list:

# See sources.list(5) for more information, especially
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
deb http://http.us.debian.org/debian stable main contrib non-free
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free

# Uncomment if you want the apt-get source function to work
#deb-src http://http.us.debian.org/debian stable main contrib non-free
#deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
but nowhere does it mention how to modify it to use either the testing or unstable distributions. This would be fine (I'd just substitute 'testing' or 'unstable' for 'stable' in the above example for all the lines, INCLUDING the security.debian.org line), if it weren't for the following:

Quote:
Example - stable

The sources.list for using stable reads --

# See sources.list(5) for more information
deb http://http.us.debian.org/debian stable main contrib non-free
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free

security.debian.org is only relevant for stable since the core stable is supposed to be constant. With the other distributions, security updates are just normal package updates.
Note the bottom paragraph of the above quote (which I got from http://www.mayin.org/ajayshah/COMPUT...rinciples.html), which is causing me some confusion. Is the above correct?

And I've also read somewhere that you're not supposed to mix stable with testing or unstable (and testing with stable or unstable, etc.) in the /etc/apt/sources.list file. But I've seen examples where people list their preferred distributions: say they'll list 'stable' lines first, then 'testing', if they prefer stable to testing. What is the deal?
 
Old 01-18-2005, 10:38 AM   #2
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
Here is an example with "testing" and "unstable"
Code:
deb ftp://ftp.debian.org/debian unstable main contrib non-free
#deb-src ftp://ftp.debian.org/debian unstable main contrib non-free

deb ftp://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free
#deb-src ftp://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free

deb ftp://ftp.debian.org/debian testing main contrib non-free
#deb-src ftp://ftp.debian.org/debian testing main contrib non-free

deb ftp://non-us.debian.org/debian-non-US testing/non-US main contrib non-free
#deb-src ftp://non-us.debian.org/debian-non-US testing/non-US main contrib non-free

deb ftp://security.debian.org/debian-security testing/updates main contrib non-free
#deb-src ftp://security.debian.org/debian-security testing/updates main contrib non-free
There are security updates in testing. If you use the above sources.list, every package will be installed from "unstable" by default because it has the latest versions. You can run a mix of testing/unstable by using pinning. Se the document here: http://www.debian.org/doc/manuals/apt-howto/ch-apt-get especially the part about keeping a mixed system.
 
Old 01-18-2005, 09:50 PM   #3
nazdrowie
Member
 
Registered: Oct 2004
Distribution: Debian
Posts: 39

Original Poster
Rep: Reputation: 15
Thank you for the reply.

I'm not sure if the bit of code you posted is actually a part of your /etc/apt/sources.list file, but if it is, then you should check out the following:

http://lists.debian.org/debian-user/.../msg00119.html

Supposedly, using http rather than ftp is the way to go. I know the link I provided is kind of weak: the guy says 'I have heard that people get...'.
I had read something a little bit more convincing a while ago, but can't seem to be able to find it with google now. Does anyone care to comment?
 
Old 01-18-2005, 10:28 PM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
HTTP is a faster protocol than FTP. At least, that is what is said....

If you have both "testing" and "unstable" in your sources.list, you can use apt-get like this:

apt-get install -t testing foo
--or--
apt-get install -t unstable foo

Dependencies get solved automatically. I think pinning is only needed if you do a distro upgrade to the next higher version or so. For individual packages you don't need it.

It is also not recommended to use a mixed system with all three versions. Stable-testing or testing-unstable should be ok. Stable-testing-unstable is not a good idea. Although I have this situation on one of my desktop systems, and problems are few, only with KDE.

jlinkels
 
  


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
Need Recommendation for Debian Etch sources.list ( /etc/apt/sources.list ) forgox Debian 6 05-05-2007 02:57 PM
correct setting of /etc/apt/sources.list for local file pascalv Linux - Software 4 07-15-2005 10:24 AM
My apt sources.list file his mess up! NeeD_ResT Debian 3 11-20-2004 11:47 AM
How does your /etc/apt/sources.list file looks like? sud_crow SUSE / openSUSE 1 10-30-2004 06:25 AM
I need help configuring my apt-get sources.list file... Mr.Radar Debian 4 06-01-2004 10:40 AM

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

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