[Pkg-linaro-lava-devel] Bug#755610: RFH

Raphael Hertzog hertzog at debian.org
Mon Sep 8 14:48:01 UTC 2014


On Mon, 04 Aug 2014, Neil Williams wrote:
> ./lava_server/manage.py fails with
> django.core.exceptions.ImproperlyConfigured: Application labels aren't
> unique, duplicates: django_tables2
>
> I can't find a duplicate within lava-server. A search turns up the docs
> on AppConfig (which lava-server doesn't yet use) and the example in the
> docs doesn't seem to fix the issue. The example also doesn't seem
> backwards compatible, so that would need to be supported in any
> prospective change.

The problem is in lava_scheduler_app/extension.py that adds django_tables2
a second time to INSTALLED_APPS.

> If someone can help with a fix for this stage, it would be very much
> appreciated. The following steps will make up the basis of the tests
> for lava-server with django1.7:

Shall we work on patches based on the Debian package or based on th
upstream master branch or on the 2014.08 release ?

BTW, I did debcheckout to easily create patches to send you only to
discover that your git directory unhelpfully doesn't integrate the
upstream sources. I modified a file just to see that "git diff"
doesn't show me anything :-(

So the first fix is this one:
--- a/lava_scheduler_app/extension.py
+++ b/lava_scheduler_app/extension.py
@@ -68,7 +68,8 @@ class SchedulerExtension(LavaServerExtension):
 
     def contribute_to_settings(self, settings_module):
         super(SchedulerExtension, self).contribute_to_settings(settings_module)
-        settings_module['INSTALLED_APPS'].append('django_tables2')
+        if 'django_tables2' not in settings_module['INSTALLED_APPS']:
+            settings_module['INSTALLED_APPS'].append('django_tables2')
         from_module = settings_module.get('SCHEDULER_DAEMON_OPTIONS', {})
         settings_module['SCHEDULER_DAEMON_OPTIONS'] = {
             'LOG_FILE_PATH': None,

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/



More information about the Pkg-linaro-lava-devel mailing list