From f454de043566b3599119d556027672399093712f Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 7 Jul 2017 17:37:22 +0100 Subject: [PATCH] kodi: update addon service patches --- ...100.05-make-binary-addons-executable.patch | 30 ++++++++-------- ...-a-wrapper-to-setup-systemd-services.patch | 36 +++++++++---------- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/packages/mediacenter/kodi/patches/kodi-100.05-make-binary-addons-executable.patch b/packages/mediacenter/kodi/patches/kodi-100.05-make-binary-addons-executable.patch index 0ff7b4b298..ba87a65391 100644 --- a/packages/mediacenter/kodi/patches/kodi-100.05-make-binary-addons-executable.patch +++ b/packages/mediacenter/kodi/patches/kodi-100.05-make-binary-addons-executable.patch @@ -1,7 +1,7 @@ -From 416981e6bbcf81443e3ca8f35ca26042e174c971 Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Mon, 2 Mar 2015 23:50:40 +0200 -Subject: [PATCH 05/13] make binary addons executable +From 3e1f7d098726e4af7eac9c83c70cf8196e4e9e3e Mon Sep 17 00:00:00 2001 +From: MilhouseVH +Date: Wed, 5 Jul 2017 15:46:51 +0100 +Subject: [PATCH] make binary addons executable add executable mode to all files in addon's bin folder @@ -11,24 +11,24 @@ credits to vpeter4 for the patch 1 file changed, 26 insertions(+) diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp -index 77c2db8..6c21c87 100644 +index 07fd5bf..639ee5c 100644 --- a/xbmc/addons/Addon.cpp +++ b/xbmc/addons/Addon.cpp -@@ -46,6 +46,10 @@ - #include - #include +@@ -26,6 +26,10 @@ + #include + #include +#include +#include +#include + - using XFILE::CDirectory; - using XFILE::CFile; - -@@ -694,6 +698,28 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal) - if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_REPOSITORY)) - CRepositoryUpdater::GetInstance().ScheduleUpdate(); //notify updater there is a new addon or version + #include "AddonManager.h" + #include "addons/Service.h" + #include "filesystem/Directory.h" +@@ -417,6 +421,28 @@ void OnPreInstall(const AddonPtr& addon) + void OnPostInstall(const AddonPtr& addon, bool update, bool modal) + { + // OE: make binary addons executable, creddits to vpeter4 + std::string addonDirPath; + std::string chmodFilePath; @@ -55,5 +55,5 @@ index 77c2db8..6c21c87 100644 } -- -2.5.0 +2.7.4 diff --git a/packages/mediacenter/kodi/patches/kodi-100.09-use-a-wrapper-to-setup-systemd-services.patch b/packages/mediacenter/kodi/patches/kodi-100.09-use-a-wrapper-to-setup-systemd-services.patch index e2751b36a7..37b9008f62 100644 --- a/packages/mediacenter/kodi/patches/kodi-100.09-use-a-wrapper-to-setup-systemd-services.patch +++ b/packages/mediacenter/kodi/patches/kodi-100.09-use-a-wrapper-to-setup-systemd-services.patch @@ -1,18 +1,18 @@ -From 0f1be94283a3d1a3286430bbc0e326dc7b4cc6b8 Mon Sep 17 00:00:00 2001 +From faebee708dc7c24d177fa6b8874b3f1374a08e25 Mon Sep 17 00:00:00 2001 From: MilhouseVH -Date: Fri, 30 Jun 2017 14:19:59 +0100 +Date: Wed, 5 Jul 2017 15:58:57 +0100 Subject: [PATCH] use a wrapper to setup systemd services --- - xbmc/addons/Addon.cpp | 33 +++++++++++++++++++++++++++++++++ + xbmc/addons/Addon.cpp | 35 +++++++++++++++++++++++++++++++++++ xbmc/addons/Addon.h | 2 ++ - 2 files changed, 35 insertions(+) + 2 files changed, 37 insertions(+) diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp -index 8bf4664..caed7c4 100644 +index 639ee5c..7f205a7 100644 --- a/xbmc/addons/Addon.cpp +++ b/xbmc/addons/Addon.cpp -@@ -392,6 +392,13 @@ AddonVersion CAddon::GetDependencyVersion(const std::string &dependencyID) const +@@ -396,18 +396,36 @@ AddonVersion CAddon::GetDependencyVersion(const std::string &dependencyID) const return AddonVersion("0.0.0"); } @@ -26,19 +26,17 @@ index 8bf4664..caed7c4 100644 void OnEnabled(const std::string& id) { // If the addon is a special, call enabled handler -@@ -399,6 +406,11 @@ void OnEnabled(const std::string& id) + AddonPtr addon; if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_PVRDLL)) return addon->OnEnabled(); - ++ + // OE: systemctl enable & start on addon enable + if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_SERVICE)) + CallOEWrapper(addon->ID(), false); + // OE -+ - if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_REPOSITORY)) - CRepositoryUpdater::GetInstance().ScheduleUpdate(); //notify updater there is a new addon } -@@ -407,6 +419,12 @@ void OnDisabled(const std::string& id) + + void OnDisabled(const std::string& id) { AddonPtr addon; @@ -51,10 +49,12 @@ index 8bf4664..caed7c4 100644 if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_PVRDLL, false)) return addon->OnDisabled(); } -@@ -422,6 +440,14 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal) - { - AddonPtr localAddon; +@@ -443,11 +461,28 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal) + } + // OE ++ AddonPtr localAddon; ++ + // OE: systemctl stop & disable / enable & start on addon upgrade + if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_SERVICE)) + { @@ -63,10 +63,8 @@ index 8bf4664..caed7c4 100644 + } + // OE + - if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_REPOSITORY)) - CRepositoryUpdater::GetInstance().ScheduleUpdate(); //notify updater there is a new addon or version - -@@ -430,6 +456,13 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal) + addon->OnPostInstall(update, modal); + } void OnPreUnInstall(const AddonPtr& addon) {