From 76e421f7d0703d618db8cb6acb4f3e749a41befd27914efd815afd8fccb428f0 Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 14 Oct 2015 09:37:35 +0000 Subject: [PATCH] Accepting request 338795 from home:TheBlackCat:branches:devel:languages:python Delete the system egg-info during pre phase: older versions of the package installed it as a directory, the latest update creates a file, and rpm has known issues with replacing this. OBS-URL: https://build.opensuse.org/request/show/338795 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=10 --- python-urllib3.changes | 7 +++++++ python-urllib3.spec | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-urllib3.changes b/python-urllib3.changes index a86212f..fdd0d6b 100644 --- a/python-urllib3.changes +++ b/python-urllib3.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Oct 14 09:35:30 UTC 2015 - toddrme2178@gmail.com + +- Delete the system egg-info during pre phase: older versions of + the package installed it as a directory, the latest update + creates a file, and rpm has known issues with replacing this. + ------------------------------------------------------------------- Tue Oct 6 15:03:05 UTC 2015 - hpj@urpla.net diff --git a/python-urllib3.spec b/python-urllib3.spec index 6281f3c..81ce000 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -66,10 +66,17 @@ python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%pre +# previous versions of the package installed .egg-info as a directory, +# the new update now installs it as a file. Clean out the directory, should it exist. +if [ -d %{python_sitelib}/urllib3-%{version}-py*.egg-info ]; then + rm -rf %{python_sitelib}/urllib3-%{version}-py*.egg-info +fi + %files %defattr(-,root,root,-) %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst %{python_sitelib}/urllib3 -%{python_sitelib}/urllib3-%{version}-py%{py_ver}.egg-info +%{python_sitelib}/urllib3-%{version}-py*.egg-info %changelog