diff --git a/compat-usrmerge.changes b/compat-usrmerge.changes index 698b601..666c6f4 100644 --- a/compat-usrmerge.changes +++ b/compat-usrmerge.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Oct 7 11:57:22 UTC 2021 - Ludwig Nussel + +- Fix logic for detecting conflicts with directories (boo#1191111) + +------------------------------------------------------------------- +Fri Aug 27 08:39:30 UTC 2021 - Ludwig Nussel + +- exit file triggers early if alread usrmerged + ------------------------------------------------------------------- Fri Aug 27 06:35:26 UTC 2021 - Ludwig Nussel diff --git a/compat-usrmerge.spec b/compat-usrmerge.spec index 6b6f803..55df725 100644 --- a/compat-usrmerge.spec +++ b/compat-usrmerge.spec @@ -147,6 +147,7 @@ EOF %endif %filetriggerin -p -- %{_sbindir} %{_bindir} %{_libdir} +if posix.stat("/lib", "type") ~= "directory" then return end require("usrmerge") if posix.getenv("VERBOSE_FILETRIGGERS") then usrmerge.debug = "%{nvr}(in)" @@ -159,6 +160,7 @@ end io.flush() %filetriggerpostun -p -- %{_sbindir} %{_bindir} %{_libdir} +if posix.stat("/lib", "type") ~= "directory" then return end -- the module is already gone if we get called for ourselves if pcall(require, 'usrmerge') then if posix.getenv("VERBOSE_FILETRIGGERS") then @@ -173,6 +175,7 @@ if pcall(require, 'usrmerge') then end %filetriggerpostun -p -- /sbin /bin /%{_lib} +if posix.stat("/lib", "type") ~= "directory" then return end -- the module is already gone if we get called for ourselves if pcall(require, 'usrmerge') then if posix.getenv("VERBOSE_FILETRIGGERS") then diff --git a/convertfs b/convertfs index 91115be..ca90e1f 100644 --- a/convertfs +++ b/convertfs @@ -69,7 +69,7 @@ for dir in bin sbin lib lib64; do # link on older distros while read d; do f="$ROOT/usr/$dir.usrmerge/$d" - if test -e "$f" -a \( -L "$f" -o ! -d "$f" \); then + if test -L "$f" -o \( -e "$f" -a ! -d "$f" \); then echo "Warning: /$dir/$d conflicts with directory /usr/$dir/$d and will be removed" rm -rf "$f.usrmerge~" mv "$f" "$f.usrmerge~"