From e0d86ebe21e38874a66e9a74a4083fb4b92c4ce6ed82fc74be731a5cbde2fe97 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Mon, 7 Jun 2021 09:03:29 +0000 Subject: [PATCH] - fix conversion with split /usr (boo#1186781) OBS-URL: https://build.opensuse.org/package/show/Base:System/compat-usrmerge?expand=0&rev=15 --- compat-usrmerge.changes | 5 +++++ convertfs | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/compat-usrmerge.changes b/compat-usrmerge.changes index 919f75e..e2f59de 100644 --- a/compat-usrmerge.changes +++ b/compat-usrmerge.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 7 09:02:56 UTC 2021 - Ludwig Nussel + +- fix conversion with split /usr (boo#1186781) + ------------------------------------------------------------------- Wed Jun 2 15:29:15 UTC 2021 - Ludwig Nussel diff --git a/convertfs b/convertfs index 2a2a2fc..4c25e87 100644 --- a/convertfs +++ b/convertfs @@ -16,6 +16,9 @@ cleanup() { for dir in bin sbin lib lib64; do rm -rf -- "$ROOT/usr/${dir}.usrmerge" done + echo "!!! ATTENTION: Do NOT proceed if you see this message during" + echo "!!! distribution upgrade. Chances are high that your system might" + echo "!!! break beyond repair if you do." } trap 'ret=$?; [[ $ret -ne 0 ]] && cleanup;exit $ret;' EXIT @@ -41,7 +44,7 @@ for dir in bin sbin lib lib64; do [[ -d "$ROOT/$dir" ]] || continue echo "Make a copy of \`$ROOT/$dir'." [[ -d "$ROOT/$dir" ]] \ - && cp -ax -l "$ROOT/$dir" "$ROOT/usr/${dir}.usrmerge" + && cp -ax $CP_HARDLINK "$ROOT/$dir" "$ROOT/usr/${dir}.usrmerge" # cp can't handle copying a dir over non-directories. So move # those away in advance. Happened with /lib/udev existing as # link on older distros