OK, so, my latest test paste.ubuntu.com/13514297 Multiple URI, multiple releases, everything respected . . . except default case. . . I still don't get it
% cat sources.list deb archive.ubuntu.com/ubuntu wily main % perl script.pl enable backports deb archive.ubuntu.com/ubuntu wily-backports main #Added by script
% cat sources.list
deb archive.ubuntu.com/ubuntu wily main
% perl script.pl enable security
deb archive.ubuntu.com/ubuntu wily-security main #Added by script
@A.B. I don't understand, one of us is messing up. I just copied and pasted from your last link to a new file, foo.pl, and sources.list (in the same directory) contains this line: deb archive.ubuntu.com/ubuntu wily main
Here's the output:
% cat sources.list
deb archive.ubuntu.com/ubuntu wily main
% perl foo.pl enable security
deb archive.ubuntu.com/ubuntu wily-security main #Added by script
deb http://security.ubuntu.com/ubuntu/ wily-security multiverse main universe restricted deb-src http://security.ubuntu.com/ubuntu/ wily-security multiverse main universe restricted #Added by software-properties
@A.B. Side note, it doesn't work on deb-src yet, so don't bother about that. I didn't add it because it's the same as what it does already, but I want to be sure there are no errors in what I have before continuing, or I'll have to rewrite everything again.
@A.B. By the way it's still a beta, it has everything (chekcs src, URIs, already enabled components) but can't delete (and it can be polished quite a bit, I'll do it if it works).
I understand you want to have each URI associated with all the components it has paste.ubuntu.com/13514568 That is a bit difficult to do.
If we have
deb http://it.archive.ubuntu.com/ubuntu wily main deb http://us.archive.ubuntu.com/ubuntu wily-backports main
deb it.archive.ubuntu.com/ubuntu wily universe
Then what is the expected output ?
Also, what is the purpose of the default ? The default , I understand , should be deb URI and the release, trusty or wily . . . OK, but problem is what if we have default for one URI enabled and then there's one URI that is non default ? My guess is that default will be enabled just for one URI, but that means the URI and the source have to be associated.
It may be possible to do, but I think it's too complex. There's bunch of things to keep associated