SHARE
TWEET

hrw

a guest Jun 25th, 2019 69 in 7 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. commit 525ff33ef1bf55e1833ffb8a8b6a116ce833bf16
  2. Author: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
  3. Date:   Tue Jun 25 16:43:33 2019 +0200
  4.  
  5.     horizon: process i18n files just once
  6.    
  7.     During build of horizon we have a situation where i18n files get
  8.     processed several times.
  9.    
  10.     From my debugging it looks like 'manage.py compilemessages' command
  11.     already knows how to walk through directories so instead of calling it
  12.     per directory we can call it once per 'site-packages'.
  13.    
  14.     Change-Id: Icf7289bd5fc02494551a42efc42691df3d8ed290
  15. ---
  16.  docker/horizon/Dockerfile.j2 | 10 ++++------
  17.  1 file changed, 4 insertions(+), 6 deletions(-)
  18.  
  19. diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2
  20. index 763107efe..3d73aef1a 100644
  21. --- a/docker/horizon/Dockerfile.j2
  22. +++ b/docker/horizon/Dockerfile.j2
  23. @@ -51,9 +51,8 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
  24.      && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py \
  25.      && rm -f /usr/share/openstack-dashboard/openstack_dashboard/local/enabled/?[^_]*.py* \
  26.      && rm -f /usr/lib/python{{ distro_python_version }}/site-packages/openstack_dashboard/local/enabled/?[^_]*.py* \
  27. -    && for locale in /usr/lib/python{{ distro_python_version }}/site-packages/*/locale; do \
  28. -           (cd ${locale%/*} && /usr/bin/{{ horizon_python }} /usr/bin/manage.py compilemessages) \
  29. -       done
  30. +    && cd /usr/lib/python{{distro_python_version}}/site-packages/ \
  31. +    && /usr/bin/{{ horizon_python }} /usr/bin/manage.py compilemessages
  32.  {% endblock %}
  33.  
  34.      {% elif base_package_type == 'deb' %}
  35. @@ -148,9 +147,8 @@ RUN ln -s horizon-source/* horizon \
  36.      && if [ "$(ls /plugins)" ]; then \
  37.             {{ macros.install_pip(horizon_plugins_pip_packages) }}; \
  38.         fi \
  39. -    && for locale in  /var/lib/kolla/venv/lib/python{{distro_python_version}}/site-packages/*/locale; do \
  40. -           (cd ${locale%/*} && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \
  41. -       done \
  42. +    && cd /var/lib/kolla/venv/lib/python{{distro_python_version}}/site-packages/ \
  43. +    && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages \
  44.      && chown -R horizon: /etc/openstack-dashboard /var/lib/kolla/venv/lib/python{{distro_python_version}}/site-packages/static
  45.  
  46.  {% endif %}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top