diff --git a/papirus-icon-theme.spec b/papirus-icon-theme.spec index f608eea..39e0423 100644 --- a/papirus-icon-theme.spec +++ b/papirus-icon-theme.spec @@ -1,6 +1,6 @@ Name: papirus-icon-theme Version: 20190302 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Free and open source SVG icon theme based on Paper Icon Set # Some icons are based on Paper Icon Theme, CC-BY-SA @@ -44,6 +44,33 @@ for t in $THEMES; do done +# Handle folder to link upgrade +# Remove in F33 +%pretrans -p +-- Define the path to directory being replaced below. +-- DO NOT add a trailing slash at the end. +pathlist = {"%{_datadir}/icons/Papirus-Light/16x16/actions", + "%{_datadir}/icons/Papirus-Light/16x16/devices", + "%{_datadir}/icons/Papirus-Light/16x16/places", + "%{_datadir}/icons/Papirus-Light/22x22/actions", + "%{_datadir}/icons/Papirus-Light/24x24/actions"} +for key,path in ipairs(pathlist) +do + st = posix.stat(path) + if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end + end +end + + %post export THEMES="ePapirus Papirus Papirus-Adapta Papirus-Adapta-Nokto Papirus-Dark Papirus-Light" for t in $THEMES; do @@ -83,9 +110,19 @@ done %ghost %{_datadir}/icons/Papirus-Adapta-Nokto/icon-theme.cache %ghost %{_datadir}/icons/Papirus-Dark/icon-theme.cache %ghost %{_datadir}/icons/Papirus-Light/icon-theme.cache +# Handle folder to link upgrade +# Remove in F33 +%ghost %{_datadir}/icons/Papirus-Light/16x16/actions.rpmmoved +%ghost %{_datadir}/icons/Papirus-Light/16x16/devices.rpmmoved +%ghost %{_datadir}/icons/Papirus-Light/16x16/places.rpmmoved +%ghost %{_datadir}/icons/Papirus-Light/22x22/actions.rpmmoved +%ghost %{_datadir}/icons/Papirus-Light/24x24/actions.rpmmoved %changelog +* Wed Mar 13 2019 Robert-André Mauchin - 20190302-2 +- Fix to handle folder to link upgrade + * Mon Mar 11 2019 Robert-André Mauchin - 20190302-1 - Release 20190302 (#1687463)