diff --git a/kernel-firmware-qcom.changes b/kernel-firmware-qcom.changes index 2771811..53061b6 100644 --- a/kernel-firmware-qcom.changes +++ b/kernel-firmware-qcom.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 21 15:47:24 UTC 2025 - Takashi Iwai + +- Remove stale *.rpmmoved directories (bsc#1244458) + ------------------------------------------------------------------- Tue Jul 15 07:11:06 UTC 2025 - Takashi Iwai diff --git a/kernel-firmware-qcom.spec b/kernel-firmware-qcom.spec index 1896066..a7fe238 100644 --- a/kernel-firmware-qcom.spec +++ b/kernel-firmware-qcom.spec @@ -30,7 +30,7 @@ License: GPL-2.0-or-later AND SUSE-Firmware Group: System/Kernel URL: https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/ Source0: %{name}-%{version}.tar.xz -Source1: https://github.com/openSUSE/kernel-firmware-tools/archive/refs/tags/20250710.tar.gz#/kernel-firmware-tools-20250710.tar.gz +Source1: https://github.com/openSUSE/kernel-firmware-tools/archive/refs/tags/20250721.tar.gz#/kernel-firmware-tools-20250721.tar.gz Source2: %{name}-rpmlintrc Source3: git_id Source10: aliases @@ -340,25 +340,21 @@ install -c -D -m 0644 WHENCE %{buildroot}%{_licensedir}/%{name}/WHENCE install -c -D -m 0644 README.md %{buildroot}%{_docdir}/%{name}/README.md %pretrans -p -if not macros then - fwdir = "/lib/firmware" -else - fwdir = macros._firmwaredir -end -path = fwdir .. "/qcom/LENOVO/21BX" +path = "%{_firmwaredir}/qcom/LENOVO/21BX" 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") + path2 = path .. ".rpmmoved" + if not os.rename(path, path2) then + print("Cannot rename to " .. path2) + os.exit(1) end end +%posttrans +if test -d %{_firmwaredir}/qcom/LENOVO/21BX.rpmmoved; then + rm -rf %{_firmwaredir}/qcom/LENOVO/21BX.rpmmoved +fi + %files %doc %{_docdir}/%{name} %license %{_licensedir}/%{name} diff --git a/kernel-firmware-tools-20250710.tar.gz b/kernel-firmware-tools-20250710.tar.gz deleted file mode 100644 index 67902d3..0000000 --- a/kernel-firmware-tools-20250710.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e580d4a707ea7a6adbd60d8580ea9d0efc6f6173223abb8844ac410e92121640 -size 16939 diff --git a/kernel-firmware-tools-20250721.tar.gz b/kernel-firmware-tools-20250721.tar.gz new file mode 100644 index 0000000..f3f78f5 --- /dev/null +++ b/kernel-firmware-tools-20250721.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86769c5a198766f5f5294576e4971dea5c7365ecfafa2e21db6fc0a9fa93b357 +size 17052 diff --git a/post b/post index 85e8705..bdddf97 100644 --- a/post +++ b/post @@ -1,19 +1,15 @@ %pretrans -p -if not macros then - fwdir = "/lib/firmware" -else - fwdir = macros._firmwaredir -end -path = fwdir .. "/qcom/LENOVO/21BX" +path = "%{_firmwaredir}/qcom/LENOVO/21BX" 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") + path2 = path .. ".rpmmoved" + if not os.rename(path, path2) then + print("Cannot rename to " .. path2) + os.exit(1) end end + +%posttrans +if test -d %{_firmwaredir}/qcom/LENOVO/21BX.rpmmoved; then + rm -rf %{_firmwaredir}/qcom/LENOVO/21BX.rpmmoved +fi