Why is debian using /etc/apt/sources.list.d/ sub sources?
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 3922
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
I have been arguing this to no good result in our Debian distro, but I was talking to some people online and decided to research just where the logic and problem that the subfiles in /etc/apt/sources.list.d/ are supposed to be solving are really from?

Since, as you know, in Debian, you say do this:

etch repo mirrors when etch is testing -> keep to etch stable, no change in sources.list

stable to stable, never a change to sources.list

testing to testing, never a change, rolling release...

sid to sid, unstable to unstable, never a change, rolling release.

So for most users, using sub files in /etc/apt/sources.list.d/ solves exactly NO problems. Which is why Debian used sources.list for so long

So we were talking, as we are wont to do, on irc, wondering where this silliness came from. After one guy explained the reasoning behind this logic, ie, easy to update automatically to new repo version, a problem that does not really need a solution in real debian, I began to ask myself, ok, that's a clear logic, but the solution is not for a problem we have in debian.

That of course made the light go on in my head, and I thought to myself, aha... so what brown colored distro creates problems and solutions that do not apply to Debian, but which Debian often has to deal with? You guessed it, Ubuntu. So with this search: ubuntu /etc/apt/sources.list.d all the lights went on.

Now I found the problem that needed this solution. Ubuntu versions do in fact require updating every new release, this method is a solution for UBUNTU users, NOT for Debian users:

:: Code ::
udo wget http://wine.budgetdedicated.com/apt/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/winehq.list

For Ubuntu Feisty (7.04):
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list

For Ubuntu Edgy (6.10): *64-bit packages not available*
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/edgy.list -O /etc/apt/sources.list.d/winehq.list

For Ubuntu Dapper (6.06): *64-bit packages not available*
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/dapper.list -O /etc/apt/sources.list.d/winehq.list

For Debian Etch (4.0):
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/etch.list -O /etc/apt/sources.list.d/winehq.list
winehq repos

You see? Every new ubuntu release, you need to inject new data into the winehq.list. You do not generally need to do this with your Debian.

:: Code ::
E: Malformed line 2 in source list /etc/apt/sources.list.d/edgy-multiverse.list (dist parse)....
and my edgy-multiverse.list looks like this:
# automatically added by gnome-app-install on 2007-02-02 22:43:25.526790
deb http://us.archive.ubuntu.com/ubuntu/ edgy
deb http://security.ubuntu.com/ubuntu edgy-security multiverse
deb http://us.archive.ubuntu.com/ubuntu/ edgy-updates multiverse
edgy-multiverse repos

See? Each Ubuntu upgrade to new version looks for this file, removes it, replaces it with the next version name repo file. This solution is NOT for Debian, it is for Ubuntu.

:: Code ::
The /etc/apt/sources.list.d directory is provided in Ubuntu 6.06 LTS to allow packages and administrators to add new respositories to the system without changing the default /etc/apt/sources.list file.

Since all EasyUbuntu needs to do is enable the Universe and Multiverse repositories (should that option be checked in the installer) a suggested file for use in that directory is as follows (please modify as appropriate, I admit I'm new to this!):

/etc/apt/sources.list.d/easyubntu.list:

launchpad repos

So I suggest debian users lower their enthusiam level for a technique that solves no real Debian problems for most users, except in very fringe, highly complex scenarios like advanced proxy use, etc.

:: Code ::
'E:Type '--09:02:53--' is not known on line 1 in source list /etc/apt/sources.list.d/medibuntu.list, E:The list of sources could not be read.'
medibuntu repos

What is the exact problem that Ubuntu needs to solve?
It's very easy to explain. Every new release, all ubuntu users need to update their sources, or have the updating scripts automatically update their sources, and by simply replacing them with new sources, say for hardy heron, icky ick, or whatever, they avoid complex script manipulations. This is NOT, I repeat NOT, an issue for most Debian users, who use stable repos, and run rolling release distros, whether daily rolling like sid or testing, or release to release rolling like stable to stable.

debian users do not need this because debian does not use this same frozen pool release model, its stable is always stable, its testing is always testing, and so on.

And most debian users who prefer to use the release names instead, say to avoid accidental upgrades of a server to new stable before they are ready, are doing this manually anyway, and should be.

So this is all about supporting those millions of ubuntu users, and has almost nothing to do with supporting Debian users, who didn't need this at all.
Back to top
dzz
Status: Interested
Joined: 15 Sep 2008
Posts: 44
Location: Devon, England
Reply Quote
It gets worse. I have a local repo in my sources.list which I put at the top as a file:/ url. Apt always goes there first.

If I change to sources.list.d system there is no way of prioritising what I have put in my local cache, e.g. from another box. It then goes to the internet to download the same stuff yet again.

Is this not a regression?
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 3922
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Of course, the original premise of this thread was that debian actually WAS using the .d/.... method, which they aren't, though I'd assumed they were.

Ubuntu is using it, and many configs have the option to use the ....d/... method for config file, but Debian does NOT use it by default.

Yes, it's a regression, and one done only to make Ubuntu's upgrade path work somewhat, since it's easier to replace the ..d/... files than to parse the one file. And no it doesn't work as cleanly, predictably, or reliably, as the standard single file, exactly as you noted. And yes, it's a pointless thing, done for generally bad reasons (but not always bad, just usually bad - there are a tiny set of very rare circumstances where using this method actually solves problems, but almost no regular users will ever see those)

In smxi, if you start it with -x option, in misc tweaks, advanced tweaks, you'll see an option to remove all the sub files and move their content back to sources.list, where the data belongs. I leave this as a hidden option to keep the peace with a certain distro that goes into large panics if you change or question any of their decisions.

It does make some sense for Ubuntu to use this method, since each upgrade they have to alter the source files for all repos, but any true Debian style rolling release, as a default, the only real reason I could ever see for doing it this way by default was to enable weak programmers to work with the files. That's because with Debian, you don't change this data more than one time generally, if that, and editing one file with a few lines of content is a heck of lot easier and more convenient than editing x number of tiny files with the same exact content.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours