{"action":"created","issue":{"url":"https://api.github.com/repos/dtgm/chocolatey-packages/issues/182","repository_url":"https://api.github.com/repos/dtgm/chocolatey-packages","labels_url":"https://api.github.com/repos/dtgm/chocolatey-packages/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/dtgm/chocolatey-packages/issues/182/comments","events_url":"https://api.github.com/repos/dtgm/chocolatey-packages/issues/182/events","html_url":"https://github.com/dtgm/chocolatey-packages/pull/182","id":149509185,"number":182,"title":"vcredist: use unique file names for 32-bit and 64-bit installers","user":{"login":"jberezanski","id":1577094,"avatar_url":"https://avatars.githubusercontent.com/u/1577094?v=3","gravatar_id":"","url":"https://api.github.com/users/jberezanski","html_url":"https://github.com/jberezanski","followers_url":"https://api.github.com/users/jberezanski/followers","following_url":"https://api.github.com/users/jberezanski/following{/other_user}","gists_url":"https://api.github.com/users/jberezanski/gists{/gist_id}","starred_url":"https://api.github.com/users/jberezanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jberezanski/subscriptions","organizations_url":"https://api.github.com/users/jberezanski/orgs","repos_url":"https://api.github.com/users/jberezanski/repos","events_url":"https://api.github.com/users/jberezanski/events{/privacy}","received_events_url":"https://api.github.com/users/jberezanski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-19T16:13:20Z","updated_at":"2016-04-21T16:55:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dtgm/chocolatey-packages/pulls/182","html_url":"https://github.com/dtgm/chocolatey-packages/pull/182","diff_url":"https://github.com/dtgm/chocolatey-packages/pull/182.diff","patch_url":"https://github.com/dtgm/chocolatey-packages/pull/182.patch"},"body":"On a clean Windows 8.1 x64 virtual machine, running on rather old hardware\r\nand with quite limited resources (i.e. slow), I have observed the\r\nfollowing behavior while installing vcredist2013(*):\r\n1) Chocolatey downloads and installs the 64-bit version successfully\r\n2) Chocolatey proceeds to download the installer for the 32-bit version,\r\n   using the same local file name as for the 64-bit version\r\n   (vcredist2013Install.exe).\r\n3) The download fails, because the destination file is used by another\r\n   process.\r\n\r\nI believe this happens because, due to the slowness of the machine,\r\nalthough the 64-bit vcredist installation has finished from Chocolatey\r\npoint of view, a system component (the Windows Installer service?) is\r\nstill holding the installer file open for a brief amount of time. This is\r\ndefinitely a timing-related issue, because I have not been able to\r\nreproduce it on an identical VM running on better hardware with more\r\nresources.\r\n\r\nSince the local installer file name is determined by the packageName\r\nargument to Install-ChocolateyPackage, let's avoid the problem by using a\r\ndifferent name for the 32-bit installer on 64-bit OS.\r\n\r\n(*) Although I personally encountered the issue while installing the 2013\r\nredist, it could happen for all other redists, too."},"comment":{"url":"https://api.github.com/repos/dtgm/chocolatey-packages/issues/comments/213013867","html_url":"https://github.com/dtgm/chocolatey-packages/pull/182#issuecomment-213013867","issue_url":"https://api.github.com/repos/dtgm/chocolatey-packages/issues/182","id":213013867,"user":{"login":"dtgm","id":3309431,"avatar_url":"https://avatars.githubusercontent.com/u/3309431?v=3","gravatar_id":"","url":"https://api.github.com/users/dtgm","html_url":"https://github.com/dtgm","followers_url":"https://api.github.com/users/dtgm/followers","following_url":"https://api.github.com/users/dtgm/following{/other_user}","gists_url":"https://api.github.com/users/dtgm/gists{/gist_id}","starred_url":"https://api.github.com/users/dtgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtgm/subscriptions","organizations_url":"https://api.github.com/users/dtgm/orgs","repos_url":"https://api.github.com/users/dtgm/repos","events_url":"https://api.github.com/users/dtgm/events{/privacy}","received_events_url":"https://api.github.com/users/dtgm/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T16:55:14Z","updated_at":"2016-04-21T16:55:14Z","body":">>The argument used for -PackageName needs to be the PackageId as specified by the nuspec id element.\r\n\r\n>I believe the value of that argument is used only for two purposes: naming of the locally downloaded installer file and logging output. Besides, there is already a precedent in one of the vcredist packages.\r\n\r\nThanks for pointing that out. I could definitely be wrong.\r\n\r\n>>So by using separate, you would implicitly be separating the package into separate IDs. I don't think this is a route to go down, but it helps identify the problem.\r\n\r\n>This would, however, be more clear to the user: seeing \"installing vcredist2013\" and \"installing vcredist2013_x86\" is more enlightening than seeing \"installing vcredist2013\" twice.\r\nIn order to avoid violating the specification of -PackageName of Install-ChocolateyPackage, the second Install-ChocolateyPackage could be replaced with the Get-ChocolateyWebFile/Install-ChocolateyInstallPackage combo. I don't believe this is better than adjusting PackageName, however.\r\n\r\nI thought text output specifies version being installed. This should show in the log file.\r\n\r\n>>The download should already be two separate files downloaded for 32 and 64 bits.\r\n\r\n>On the machine in question, both files were downloaded to the same directory and named identically: \"vcredist2013Install.exe\" (i.e. \"${PackageName}Install.exe\"). The file name in the URL was ignored.\r\nThat, I believe, is precisely the root cause of the problem.\r\n\r\nI thought that was old choco behavior. Can you be sure you are using the latest version of choco?\r\n"}}