add a pretrans script to fix upgrading dirs to symlinks in docs directory [release 1.8.5-2mamba;Fri Sep 30 2022]

This commit is contained in:
Silvan Calarco 2024-01-05 22:36:12 +01:00
parent 3a0b71753d
commit 2239634006

View File

@ -1,6 +1,6 @@
Name: fwupd Name: fwupd
Version: 1.8.5 Version: 1.8.5
Release: 1mamba Release: 2mamba
Summary: A simple daemon to allow session software to update firmware Summary: A simple daemon to allow session software to update firmware
Group: System/Kernel and Hardware Group: System/Kernel and Hardware
Vendor: openmamba Vendor: openmamba
@ -83,6 +83,36 @@ This package contains libraries and header files for developing applications tha
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pretrans -p <lua>
-- Define the path to directory being replaced below.
-- DO NOT add a trailing slash at the end.
path = "/usr/share/doc/fwupd/libfwupd"
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
path = "/usr/share/doc/fwupd/libfwupdplugin"
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
%preun %preun
%systemd_preun %{name} %systemd_preun %{name}
: :
@ -194,6 +224,9 @@ This package contains libraries and header files for developing applications tha
#%doc README.md #%doc README.md
%changelog %changelog
* Fri Sep 30 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.5-2mamba
- add a pretrans script to fix upgrading dirs to symlinks in docs directory
* Mon Sep 26 2022 Automatic Build System <autodist@mambasoft.it> 1.8.5-1mamba * Mon Sep 26 2022 Automatic Build System <autodist@mambasoft.it> 1.8.5-1mamba
- automatic version update by autodist - automatic version update by autodist