stx-gui: put starlingx specific files to right pythonpath 77/3677/1
authorLitao Gao <litao.gao@windriver.com>
Tue, 12 May 2020 12:01:03 +0000 (08:01 -0400)
committerLitao Gao <litao.gao@windriver.com>
Wed, 13 May 2020 06:22:22 +0000 (02:22 -0400)
horizon is expecting pythonpath to be
    /usr/share/openstack-dashboard/openstack_dashboard/

so part of starlingx-dashboard files should be placed this
path instead of ${PYTHON_SITEPACKAGES_DIR}

Issue-ID: INF-106
Issue-ID: INF-102
Signed-off-by: Litao Gao <litao.gao@windriver.com>
Change-Id: I112b0c00d574a6046950a9d1d45bf99e7fe16c62

meta-stx/recipes-core/stx-gui/stx-gui.bb

index 5325f85..3c914d2 100644 (file)
@@ -38,9 +38,9 @@ DEPENDS = "\
        python-pbr-native \
        "
 
-#RDEPENDS_starlingx-dashboard += " \
-#      openstack-dashboard \
-#      "
+RDEPENDS_starlingx-dashboard += " \
+       python-django-horizon \
+       "
 
 RDEPENDS_starlingx-dashboard_append = " \
        ${PYTHON_PN}-cephclient \
@@ -61,17 +61,22 @@ do_compile () {
 do_install () {
        cd ${S}/starlingx-dashboard/starlingx-dashboard
        distutils_do_install
-       #install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/enabled/
-       #install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/themes/starlingx/
-       #install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.d
-       #install -p -D -m 755 build/lib/starlingx_dashboard/enabled/* \
-       #               ${D}/${datadir}/openstack-dashboard/openstack_dashboard/enabled/
-       #install -p -D -m 755 build/lib/starlingx_dashboard/themes/* \
-       #               ${D}/${datadir}/openstack-dashboard/openstack_dashboard/themes/starlingx_dashboard
-       #install -p -D -m 755 build/lib/starlingx_dashboard/local/local_settings.d/* \
-       #       ${D}/${datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.d
+
+       install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/enabled/
+       install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/themes/starlingx/
+       install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.d
+       cp -ra ${D}${PYTHON_SITEPACKAGES_DIR}/starlingx_dashboard/enabled/* \
+                       ${D}/${datadir}/openstack-dashboard/openstack_dashboard/enabled/
+       cp -ra ${D}${PYTHON_SITEPACKAGES_DIR}/starlingx_dashboard/themes/starlingx/* \
+                       ${D}/${datadir}/openstack-dashboard/openstack_dashboard/themes/starlingx/
+       cp -ra ${D}${PYTHON_SITEPACKAGES_DIR}/starlingx_dashboard/local/local_settings.d/* \
+                       ${D}/${datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.d
+       # comment out this line with syntax error
+       sed -i -e 's|^OPENSTACK_NEUTRON_NETWORK|# &|' \
+                       ${D}/${datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.d/_30_stx_local_settings.py
 }
 
 FILES_starlingx-dashboard = " \
        ${PYTHON_SITEPACKAGES_DIR} \
+       ${datadir}/openstack-dashboard/openstack_dashboard \
        "