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}