3
0

- fix conversion with split /usr (boo#1186781)

OBS-URL: https://build.opensuse.org/package/show/Base:System/compat-usrmerge?expand=0&rev=15
This commit is contained in:
Ludwig Nussel 2021-06-07 09:03:29 +00:00 committed by Git OBS Bridge
parent 6ecb38177f
commit e0d86ebe21
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jun 7 09:02:56 UTC 2021 - Ludwig Nussel <lnussel@suse.com>
- fix conversion with split /usr (boo#1186781)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 2 15:29:15 UTC 2021 - Ludwig Nussel <lnussel@suse.com> Wed Jun 2 15:29:15 UTC 2021 - Ludwig Nussel <lnussel@suse.com>

View File

@ -16,6 +16,9 @@ cleanup() {
for dir in bin sbin lib lib64; do for dir in bin sbin lib lib64; do
rm -rf -- "$ROOT/usr/${dir}.usrmerge" rm -rf -- "$ROOT/usr/${dir}.usrmerge"
done 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 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 [[ -d "$ROOT/$dir" ]] || continue
echo "Make a copy of \`$ROOT/$dir'." echo "Make a copy of \`$ROOT/$dir'."
[[ -d "$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 # cp can't handle copying a dir over non-directories. So move
# those away in advance. Happened with /lib/udev existing as # those away in advance. Happened with /lib/udev existing as
# link on older distros # link on older distros