Rails has db uses flags "mysql postgres sqlite sqlite3" but actually rails has nothing to do with db. It's activerecord that "need" an db adapter to work. I installed rails with the postgres useflags, then I wanted to play a little bit with camping and sqlite3, but camping has no db use flags (then sqlite3-ruby was not installed) nor activerecord. The only solution was to emerge sqlite3-ruby by hand. I thought that the "thing to do" was to add some db uses flags to camping, but I realized that some other packages that depends on activerecord might have the same "problem". Here is the list of the packages I founded (poor grep in dev-ruby portage tree) that depends on activerecord : rails camping ruby-activeldap actionwebservice adhearsion Only rails have db use flags, and add db uses flags to all these packages is probably not a good idea since someone can emerge only activerecord and then still having no db adapter, and it's a lot of work to maintain (if activerecord add support for another db, you have to modify all ebuilds that depends on activerecord, it's weird). The best may be to move the db use flags from rails ebuild to activerecord ebuild, here are two patches : one for activerecord (current stable version) and one for rails (current stable version). Patches just move the uses flags and db adapter dependencies from rails to activerecord. thanks for reading and have a nice day :) Reproducible: Always
Created attachment 135585 [details, diff] patch for activerecord ebuild to add db uses flags
Created attachment 135586 [details, diff] patch for rails ebuild that remove db uses flags
This makes sense to me. Thanks for digging around and providing patches, Alexandre. Richard, Joshua, any comments from your side on this? Will this break anything already in the tree?
This seems pretty reasonable to me. Two points though: * There should be revision bumps for both packages. * Rails should have a post-install message about the use flags moving.
fixed in rails 2.0.2
Re-opening. The issue is not yet fixed for Rails 1.2.x, and furthermore packages depending on activerecord should be properly notified.
Closing this as all new versions of activerecord now carry the USE flags. All packages that depend on activerecord have no database-related USE flags, which is correct. The only exception is metasploit, but that is strongly linked to Rails 1.2, which does not have these USE flags yet.