Bug 169248 - www/py-django-cms doesn't check for (required) database support in Django
Summary: www/py-django-cms doesn't check for (required) database support in Django
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ruslan Makhmatkhanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-19 23:30 UTC by xenophon+freebsd
Modified: 2012-10-17 20:48 UTC (History)
0 users

See Also:


Attachments
py-django-cms.txt (132.74 KB, text/plain)
2012-06-21 20:05 UTC, xenophon+freebsd
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description xenophon+freebsd 2012-06-19 23:30:17 UTC
By default the www/py-django port does not include support for a database backend, which Django CMS requires.  The www/py-django-cms port doesn't check for this, which will prevent the CMS from running.

Fix: 

All the www/py-django port does when you enable support for a particular database is add that database client to its RUN_DEPENDS - the set of files installed by the port (or the configuration of django itself) doesn't change.  In fact, if you look at www/py-django/pkg-plist, you'll see that django includes database backends for Oracle and others not found in the ports tree.  So we could approach this two ways:

(1) Figure out some test for database support in django, and then set BROKEN or pkg_message accordingly.

(2) Add similar knobs/dependencies to the www/py-django-cms port (plus an OTHER_DB option?), and set BROKEN none of them are turned on.

The first option feels cleaner (by recording the database client dependencies on the django runtime where they belong), while the second option might be easier.
How-To-Repeat: If a user performs a default install of Django and Django CMS from ports, and then they try out the CMS following the instructions in the py-django-cms pkg_message, they will get the following error when running syncdb:

django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

(Note that the database engine used in the example configuration is Sqlite 3.x.)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-19 23:31:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-python

freebsd-python@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-19 23:31:12 UTC
Maintainer of www/py-django-cms,

Please note that PR ports/169248 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/169248

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-19 23:31:15 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 xenophon+freebsd 2012-06-21 20:05:34 UTC
Attached is an update to www/py-django-cms based on feedback from the
freebsd-ports@ mailing list.  The updated version of this port
explicitly targets Django 1.3, and it uses the new optionsng framework
to prompt the user for a database backend (SQLite is the default).  I
bumped PORTREVISION to account for these changes.

-- 
I FIGHT FOR THE USERS

Comment 5 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2012-10-17 20:46:20 UTC
Responsible Changed
From-To: freebsd-python->rm

I will take it.
Comment 6 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2012-10-17 20:48:09 UTC
State Changed
From-To: feedback->closed

Committed, thank you! I leaved django13 chunk apart, because some of the 
dependencies will pull django 1.4 and there will be conflict(failing 
build).