LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   sources.list: what is a deb-src? (https://www.linuxquestions.org/questions/linux-general-1/sources-list-what-is-a-deb-src-873834/)

newbiesforever 04-08-2011 03:15 PM

sources.list: what is a deb-src?
 
In a typical sources.list in a Debian-based distro, I see a line that begins with "deb," and right below it, the same repo preceded by "deb-src." I can figure out that that means "Debian source," but what's the difference between a "deb" and a "deb-src"?

My current sources.list has almost all the deb-src lines removed; I believe I did that at some point because Synaptic was giving me error messages over there being too many entries in my sources.list, and I must have thought the deb-src lines were redundant. I assume I was wrong, eh? The deb-src lines must be there for a reason. I might not have been certain the error messages were due to having too many sources, either; maybe that was only my guess.

AlucardZero 04-08-2011 03:17 PM

The lines starting with "deb" are binary package repositories (ie. the place where the ".deb" packages which get installed are downloaded from).

The ones starting with "deb-src" are source package repositories, which provide access to the source code of the applications and the files needed to create a ".deb" package out of them.

So, unless you are involved with packaging work, or you want this as a convenient way to access the application's source code (if you have the appropriate "deb-src" lines you can get the code for, eg., gbrainy, by running "apt-get source gbrainy"), you can just comment out those lines.



the above text stolen from http://ubuntuforums.org/showthread.php?t=113615

newbiesforever 04-08-2011 03:25 PM

Quote:

Originally Posted by AlucardZero (Post 4318390)
The lines starting with "deb" are binary package repositories (ie. the place where the ".deb" packages which get installed are downloaded from).

The ones starting with "deb-src" are source package repositories, which provide access to the source code of the applications and the files needed to create a ".deb" package out of them.

So, unless you are involved with packaging work, or you want this as a convenient way to access the application's source code (if you have the appropriate "deb-src" lines you can get the code for, eg., gbrainy, by running "apt-get source gbrainy"), you can just comment out those lines.



the above text stolen from http://ubuntuforums.org/showthread.php?t=113615

Thanks, that answered my question. I'm not a programmer, so I guess I didn't make a mistake by removing the deb-src lines.

knudfl 04-08-2011 04:32 PM

"deb-src lines" can be quite useful, if you want a later version of a package.
( By adding e.g. debian sid lines, or Ubuntu natty lines.)

1) sudo apt-get build-dep <name>
2) apt-get -b source <name>=<version>

Example http://www.linuxquestions.org/questi...-deb-855498/#2


All times are GMT -5. The time now is 04:18 PM.