Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sof-firmware for openSUSE:Factory 
checked in at 2021-02-02 14:25:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sof-firmware (Old)
 and      /work/SRC/openSUSE:Factory/.sof-firmware.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sof-firmware"

Tue Feb  2 14:25:08 2021 rev:11 rq:868372 version:1.6.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/sof-firmware/sof-firmware.changes        
2021-01-21 21:57:16.981855337 +0100
+++ /work/SRC/openSUSE:Factory/.sof-firmware.new.28504/sof-firmware.changes     
2021-02-02 14:25:14.199351220 +0100
@@ -1,0 +2,6 @@
+Mon Feb  1 11:33:08 CET 2021 - ti...@suse.de
+
+- Yet more ugly workarounds for the rpm shortness about the symlink
+  directory handling (bsc#1181554)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sof-firmware.spec ++++++
--- /var/tmp/diff_new_pack.aAsfR0/_old  2021-02-02 14:25:14.895352303 +0100
+++ /var/tmp/diff_new_pack.aAsfR0/_new  2021-02-02 14:25:14.899352309 +0100
@@ -84,11 +84,38 @@
 rm -f %{buildroot}%{_firmwaredir}/intel/sof/community/sof-jsl.ri
 %fdupes -s %{buildroot}
 
+# A grand opening of a monkey theater now:
+# as rpm cannot handle the transition from a directory to a symlinked
+# directory, we need many very ugly tricks to work around it.
+# See bsc#1180287 and bsc#1181554
+
+# At first, rename the old directory that will be overriden via symlink.
+# This has to be done at pre, not preun.  Without this workaround, cpio
+# expansion fails.
 %pre
-# Mighty rpm cannot handle the transition from a directory to a symlinked
-# directory, hence we have to get rid of it beforehand at this moment (but
-# not at un preun!): bsc#1180287
-test -h %{_firmwaredir}/intel/sof-tplg || rm -rf %{_firmwaredir}/intel/sof-tplg
+if test -d %{_firmwaredir}/intel/sof-tplg; then
+  if ! test -h %{_firmwaredir}/intel/sof-tplg; then
+    mv %{_firmwaredir}/intel/sof-tplg %{_firmwaredir}/intel/sof-tplg.old
+  fi
+fi
+
+# At next, rename the symlink at post if the old package contained the
+# directory; it's needed to avoid the old package removing the new contents
+# mistakenly.  The old contents are removed here instead.
+%post
+if test -d %{_firmwaredir}/intel/sof-tplg.old; then
+  mv %{_firmwaredir}/intel/sof-tplg %{_firmwaredir}/intel/sof-tplg.new
+  rm -rf %{_firmwaredir}/intel/sof-tplg.old
+fi
+
+# At last in posttrans, recover the symlink again;
+# it's the only place we can use after the old package triggers run
+%posttrans
+if test -h %{_firmwaredir}/intel/sof-tplg.new; then
+  mv %{_firmwaredir}/intel/sof-tplg.new %{_firmwaredir}/intel/sof-tplg
+  # remove stale files
+  rm -f %{_firmwaredir}/intel/sof-tplg\;*
+fi
 
 %files
 %license LICENCE.*

Reply via email to