Navigation Menu

Skip to content

Commit

Permalink
[systemsettings] Migrate old installations to use the new paths. JB#4…
Browse files Browse the repository at this point in the history
…7651

Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
  • Loading branch information
Tomin1 committed Feb 26, 2020
1 parent 5459338 commit 29cd80d
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion rpm/nemo-qml-plugin-systemsettings.spec
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 29cd80d

Please sign in to comment.