[openstack-keystone] workaround for stand-alone auth-token subpackage

Alan Pevec apevec at fedoraproject.org
Mon Jun 11 21:09:26 UTC 2012


commit 55247fe77e53bfdf58c19078a3f289ba357bb0e3
Author: Alan Pevec <apevec at redhat.com>
Date:   Mon Jun 11 22:12:47 2012 +0200

    workaround for stand-alone auth-token subpackage
    
    rhbz 824034#c14

 openstack-keystone.spec |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
index 0848d41..c34d95d 100644
--- a/openstack-keystone.spec
+++ b/openstack-keystone.spec
@@ -154,6 +154,20 @@ if [ $1 -eq 1 ] ; then
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 fi
 
+%post -n python-keystone-auth-token
+# workaround for rhbz 824034#c14
+if [ ! -e %{python_sitelib}/keystone/__init__.py ]; then
+    > %{python_sitelib}/keystone/__init__.py
+fi
+if [ ! -e %{python_sitelib}/keystone/middleware/__init__.py ]; then
+    > %{python_sitelib}/keystone/middleware/__init__.py
+fi
+
+%triggerpostun -n python-keystone-auth-token -- python-keystone
+# edge case: removing python-keystone with overlapping files
+> %{python_sitelib}/keystone/__init__.py
+> %{python_sitelib}/keystone/middleware/__init__.py
+
 %preun
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
@@ -198,6 +212,9 @@ fi
 %defattr(-,root,root,-)
 %doc LICENSE
 %dir %{python_sitelib}/keystone
+%ghost %{python_sitelib}/keystone/__init__.py
+%dir %{python_sitelib}/keystone/middleware
+%ghost %{python_sitelib}/keystone/middleware/__init__.py
 %{python_sitelib}/keystone/middleware/auth_token.py*
 
 %changelog


More information about the scm-commits mailing list