Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100219 - drupal ebuilds have no database dependencies
Summary: drupal ebuilds have no database dependencies
Status: RESOLVED DUPLICATE of bug 159781
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Lim Swee Tat (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 05:31 UTC by Vincent
Modified: 2007-01-03 18:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent 2005-07-25 05:31:36 UTC
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.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-25 05:39:17 UTC
You don't need a local database engine to use drupal, it can be a database on
any other machine. 
Comment 2 Vincent 2005-07-25 05:49:32 UTC
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).
Comment 3 Caleb Tennis (RETIRED) gentoo-dev 2005-07-25 11:36:44 UTC
Are you offering to author the needed changes to the ebuild? :) 
Comment 4 Brandyn A. White 2005-07-25 19:50:54 UTC
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.
Comment 5 Vincent 2005-07-26 00:43:45 UTC
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.
Comment 6 Lim Swee Tat (RETIRED) gentoo-dev 2005-11-05 20:49:57 UTC
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.
Comment 7 Vincent 2005-11-07 05:52:48 UTC
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.
Comment 8 Renat Lumpau (RETIRED) gentoo-dev 2007-01-03 18:09:20 UTC

*** This bug has been marked as a duplicate of 159781 ***