From e15cd57502fe37052b4afd7f46d63ab26a868f07b9c73ae4b73f8c5d8dd07718 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 21 Jun 2019 07:47:01 +0000 Subject: [PATCH] Accepting request 711276 from home:dimstar:Factory - Fixup pre script: the migration issue happens when changing from python-urllib3 to python2-urllib3: the number of installed instances of python2-urlliib3 is at this moment 1, unlike in regular updates. This is due to a name change, which consists not of a pure package update. OBS-URL: https://build.opensuse.org/request/show/711276 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=76 --- python-urllib3.changes | 9 +++++++++ python-urllib3.spec | 18 ++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/python-urllib3.changes b/python-urllib3.changes index fc22310..73e3e42 100644 --- a/python-urllib3.changes +++ b/python-urllib3.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jun 21 06:23:36 UTC 2019 - Dominique Leuenberger + +- Fixup pre script: the migration issue happens when changing from + python-urllib3 to python2-urllib3: the number of installed + instances of python2-urlliib3 is at this moment 1, unlike in + regular updates. This is due to a name change, which consists not + of a pure package update. + ------------------------------------------------------------------- Thu Jun 20 07:33:55 UTC 2019 - Dominique Leuenberger diff --git a/python-urllib3.spec b/python-urllib3.spec index c223044..f02a1a3 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -155,16 +155,14 @@ ln -s %{python3_sitelib}/rfc3986/ \ %if ! %{with test} %pre -n python2-urllib3 -SITELIB=%{python2_sitelib} -if [ "$1" -gt 1 ] ; then - CONFLICTED="${SITELIB}/urllib3/packages/ssl_match_hostname" - if [ -d "$CONFLICTED" -a ! -L "$CONFLICTED" ] ; then - # Change from directory to symlink - rm -rfv "$CONFLICTED" - ln -s ../../backports/ssl_match_hostname \ - $CONFLICTED - fi -fi + SITELIB=%{python2_sitelib} + CONFLICTED="${SITELIB}/urllib3/packages/ssl_match_hostname" + if [ -d "$CONFLICTED" -a ! -L "$CONFLICTED" ] ; then + # Change from directory to symlink + rm -rfv "$CONFLICTED" + ln -s ../../backports/ssl_match_hostname \ + $CONFLICTED + fi %endif %if %{with test}