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

Enable Param Passing to Dependencies #139

Open
3 tasks
MalwareMechanic opened this issue Dec 1, 2022 · 2 comments
Open
3 tasks

Enable Param Passing to Dependencies #139

MalwareMechanic opened this issue Dec 1, 2022 · 2 comments
Labels
💎 enhancement It is working, but it could be better

Comments

@MalwareMechanic
Copy link
Collaborator

MalwareMechanic commented Dec 1, 2022

Overview

Currently, dependencies install using default everything. However, chocolatey allows passing parameters to dependencies by coupling two command-line arguments: --params-global and --params (syntax --params '/PARAM1:value1 /PARAMFLAG').

As an example, say fake-package.vm had a dependency that could be configured to use a specific port, installation path, and verbosity flag, we would pass these parameters as below:

choco install fake-package.vm --params-global --params '/Port:82 /InstallationPath:""C:\blah\folder with space"" /DEBUG'

To enable this, we need to do the following:

  • Update config.xml with dependency parameters
    • E.g., <package name="cygwin.vm" params="/InstallDir:%RAW_TOOLS_DIR%\Cygwin"/>
  • Update flarevm.installer.vm to check the config.xml for parameters and pass them accordingly during the install call
  • Update each package that uses dependency parameters (mainly aimed at metapackages) to use Get-PackageParameters and handle any parameters as necessary (e.g., installing to a non-default dependency location specified by the "shim path" we have users provide)

Resources

@MalwareMechanic MalwareMechanic added the 💎 enhancement It is working, but it could be better label Dec 1, 2022
@MalwareMechanic
Copy link
Collaborator Author

Also need to consider --install-arguments, which differs from "package" specific parameters -- it's used to instruct native installers.

There is also the concept of "Install Arguments", or silent arguments you can pass through transparently to the native installer. This is more of a way for a package consumer to override the default silent arguments that are passed to the native installer.

@Ana06
Copy link
Member

Ana06 commented Jul 17, 2024

Is there a concrete package for which you would like to use this feature @MalwareMechanic? Otherwise I think we shouldn't implement this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 enhancement It is working, but it could be better
Projects
None yet
Development

No branches or pull requests

2 participants