austinsc / ChocolateyPackages

A collection of custom NuGet packages I have created for Chocolatey.
0 stars 1 forks source link

Cmake Package version 2.8.12 has NewItem issue #3

Open gyxtcgyxtc opened 9 years ago

gyxtcgyxtc commented 9 years ago

I am trying to install Cmake v2.8.12 using chocolatey, which I have done a couple of weeks before, without any issue. Now today, when I try to do it, all the sudden I get this error:

PS C:\Windows\system32> choco install -y cmake -version 2.8.12 Chocolatey v0.9.9.4 Installing the following packages: cmake By installing you accept licenses for the packages.

cmake v2.8.12 WARNING: Some imported command names include unapproved verbs which might make them less discoverable. Use the Verbose parameter for more detail or type Get-Verb to see the list of approved verbs. Downloading cmake 64 bit from 'http://www.cmake.org/files/v2.8/cmake-2.8.12.2-win32-x86.zip' Extracting C:\Users\clean\AppData\Local\Temp\chocolatey\cmake\cmakeInstall.zip to C:\ProgramData\chocolatey\lib\cmake\c ontent... C:\ProgramData\chocolatey\lib\cmake\content New-Item : Could not find a part of the path 'C:\ProgramData\chocolatey\lib\cma ke\content\cmake-2.8.12-win32-x86\bin\cmw9xcom.exe.ignore'. At C:\ProgramData\chocolatey\lib\cmake\tools\chocolateyInstall.ps1:18 char:26

@($com) | %{ New-Item <<<< "$.ignore" -type file } CategoryInfo : WriteError: (C:\ProgramData...xcom.exe.ignore:S tring) [New-Item], DirectoryNotFoundException FullyQualifiedErrorId : NewItemIOError,Microsoft.PowerShell.Commands.New ItemCommand New-Item : Could not find a part of the path 'C:\ProgramData\chocolatey\lib\cma ke\content\cmake-2.8.12-win32-x86\bin\cmake-gui.exe.gui'. At C:\ProgramData\chocolatey\lib\cmake\tools\chocolateyInstall.ps1:21 char:26 @($gui) | %{ New-Item <<<< "$.gui" -type file } CategoryInfo : WriteError: (C:\ProgramData...ake-gui.exe.gui:S tring) [New-Item], DirectoryNotFoundException FullyQualifiedErrorId : NewItemIOError,Microsoft.PowerShell.Commands.New ItemCommand cmake install not successful. Error while running 'C:\ProgramData\chocolatey\lib\cmake\tools\chocolateyInstall.ps1'. See log for details. Chocolatey installed 0/1 package(s). 1 package(s) failed. See the log for details. Failures: cmake

When I run "choco install -y cmake" without specifying the version, it successfully install the latest version of cmake for me. But when I include the version, the error occurs. I posted the same issue on chocolatey github site, their maintainer seems to think this is a powershell variable related issue:"The most likely issue is that the older version was depending on some chocolatey internals that were taken away as part of the rewrite (0.9.9)." The link to the issue is here:https://github.com/chocolatey/choco/issues/236

I wonder if this can be fixed although it is an older version of the package. Thanks a lot!

austinsc commented 9 years ago

I don't think that I can overwrite the old version on chocolatey's site; the best I could do would be to create a version 2.8.12.0 or something along those lines. Looks like the error is occuring when it is adding the cmw9xcom.exe to the ignore list which is not critical (more of a housekeeping thing). Perhaps you can try commenting out that line and installing it locally from your machine.

gyxtcgyxtc commented 9 years ago

The purpose of using this package was for automatic setup, so manually modify the package and install it is not exactly what I need. Although I was able to create myself a rather simple cmake2.8.12 package that simply just do a "Install-ChocolateyZipPackage" call, which doesn't give problem. I put this package in my own repo and told chocolatey to get it from that repo instead of chocolatey repo. This solved my problem for now. It is still your call whether or not to do a new 2.8.12.0 package for others who may encounter similar issue, although I don't imagine a lot of people would still require specifically cmake version 2.8.12. Thank you very much for your reply.

austinsc commented 9 years ago

If you submit a pull request with your working package, I'll upload it to the chocolatey.org servers so that it will be more accessible.