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

Package params are also applied to dependent package #733

Closed
tvlieg opened this issue May 12, 2016 · 3 comments
Closed

Package params are also applied to dependent package #733

tvlieg opened this issue May 12, 2016 · 3 comments

Comments

@tvlieg
Copy link

tvlieg commented May 12, 2016

What You Are Seeing?

If I install a package with install parameters, the parameters are also applied on a dependent package. In this case I'm trying to install a Tomcat instance, which has jdk8 as a dependency. command:

choco upgrade tomcat -dvy -m -params " INSTALLDIR=C:\Programs\tomcat "

Chocolatey fails on -params " INSTALLDIR=C:\Programs\tomcat " while installing jdk8, although the parameter wasn't intended for jdk8 at all.

What is Expected?

It is expected that -params " INSTALLDIR=C:\Programs\tomcat " isn't applied on jdk8 while installing tomcat, but only on tomcat.

How Did You Get This To Happen? (Steps to Reproduce)

Running choco upgrade tomcat -dvy -m -params " INSTALLDIR=C:\Programs\tomcat ". However, tomcat and jdk8 packages have been adjusted, so I don't know whether the problem can be reproduced easily. I don't think however that mixing the -params in between the two packages is a resultant of the install scripts, because those scripts have as far as I know no role in setting install parameters.

Output Log

GIST LINK - https://gist.github.com/flyonawindshield/81aaaa430b3119bee112a584ddfdd0ca

@ferventcoder
Copy link
Member

While I will state that we've documented that this is the case, this scenario is not one you can easily control - you'd have to know to install the dependencies ahead of time or call this with --ignore-dependencies. Neither of those is an optimal scenario.

Side note - choco install tomcat --dir c:\Programs\tomcat will only ever apply to tomcat in Chocolatey Professional / Chocolatey for Business. The ubiquitous install directory switch for all your packages feature is already done and this exact scenario was accounted for already there. https://www.kickstarter.com/projects/ferventcoder/chocolatey-the-alternative-windows-store-like-yum/posts/1565222

Sounds like we need to do something similar for the selectors here.

@tvlieg
Copy link
Author

tvlieg commented May 13, 2016

Thanks for the quick reply! Installing the dependency ahead of time is the solution I'll go for now, although it is a bit more cumbersome as I'm working in the context of Puppet and I normally wouldn't want package-dependency-logic in my modules/profiles.

@ferventcoder
Copy link
Member

At any rate it is logged as a bug/enhancement and I've marked it for the next release.

ferventcoder added a commit that referenced this issue May 28, 2016
When using Install arguments or package parameters, those only apply to
the specified packages and not to the dependent packages, unless those
packages are the meta/virtual packages that come in "*.install",
"*.portable" flavors. If a package doesn't meet the criteria, don't
pass install arguments or package parameters to that package.
ferventcoder added a commit that referenced this issue May 28, 2016
* stable:
  (doc) update CHANGELOG/nuspec
  (GH-753) Get-WebFileName Matches on Invalid Chars
  (doc) update CHANGELOG/nuspec
  (GH-356) Resolve sources by name
  (GH-732) Request/Response Timeout configurable
  (maint) formatting
  (GH-751) Use package name/version from env vars
  (GH-752) Combine Push timeout and execution timeout
  (GH-622) Remove NuGet temp folders
  (GH-622) Allow silent retries
  (GH-584) License loading occurs in DLL
  (GH-584) update licensing docs
  (doc) update CHANGELOG/nuspec
  (GH-733) Don't pass some args to dependencies
  (doc) update CHANGELOG/nuspec
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

3 participants