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

Automatically installed packages can become manually installed packages #315

Open
Tracked by #112
christophenne opened this issue Feb 28, 2024 · 4 comments
Open
Tracked by #112

Comments

@christophenne
Copy link
Member

christophenne commented Feb 28, 2024

Is your feature request related to a problem? Please describe.
A user might want to install a package X that already exists, but only because it is a dependency of another package P. If this other package P is removed, then X is also removed, which the user might want to prevent by installing X manually before removing P.

Describe the solution you'd like
Installing such a package should ask the user if they want to "mark as explicit installation" or something like that. Implementation-wise this means that the owner references of the package need to be removed.

Describe alternatives you've considered

Additional context
Related #430

@hanshal101
Copy link
Contributor

Hey @christophenne This issue looks interesting and challenging for me. I can take this and try to solve it.

@hanshal101
Copy link
Contributor

While looking at this issue, I think of two ways:

  1. Naming the package explicit

For this approach, we can make use of cli to mark the package as explicit during installation as well as after installation by labeling them as explicit.
For example:
glasskube install myapp --explicit
or
(for already installed package or after installation)
glasskube explicit myapp

  1. Creating a json file like structure which can store the package name in the explicit key.

Somewhat like what package.json has in React
For example, in explicit.json

{
  "explicit:": [
       "myapp1",
       "myapp2",
   ]
}

These two approaches came in my mind. What are you takes on these. Please share your feedback.

@christophenne
Copy link
Member Author

@hanshal101 we can't really start working on this yet, but thanks for your thoughts on this.

However, marking a package as "explicit" (or whatever we want to call it), is nothing that the user wants immediately when installing a package – instead they will be asked by the CLI/UI if and only if the desired package already exists because it is a dependency of another package. So this will have to be checked, and if the user says "yes", the owner references need to be removed.

@hanshal101
Copy link
Contributor

Ok, you mean whenever a user deletes a particular package which has the dependency on another package. And if he wants to remove the another package he should type yes is that the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants