From 2ca7667fab198d71966d637ad3b3c3cf876f4ebbda2bdd0ae77dd5e6695249c5 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 3 Mar 2014 12:30:22 +0000 Subject: [PATCH] Accepting request 224408 from home:oertel:branches:Base:System - change pre to pretrans for directory/symlink conversion OBS-URL: https://build.opensuse.org/request/show/224408 OBS-URL: https://build.opensuse.org/package/show/Base:System/filesystem?expand=0&rev=121 --- filesystem.changes | 5 +++++ filesystem.spec | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/filesystem.changes b/filesystem.changes index 37a7345..3beed28 100644 --- a/filesystem.changes +++ b/filesystem.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 3 11:48:31 CET 2014 - ro@suse.de + +- change pre to pretrans for directory/symlink conversion + ------------------------------------------------------------------- Fri Feb 28 13:56:47 CET 2014 - ro@suse.de diff --git a/filesystem.spec b/filesystem.spec index 8112ac2..228e9f1 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -189,7 +189,7 @@ test -n "$NON_EXISTING_DIR" && { exit 1 } -%pre -p +%pretrans -p os.remove ("/usr/include/X11") os.remove ("/usr/lib/X11") st = posix.stat("/var/run") @@ -197,13 +197,10 @@ if st and st.type == "directory" then sta = posix.stat("/var/run/systemd") if sta and sta.type == "directory" then posix.umount("/var/run") - os.execute("rm -rf /var/run") - posix.symlink("/run","/var/run") - else - os.rename("/var/run","/var/run.old") - posix.symlink("/run","/var/run") - os.execute("cp -a /var/run.old/* /run") end + os.rename("/var/run","/var/run.old") + posix.symlink("/run","/var/run") + os.execute("rm -rf /var/run.old") end %files -f filesystem.list