0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-12-05 02:06:57 +00:00
Lakka-LibreELEC/packages/mediacenter/kodi/patches/kodi-100.30-addons-refresh-etc-environment.patch
2023-03-10 17:59:27 +01:00

32 lines
936 B
Diff

From 76575164088a259d73c66dacb7df585b6a6e577a Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Tue, 17 Dec 2019 15:51:23 +0000
Subject: [PATCH] refresh /etc/environment on install and uninstall
---
xbmc/addons/Addon.cpp | 6 ++++++
1 file changed, 6 insertions(+)
--- a/xbmc/addons/Addon.cpp
+++ b/xbmc/addons/Addon.cpp
@@ -723,6 +723,9 @@ void OnPostInstall(const AddonPtr& addon
// OE
addon->OnPostInstall(update, modal);
+
+ if (addon->Type() == AddonType::SERVICE || addon->Type() == AddonType::SCRIPT)
+ system("/usr/bin/environment-setup");
}
void OnPreUnInstall(const AddonPtr& addon)
@@ -735,6 +738,9 @@ void OnPreUnInstall(const AddonPtr& addo
void OnPostUnInstall(const AddonPtr& addon)
{
addon->OnPostUnInstall();
+
+ if (addon->Type() == AddonType::SERVICE || addon->Type() == AddonType::SCRIPT)
+ system("/usr/bin/environment-setup");
}
} // namespace ADDON