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

Enhance import/export schema to include override values #1512

Open
MisinformedDNA opened this issue Sep 25, 2021 · 8 comments
Open

Enhance import/export schema to include override values #1512

MisinformedDNA opened this issue Sep 25, 2021 · 8 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@MisinformedDNA
Copy link

Add a Override property to the schema for each package.

Beyond using the Import feature to specify what I want to install, I would like to specify how I want to install. For instance, when I install Git, I prefer to exclude shell integration. For VS, I probably want to specify certain workloads.

At it's simplest form, a user can simply edit the schema file to include their desired overrides. A more complex use case would be for winget to remember the arguments used during install so that it can export those values as well.

We may also want to add a command line option for winget input to ignore the overrides.

Proposed technical implementation details (optional)

Desired schema:

"Packages": {
  "items": {
    "properties": {
      "PackageIdentifier": { },
      "Version": { },
      "Channel": { },
      "Scope": { },
      "Override": {
        "description": "Arguments passed through to --override",
        "type": "string"
      },
    }
  }
}

Desired example

{
  "Sources": 
  [
    {
      "Packages": 
      [
        {
          "PackageIdentifier": "Microsoft.VisualStudio.2019.Enterprise",
          "Override": "--add Microsoft.VisualStudio.Workload.Universal"
        },
        {
          "PackageIdentifier": "Git.Git",
          "Override": "/NoShellIntegration /NoGitLfs"
        },
      ],
    }
  ],
}
@MisinformedDNA MisinformedDNA added the Issue-Feature This is a feature request for the Windows Package Manager client. label Sep 25, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Sep 25, 2021
@jedieaston
Copy link
Contributor

I really want this too, because for things like Visual Studio there's a very small chance you're going to use the arguments we pass in since you want your own workloads. Saving the custom arguments somewhere (although I know winget doesn't have a lot of state on the system right now, this might be something where that should change) so that they can be put into the file you get on winget export would be awesome!

@denelon denelon removed the Needs-Triage Issue need to be triaged label Sep 27, 2021
@denelon denelon changed the title Enhance schema to include override values Enhance import/export schema to include override values Sep 27, 2021
@alananderson-Allocate
Copy link

I was trying to use this for adding workloads to my install of Visual Studio.

@Trouffman
Copy link

What can we do to help move on this?
Would be super useful especially for pre-defined install scenarios where the export / import feature would be helpful.

Note that the Import support for such feature should come before the support for populating this in the "export" function (as some parameters might not be good to re-export - relevant to only one machine, etc..)

@Eonasdan
Copy link

Eonasdan commented Jan 4, 2023

Doesn't the v2 schema support doing this now?

@Trouffman
Copy link

@Eonasdan it does not look like it.

There is a section
"Argument": {
"description": "Argument used to install the source",
"type": "string"
},
But this is under the "Source" object (URL to the "cache" source repo) and not the Package.

@Eonasdan
Copy link

Eonasdan commented Jan 5, 2023

Ah yes you are correct.

@reecebradley
Copy link

my current company just went through a dept-wide laptop refresh for devs - how I wish this was an option before the holidays. I really want this feature. I'd be okay if we treated this like nodejs packages.json ex: winget install --id "abc" --save, and a winget.packages.json file saves the package and args. just thoughts. then we can use that file to install. manual, but sure be nice.

@mariobrostech
Copy link

Hi everyone,

I also want to voice my support for this request. Having something like this would greatly help in my automated winget deployments and would reduce my reliance on other third-party tools to accomplish this task. I would like to use winget for most of my application management needs going forward, and the implementation of this feature alone would allow for this to happen.

I'm not very familiar with the winget codebase beyond the manifest files themselves, but I'd be willing to learn and help someone else with the implementation if this isn't feasible for only one person to work on.

Thanks in advance for your consideration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

8 participants