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

Option to ignore existing installed products #91

Closed
CiaranMcAndrew1 opened this issue Feb 26, 2024 · 4 comments
Closed

Option to ignore existing installed products #91

CiaranMcAndrew1 opened this issue Feb 26, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request mpm MATLAB Package Manager related

Comments

@CiaranMcAndrew1
Copy link

It is useful to call mpm to add new packages to an existing installation. This has a lot of uses in container workflows and CI systems.

However, if the user requests packages that are already installed, mpm will return an error. e.g.

Error: Unable to install these products because they are already installed:
MATLAB
MPM Installation Failure. See below for more information:
(Feb 26, 2024 14:00:33) Starting download of product meta data
(Feb 26, 2024 14:00:33) Finished downloading product meta data
(Feb 26, 2024 14:00:38) Starting to retrieve support package metadata
(Feb 26, 2024 14:00:42) Finished retrieving support package metadata
(Feb 26, 2024 14:00:47) The following products are already installed and will not be updated: MATLAB

This means the caller needs knowledge of what is already installed, or to somehow get that information from another source first.

Instead, it would be very useful to have a command line argument to suppress this error, such as --ignore-installed-packages.

@ggriffithsuk ggriffithsuk added the enhancement New feature or request label Feb 26, 2024
@trailstrider
Copy link

Certainly, this is more than just an enhancement request. At the same time, rather than having to explicitly add a flag, the default should be more sane. A normal expectation would be that if requested packages are already installed, just tell me they are installed already and move on. Similarly, the dependencies should also be automatic.

That said, in both cases, a Y/n prompt would be appropriate to continue. At that point, given the automation uses cases for MPM, something to keep things automatic would be appropriate. Either an apt style -y flag, or if a more explicit approach of not pausing/erroring ONLY if the request predicts the situation, such as with the flag @CiaranMcAndrew1 suggested --ignore-installed-packages. Maybe there is another way that also makes sense... Either way, something more seamless and sensible would be appreciated.

@mw-skardile
Copy link
Member

Hi CiaranMcAndrew1 and trailstrider

Sorry for the late reply, and thank you so much for your feedback. We understand this feature's absence in the current mpm version is an inconvenience. Hence, we've added this enhancement to our roadmap, so it will be included in a future mpm release.

@prabhakk-mw prabhakk-mw added the mpm MATLAB Package Manager related label May 24, 2024
@mw-skardile
Copy link
Member

Hi @CiaranMcAndrew1 and @trailstrider,

The latest release of MPM now ignores already installed products by default. It will only throw an error if all specified products are already installed. For example, if MATLAB is already installed and you specify --products MATLAB Simulink Database_Toolbox, MPM will install Simulink and Database_Toolbox. Unlike the previous version, it won't throw an error. However, if all three products are installed, MPM will notify users with an error message.

I hope this functionality is useful for your container workflows and CI systems. Thanks again for your feedback. I am closing this issue for now.

@CiaranMcAndrew
Copy link

Thanks @mw-skardile - great to hear. This will definitely reduce complexity in our workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mpm MATLAB Package Manager related
Projects
None yet
Development

No branches or pull requests

6 participants