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

Source option not working as expected #44

Closed
simondel opened this issue Aug 15, 2016 · 12 comments
Closed

Source option not working as expected #44

simondel opened this issue Aug 15, 2016 · 12 comments

Comments

@simondel
Copy link

I'm having some issues with the Source option in the cChocoPackageInstaller. We have a private Chocolatey repository which we use for some packages. I'm working a package right now which has the same name as a public package, my config is like this:

cChocoSource Privaterepo
{
    Name = 'privaterepo'
    Source = 'https://our.private.repo.net/nuget'
}

cChocoPackageInstaller HipChat
{
    Name = 'hipchat'
    Source = 'privaterepo'
    DependsOn = "[cChocoInstaller]InstallChocolatey", "[cChocoSource]Privaterepo"
}

During testing our private hipchat package had a lower version (0.0.6) than the public package (2.2.1164) and when applying the DCS configuration, the public package was installed instead of our private package.

I would expect that our private package would be installed here since the command

choco install hipchat --source=privaterepo

does install our private version.

@ferventcoder
Copy link
Member

When specifying a source, Chocolatey should only look at that source.

@simondel I think the provider here may not be passing through quite correctly.

I'm guessing the following may work as a workaround for now:

cChocoPackageInstaller HipChat
{
    Name = 'hipchat'
    Source = 'https://our.private.repo.net/nuget'
    DependsOn = "[cChocoInstaller]InstallChocolatey", "[cChocoSource]Privaterepo"
}

@ferventcoder
Copy link
Member

If not, it's likely a bug in this provider.

@simondel
Copy link
Author

Thanks for the quick response! I initially used your suggestion and then moved to a cChocoSource resource when that didn't work (and because I was specifying the url more than once in my DSC config).
So I think this is a bug, unfortunately.

@DamianBis
Copy link
Contributor

Yup. the issue is that instead of running the install passing through the -source command to chocolatey it is just adding the source to chocolatey.

@javydekoning
Copy link
Contributor

Indeed, the code mentioned above is incorrect. If #50 get's merged I'll continue work on this, seems like a rather easy thing to fix.

@travis-sobeck
Copy link

Is there a timeline for getting this resolved, its still broken?
Thanks

@ferventcoder
Copy link
Member

This is still not yet resolved, however I'm going to set it up for being fixed in 2.4.0.

@ferventcoder ferventcoder added this to the 2.4.0 milestone Apr 18, 2017
@gmatusko
Copy link

Let us know when you have a fix for this, we're experiencing the same issue when trying to install packages from various sources, internal and external. Working around it by adding the sources to the config using cChocoSource but would be nice if this worked as expected

@travis-sobeck
Copy link

As an aside, I found that as long as my package was not named exactly the same as a public one, it works fine.

@ferventcoder
Copy link
Member

This looks to be fixed with #84.

Jark added a commit to Jark/cChoco that referenced this issue Jun 22, 2017
Jark added a commit to Jark/cChoco that referenced this issue Jun 22, 2017
Jark added a commit to Jark/cChoco that referenced this issue Jun 22, 2017
The Source parameter for the cChocoPackageInstaller DSC Resource is
not used by the choco install and choco upgrade commands. This commit
rectifies this issue.
Jark added a commit to Jark/cChoco that referenced this issue Jun 22, 2017
The Source parameter for the cChocoPackageInstaller DSC Resource is
not used by the choco install and choco upgrade commands so packages
get installed and upgraded from the central chocolatey repository
instead of the url specified in the Source parameter. This commit
rectifies this issue.
ferventcoder added a commit that referenced this issue Jun 22, 2017
@ferventcoder
Copy link
Member

This is now fixed and will go into the next release of cChoco

ferventcoder added a commit that referenced this issue Aug 29, 2017
* development:
  (GH-71) Implemented cChocoFeature
  (GH-87) Moved to using reduced output
  (maint) formatting
  (GH-70) Apply Apache v2 Licensing
  (GH-85) Pass the source to cChocoPackageInstallerSet correctly
  (GH-44) Pass the Source to choco correctly
  Added version to example
  (GH-77) Push to gallery on new tags
  (maint) formatting
  (GH-72) PowerShell scripts in format for signing
jrdnr added a commit to jrdnr/cChoco that referenced this issue Sep 1, 2017
…ages_for_faster_run

* development:
  (chocolateyGH-87) Moved to using reduced output
  (maint) formatting
  (chocolateyGH-70) Apply Apache v2 Licensing
  (chocolateyGH-85) Pass the source to cChocoPackageInstallerSet correctly
  (chocolateyGH-44) Pass the Source to choco correctly
  Added version to example
  (chocolateyGH-77) Push to gallery on new tags
  (maint) formatting
  (chocolateyGH-72) PowerShell scripts in format for signing

# Conflicts:
#	DSCResources/cChocoPackageInstall/cChocoPackageInstall.psm1
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

6 participants