From 3e6bf1e682cea8f1ed5e536c138386f28fa83b50d531715fd283949f7ba6d1c2 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 15 Sep 2022 12:20:26 +0000 Subject: [PATCH] Accepting request 1003624 from home:bnavigator:branches:devel:languages:python - Work around long standing rpm-directory-to-symlink-bug * https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/ * rh#447156 * use shell instead of lua for pretrans scriptlet OBS-URL: https://build.opensuse.org/request/show/1003624 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pybind11?expand=0&rev=36 --- python-pybind11.changes | 8 ++++++++ python-pybind11.spec | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/python-pybind11.changes b/python-pybind11.changes index 088a5fc..5fc88d2 100644 --- a/python-pybind11.changes +++ b/python-pybind11.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 14 21:02:16 UTC 2022 - Ben Greiner + +- Work around long standing rpm-directory-to-symlink-bug + * https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/ + * rh#447156 + * use shell instead of lua for pretrans scriptlet + ------------------------------------------------------------------- Sun Sep 11 00:15:11 UTC 2022 - Ben Greiner diff --git a/python-pybind11.spec b/python-pybind11.spec index d7dd8ab..fddbc87 100644 --- a/python-pybind11.spec +++ b/python-pybind11.spec @@ -137,6 +137,16 @@ ignore_tests="$ignore_tests --ignore tests/extra_python_package/test_files.py" %pytest $ignore_tests %endif +%pretrans devel +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/ +# rh#447156 +# Do not bother with .rpmmoved suffix. This is a system controlled namespace, +for path in "%{python_sitelib}/pybind11/share/cmake" "%{python_sitelib}/pybind11/include"; do + if [ -d "$path" -a ! -L "$path" ]; then + rm -r "$path" + fi +done + %pre # If libalternatives is used: Removing old update-alternatives entries. %python_libalternatives_reset_alternative pybind11-config @@ -153,6 +163,8 @@ ignore_tests="$ignore_tests --ignore tests/extra_python_package/test_files.py" %license LICENSE %python_alternative %{_bindir}/pybind11-config %{python_sitelib}/pybind11 +%exclude %{python_sitelib}/pybind11/share/cmake +%exclude %{python_sitelib}/pybind11/include %{python_sitelib}/pybind11-%{version}*-info %files -n %{name}-common-devel @@ -162,6 +174,8 @@ ignore_tests="$ignore_tests --ignore tests/extra_python_package/test_files.py" %files %{python_files devel} %license LICENSE +%{python_sitelib}/pybind11/share/cmake +%{python_sitelib}/pybind11/include %endif %changelog