Posts: 1,677
Joined: Apr 2007
Reputation:
7
Problem: Addons that are installed as part of a dependency won't be uninstalled with the addon that required it. So when testing some skins that require a lot of addons (tv-tunes, artwork downloader, foo-service) those will remain activated and installed (and thus probably slow down XBMC) even if the skin is uninstalled again.
Solution: Keep track if addons are installed by the user or as part of a dependency and in the later case also disable/uninstall them if no other addons depend on those.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
I don't see why we'd do that in general. The user might actually want one of these dependencies still even though they don't want the add-on that caused it to be installed.
For services (as this seems to be the main problem) they're currently all auto-started. Perhaps we need an auto-start flag so we can distinguish between services installed by the user directly and services installed by a skin?
Posts: 6,255
Joined: Jun 2009
Reputation:
115
da-anda
Team-Kodi Member
Posts: 6,255
Yes, it's mostly the services, but stuff like tv-tunes as well. How about also setting an addon as installed by the user if he changes it's configuration? So only auto-uninstall if nothing else depends on it and the user never directly used it (checked via the is-installed-by-user flag).
Posts: 26,215
Joined: Oct 2003
Reputation:
187
I don't mind having support for cleaning add-ons up, but as I stated earlier there's no way to know if a user really uses an add-on independently of a skin. A user could use an add-on without it being configured, so I don't think that that's enough of a check.
IMO the auto-starting of services certainly needs to be taken care of. If the user installs bloated skin A, doesn't uninstall it, but uses streamlined skin B then all the services from skin A are still being used.
Thus, services need to be marked with a "autostart" flag which would be set on manual install, and then they need to be started by the skin that uses them.
Posts: 6,255
Joined: Jun 2009
Reputation:
115
da-anda
Team-Kodi Member
Posts: 6,255
jmarshall - why is it difficult to detect if a user uses a certain addon?
1) if user installed it, set the flag "installed_by_user"
2) if the user changes the configuration of an addon set the flag "installed_by_user"
I currently can't think of a situation where a skin installs something else than a script or program addon. So at least those should be fine to be uninstalled the way described. For anything else we could ask the user "The addon you're uninstalling/disabling installed/enabled the following depending addons. Would you also like to uninstall/disable those?" (wording depending on action performed)
Also - maybe we should split up the <requires> tag in the addon.xml into <requires> and <suggests>. Using the skin example again, a skin might require the skin.widgets to work properly but only support tv-tunes - so why forcing the installation of tv-tunes then? I know it's easier the current way, but it really messes the system with bloat-addons.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
@da-anda: I can quite happily use and enjoy using a service add-on without installing it and without configuring it. It just so happens I got said service add-on when I installed a skin - I don't use the skin anymore but the add-on is still running.
I guess if the add-on disappeared or stopped running then at that point the user would go in and manually reinstall/restart it, which might solve the problem.
Either way, the most pressing problem is not really the fact that the dependency hangs around, it's the fact that it stays running. Fixing the autostarting behaviour would solve that.
Posts: 31,445
Joined: Jan 2011
Remove selected add-on and then prompt with "these add-ons were installed because of the one you just uninstalled. Remove these too?" only for add-ons that are still not in use by other add-ons and where not manually installed.
Posts: 4,549
Joined: Dec 2007
Reputation:
17
topfs2
Team-Kodi Developer
Posts: 4,549
Do we have recommended addons for skins also?
Just thinking it feels like the case jmarshall is suggesting is either a) because a service is recommended by another skin or b) its not just a sking "library (library as in shared library binary, think libfoo-dev in ubuntu)" addon.
I think we need to decide what is intended behaviour with dependencies to skins
Example 1)
I have a minimal skin A which may show next aired if this addon is installed, it will however not depend on it but use it if existant.
When I install skin B, which depends on next aired what is the correct behaviour.
Should skin A look different? IMO it feels somewhat wrong that Skin A becomes different if I install another skin. And as an extension to this, should me installing a skin alter actual behaviour of my installation. This feels like wrong interaction.
As a really bad example. Say skin B depends on library auto updater. Then the answer to the question "how do I make xbmc auto update its libraries" could be "install skin B", is this really good interaction?
IMO A skins dependencies should not alter any other skin nor the behaviour of xbmc.?
If you have problems please read
this before posting
Always read the
XBMC online-manual,
FAQ and
search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the
forum rules.
For troubleshooting and bug reporting please make sure you
read this first.
"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Posts: 6,255
Joined: Jun 2009
Reputation:
115
da-anda
Team-Kodi Member
Posts: 6,255
yes, skins should only depend on skin helpers and have optional support for other addons. We might show a popup "This skin/addon suggests to install these extensions, would you like to install these as well?". Maybe even show a list with checkboxes to select which suggested addons to install in this case.
Posts: 6,255
Joined: Jun 2009
Reputation:
115
da-anda
Team-Kodi Member
Posts: 6,255
2013-02-01, 12:34
(This post was last modified: 2013-02-01, 12:36 by da-anda.)
doing it this way (let the user know what's being installed and giving him the chance to skip certain suggestions), I don't think we have to auto-uninstall anything other then the addons the skin depends on and are not used by other addons. So f.e. if a skin suggests youtube IMO this could stay after the skin got deleted. But if it requires skin.widgets but no other addon does, uninstall it. Same logic also for other addons ofc, like if youtube requires some download.helper addon and user uninstalls it, download.helper should also be uninstalled if not required by any other addon.
So as a rule of thumb - auto-uninstall required addons (helper scripts) if not used by other addons and keep everything else, given that the user knows about them as the was asked to install them.
If it's not too much additional work, we could also show this required/suggested addons dialog on uninstalling and ask if any of those should also be uninstalled.
Posts: 31,445
Joined: Jan 2011
(2013-01-31, 11:10)DonJ Wrote: (2013-01-30, 14:02)Ned Scott Wrote: Remove selected add-on and then prompt with "these add-ons were installed because of the one you just uninstalled. Remove these too?" only for add-ons that are still not in use by other add-ons and where not manually installed.
I think this will confuse the average user.. We need good default behavior
This is basically what happens if I uninstall something using Ubuntu or iOS (which uses the Debian package system). Well, it doesn't directly prompt me, but it is mentioned in the read out that "if you want to clean up these, run this command". That's why I suggested it.