Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean old dependencies from system #86

Open
krisgesling opened this issue Oct 13, 2020 · 3 comments
Open

Clean old dependencies from system #86

krisgesling opened this issue Oct 13, 2020 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@krisgesling
Copy link
Contributor

When a Skill is installed it can define system packages, Python packages and other Mycroft Skills as dependencies. These are installed automatically but not removed if the Skill is uninstalled at a later date.

We cannot just remove any dependencies on uninstall as these may be required by other Skills or services.

One suggestion from MycroftAI/skill-date-time#90 is to perform some type of system cleaning at regular intervals such as major releases. This may be possible on a Mycroft only system, but may be more challenging on a shared system like a desktop install unless its a Snap container or similar. Even if we only cleaned Python packages from the Mycroft venv it would be an improvement on the current system.

@krisgesling krisgesling added enhancement New feature or request help wanted Extra attention is needed labels Oct 13, 2020
@forslund
Copy link
Collaborator

For a desktop install there are two ways to go. virtual-environment like in mycroft-desktop-deb or the skills are installed using the system package manager like the implementation @PureTryOut has made.

In the first case the major version cleanup will work. In the second the system package manger will manage the dependencies so it's a non-issue.

@PureTryOut
Copy link
Contributor

Indeed, when managed with a system package manager this is a non-issue. I hope that use-case will remain supported and some automatic cleanup by msm can be disabled in some way.

@forslund
Copy link
Collaborator

Thinking around it. msm would only do cleanup when doing an upgrade or a remove and not automatically. The mycroft package for the Mark-X's or the desktop-deb would handle any scheduled cleanup so it shouldn't affect the installs handled by distro package managers. (you should be safe)

A possibility is to have a msm clean command. Parse the skills requirements and add the ones by core then remove any package that isn't on that list or required by a package on that list. A bit of tree-building but it should be doable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants