Commit 29cd80d0 authored by Tomi Leppänen's avatar Tomi Leppänen

[systemsettings] Migrate old installations to use the new paths. JB#47651

Signed-off-by: Tomi Leppänen's avatarTomi Leppänen <tomi.leppanen@jolla.com>
parent 5459338c
......@@ -12,6 +12,7 @@ Requires: connman
Requires: mce >= 1.83.0
Requires: libsailfishkeyprovider >= 0.0.14
Requires: connman-qt5 >= 1.2.21
Requires(post): coreutils
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5SystemInfo)
BuildRequires: pkgconfig(Qt5Test)
......@@ -61,7 +62,23 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
%qmake5_install
%post -p /sbin/ldconfig
%post
/sbin/ldconfig
# Migrate old installations to system/user locale, see JB#47651
if [ -e /var/lib/environment/nemo/locale.conf ]
then
# Copy system locale to user location
if [ ! -e /home/.system/var/lib/environment/100000/locale.conf ]
then
mkdir -p /home/.system/var/lib/environment/100000 || :
# Fix an issue with dir perms, from connman
chmod +rx /home/.system /home/.system/var /home/.system/var/lib || :
cp /var/lib/environment/nemo/locale.conf /home/.system/var/lib/environment/100000/ || :
fi
# Migrate to new system locale location
mv /var/lib/environment/nemo/locale.conf /etc/locale.conf || :
fi
%postun -p /sbin/ldconfig
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment