diff --git a/mariadb-connector-c.spec b/mariadb-connector-c.spec index 62f8a2c..5d4f687 100644 --- a/mariadb-connector-c.spec +++ b/mariadb-connector-c.spec @@ -1,6 +1,6 @@ Name: mariadb-connector-c Version: 3.0.2 -Release: 12%{?dist} +Release: 13%{?dist} Summary: The MariaDB Native Client library (C driver) Group: Applications/Databases License: LGPLv2+ @@ -107,13 +107,18 @@ ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h -%pre devel -if [ -h %{_libdir}/mariadb ]; then - unlink %{_libdir}/mariadb -fi -if [ -h %{_libdir}/mysql ]; then - unlink %{_libdir}/mysql -fi +# https://fedoraproject.org/wiki/Packaging:Directory_Replacement +%pretrans -p devel +path = "%{_libdir}/mariadb" +st = posix.stat(path) +if st and st.type == "link" then + os.remove(path) +end +path = "%{_libdir}/mysql" +st = posix.stat(path) +if st and st.type == "link" then + os.remove(path) +end %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -160,6 +165,10 @@ fi # https://jira.mariadb.org/browse/MDEV-13836 %changelog +* Mon Oct 30 2017 Michal Schorm - 3.0.2-13 +- Update scriplet dealing with symlinks as Gudelines suggests + Related: #1501933 + * Thu Oct 26 2017 Michal Schorm - 3.0.2-12 - Move library directly to libdir, don't create any symlinks to directories - Update scritplets, so they only check for old symlinks to directories