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

Boxstarter is not parsing Chocolatey pin and source parameters correctly #265

Closed
flcdrg opened this issue Jun 21, 2017 · 5 comments · Fixed by #404
Closed

Boxstarter is not parsing Chocolatey pin and source parameters correctly #265

flcdrg opened this issue Jun 21, 2017 · 5 comments · Fixed by #404
Assignees
Labels
5 - Released The issue has been resolved, and released to the public for consumption Bug Issues where something has happened which was not expected or intended Priority_HIGH Issues that are considered to be a high priority to get fixed
Milestone

Comments

@flcdrg
Copy link
Member

flcdrg commented Jun 21, 2017

Boxstarter 2.9.26 is misinterpreting choco pin and thinks there are package names to install, rather than pinning a package.

Such that choco pin add -n=GoogleChrome looks for a package named 'add' and also 'googlechrome'

Install-BoxstarterPackage https://gist.githubusercontent.com/flcdrg/87802af4c92527eb8a30/raw/pin-example.ps1
Boxstarter: Installing package https://gist.githubusercontent.com/flcdrg/87802af4c92527eb8a30/raw/pin-example.ps1
Boxstarter Version 2.9.26
(c) 2017 Matt Wrock. http://boxstarter.org

Boxstarter: Disabling Automatic Updates from Windows Update
Attempting to build package from 'tmp3C90.tmp.nuspec'.
Successfully created package 'C:\Users\David\AppData\Roaming\Boxstarter\BuildPackages\tmp3C90.tmp.1.0.0.nupkg'
Boxstarter: Created a temporary package tmp3C90.tmp from https://gist.githubusercontent.com/flcdrg/87802af4c92527eb8a30/
raw/pin-example.ps1 in C:\Users\David\AppData\Roaming\Boxstarter\BuildPackages
++ Boxstarter starting Calling Chocolatey to install tmp3C90.tmp. This may take several minutes to complete...
Installing the following packages:
tmp3C90.tmp
By installing you accept licenses for the packages.
[NuGet] Installing 'tmp3C90.tmp 1.0.0'.
[NuGet] Successfully installed 'tmp3C90.tmp 1.0.0'.

tmp3C90.tmp v1.0.0 (forced)
tmp3c90.tmp package files install completed. Performing other installation steps.

  • Boxstarter starting Calling Chocolatey to install add. This may take several minutes to complete...
  • Boxstarter starting Calling Chocolatey to install add. This may take several minutes to complete...
    Installing the following packages:
    add;GoogleChrome
    By installing you accept licenses for the packages.
    add not installed. The package was not found with the source(s) listed.
    If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not.
    Version: ""
    Source(s): "https://licensedpackages.chocolatey.org/api/v2/;https://chocolatey.org/api/v2/"
    GoogleChrome v59.0.3071.104 already installed. Forcing reinstall of version '59.0.3071.104'.
    Please use upgrade if you meant to upgrade to a new version.
    [NuGet] Uninstalling 'GoogleChrome 59.0.3071.104'.
@mwrock
Copy link
Member

mwrock commented Jul 2, 2017

Boxstarter is currently very install/update centric. In other words, it does not work well with other choco commands. I experimented with a fix so that if one runs another command like pin, that command gets propperly forwarded to the chocolatey library call.

Unfortunate I think this is suffering from the same issue as #264 because although it is clearly passing pin to the choco dll, chocolatey is trying to perform an install. My hypothesis is that it does this because the "outer" package is performing an install and this "sticks" to the inner calls.

@mwallner
Copy link
Member

bump - same here with choco source
I'm trying to install a chocolatey-patches package that uses choco source a couple of times i.e.

  $(choco source) | ForEach-Object { 
    $feed = $_
    foreach ($lf in $legacyFeeds) {
      if (-Not $feed.Contains($lf)) {
        continue
      }
      $feedname = $feed.Split(" ")[0]
      Remove-ChocoFeed $feedname
    }
  }

Any chance to get this fixed soon?

jcoconnor pushed a commit to jcoconnor/puppetlabs-packer that referenced this issue Jul 24, 2017
Boxstarter is misbehaving again, so pin to earlier version.
Issue chocolatey/boxstarter#265 logged
against Boxstarter.
jcoconnor pushed a commit to jcoconnor/puppetlabs-packer that referenced this issue Jul 24, 2017
Boxstarter is misbehaving again, so pin to earlier version.
Issue chocolatey/boxstarter#265 logged
against Boxstarter.
jcoconnor pushed a commit to jcoconnor/puppetlabs-packer that referenced this issue Jul 26, 2017
Boxstarter is misbehaving again, so pin to earlier version.
Issue chocolatey/boxstarter#265 logged
against Boxstarter.
@flcdrg
Copy link
Member Author

flcdrg commented Oct 11, 2017 via email

@mattdkerr
Copy link

My mistake!

@pauby pauby changed the title choco pin isn't working choco pin and choco source do not work as expected when running in Boxstarter Mar 18, 2019
@pauby pauby added Bug Issues where something has happened which was not expected or intended Up For Grabs 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint Priority_HIGH Issues that are considered to be a high priority to get fixed labels Mar 18, 2019
@mwallner mwallner self-assigned this Aug 27, 2019
@mwallner mwallner added this to the v2.13.0 milestone Aug 27, 2019
@mwallner
Copy link
Member

mwallner commented Aug 27, 2019

Boxstarter function "chocolatey" completely ignores what command is passed to chocolatey, (i.e. install, update, source, pin, ...)
see https://github.com/chocolatey/boxstarter/blob/master/Boxstarter.Chocolatey/Chocolatey.ps1#L94

There should be something like

    if ($command -ne "install" -and $command -ne "update") {
        Call-Chocolatey @PSBoundParameters @args
        return
    }
  • that would probably fix this issue and a couple of other "weird issues"

need to look a bit further into this, but want to get it fixed for the next release.

@mwallner mwallner added 2 - Working A user or team member has started working on the issue and removed Up For Grabs 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint labels Aug 27, 2019
mwallner added a commit to mwallner/boxstarter that referenced this issue Aug 30, 2019
pauby added a commit that referenced this issue Feb 18, 2020
(GH-265) Disable reboot check for anything but install, uninstall & upgrade
@pauby pauby changed the title choco pin and choco source do not work as expected when running in Boxstarter Boxstarter is not parsing Chocolatey pin and source parameters correctly Oct 19, 2020
@pauby pauby added 5 - Released The issue has been resolved, and released to the public for consumption and removed 2 - Working A user or team member has started working on the issue labels Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released The issue has been resolved, and released to the public for consumption Bug Issues where something has happened which was not expected or intended Priority_HIGH Issues that are considered to be a high priority to get fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants