I installed drupal today and wanted to take advantage of Portage dependancy handling to have everything needed installed (my box did not have apache, PHP nor mySQL installed). While the drupal ebuild correctly pulled in PHP and apache2, the installation did not cause any database to be installed. This is a problem as a database is mandatory for drupal. I had to manually emerge MySQL. This issue was all the more problematic as I wanted Portage to do the job of dealing with database issues for me. Instead, I now have to handle all that myself (add users to the DB, create required tables, etc). This job should be handled by Portage here. Since drupal supports both PostgreSQL are MySQL, a virtual depend should be considered (sth like virtual/database). Note that installing MySQL does not change anything nor does the mysql USE flag. Reproducible: Always Steps to Reproduce: 1. Do not have MySQL installed (or unmerge it) 2. emerge -pv drupal 3. The output does not show that mySQL will be installed Looking at the ebuild, I see no dependancy on mySQL, only one on PHP (via virtual/php). Actual Results: Drupal was merged. MySQL did not. I will also have to handle the database job myself (adding drupal user to MysSQL, creating drupal tables, managing grants). Expected Results: MySQL should have been merged too + drupal DB user and drupal DB tables should have been created + proper grants should have been set on the tables.
You don't need a local database engine to use drupal, it can be a database on any other machine.
Granted. There should however exist an option to do the DB-related job on the database the user would provide the address to (and parameters as well).
Are you offering to author the needed changes to the ebuild? :)
I have a solution to this, I already posted a major change to the ebuild in BUG#100077, I can make it require mysql if the mysql use flag is set. Is this an acceptable solution? Also, I really need somebody to review my patches in that bug I listed to get them committed. The drupal ebuild really needs it and I put a lot of work into it and tested them pretty good.
Hello, Caleb : no, sorry. I am not sufficiently knowledgeable into portage/ebuild programming to offer to author the changes myself. Brandyn : your ebuild in bug#10077 looks good. Thanks for patching the postinstall file as well, this will help me do the DB-related stuff by hand. I can also test the ebuild if you need it.
Hi, I have a simpler fix for that where I change RDEPEND so that at least either mysql or postgresql is insatlled before we install the system. I can add apache to RDEPEND too. RDEPEND states the dependencies that are required during run time of the application vs DEPEND which are dependencies that are required for the compilation of the application. Hope this sits well with you, and excuse me for the tardiness.
Thanks for the update. The RDEPEND fix is a good idea; however, as Jakub pointed out, the database could be be on another machine. The RDEPEND thing would fail, with no valid reason for it. How about adding some small script/post-install step that would, if a local DB is available, do the DB-related tasks automatically? My point was that there is no documentation nor help to finish the installation if the DB is available on the machine. The user has to do that himself (this requires reading instructions about drupal, etc). Reopening as the fix is not satisfactory. The DB could well be on another machine yet the ebuild would mandate that there is a local installation of either mySQL/Postgres. I cannot comment more on the solution : could you attach your proposed ebuild/patch? Thanks.
*** This bug has been marked as a duplicate of 159781 ***