Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2012 22:29:21 GMT
From:      "Matthew X. Economou" <xenophon+freebsd@irtnog.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/169248: www/py-django-cms doesn't check for (required) database support in Django
Message-ID:  <201206192229.q5JMTLdu029711@red.freebsd.org>
Resent-Message-ID: <201206192230.q5JMUHW0076125@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169248
>Category:       ports
>Synopsis:       www/py-django-cms doesn't check for (required) database support in Django
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 19 22:30:17 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Matthew X. Economou
>Release:        9.0
>Organization:
IRTNOG
>Environment:
FreeBSD cinep100bsdweb.irtnog.net 9.0-RELEASE-p1 FreeBSD 9.0-RELEASE-p1 #8: Fri May 11 17:08:28 EDT 2012     root@cinep001bsdgw.irtnog.net:/usr/obj/usr/src/sys/FIREWALL  amd64
>Description:
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.
>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.)
>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.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206192229.q5JMTLdu029711>