Hi,
I've made the modification on ensure_aptitude_role, but I'm not confortable with it yet.
I had to add an optional argument to the method called source_name. If provided, the source line will be added to a file <source_name>.list on sources.list.d directory. Well, the problem with this approach is that now the method will behave differently if this second parameter was provided.
A couple of solutions to this problem:
1) "slugify" the source line and use it as a name. This could make the filename something like packages.ubuntu.com-natty-something-foo-bar.list, which IMHO is not very good. (Maybe we could use just hostname part and append to that file?)
OR
2) just revert the modification (so the repo will continue to be added to sources.list). The disadvantage is if we update the system maybe (I didn't test it yet) this file will be overwritten by the new one.
What do you think?
Thanks,
Rodrigo Machado