Be more safe here

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=410
This commit is contained in:
Michael Schröder 2017-11-06 10:47:40 +00:00 committed by Git OBS Bridge
parent 9f511d469d
commit 745d8a22a3

View File

@ -385,7 +385,7 @@ echo -n "%{_target_cpu}-suse-linux-gnueabi" > %{buildroot}/etc/rpm/platform
%{fillup_only -an services}
# var/lib/rpm migration: set forwards compatible symlink for /usr/lib/sysimage/rpm so scriptlets in same transaction will still work
if (test ! -L var/lib/rpm) && (test -f var/lib/rpm/Packages) ; then
if test ! -L var/lib/rpm -a -f var/lib/rpm/Packages -a ! -f usr/lib/sysimage/rpm/Packages ; then
rmdir usr/lib/sysimage/rpm
ln -s ../../../var/lib/rpm usr/lib/sysimage/rpm
fi