Main icon indicating copy to clipboard operation
Main copied to clipboard

[email protected]_3: Decompress error

Open PhotonNite opened this issue 5 years ago • 7 comments

Installing 'openssl-mingw' (1.1.1j_3) [64bit] Loading openssl-1.1.1j_3-win64-mingw.tar.xz from cache. Checking hash of openssl-1.1.1j_3-win64-mingw.tar.xz ... ok. Extracting openssl-1.1.1j_3-win64-mingw.tar.xz ... Exception: C:\scoop\apps\scoop\current\lib\core.ps1:510

Line |
 510 |          throw "Could not find '$(fname $from)'! (error $($proc.ExitCo …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Could not find 'openssl-1.1.1j_3-win64-mingw'! (error 16)

PhotonNite avatar Feb 19 '21 15:02 PhotonNite

I have the same problem, this is full output:

❯❯❯ scoop update openssl-mingw -f
openssl-mingw: 1.1.1j_3 -> 1.1.1j_3
Updating one outdated app:
Updating 'openssl-mingw' (1.1.1j_3 -> 1.1.1j_3)
Downloading new version
Loading openssl-1.1.1j_3-win64-mingw.tar.xz from cache
Checking hash of openssl-1.1.1j_3-win64-mingw.tar.xz ... ok.
Uninstalling 'openssl-mingw' (1.1.1j_3)
Installing 'openssl-mingw' (1.1.1j_3) [64bit]
Loading openssl-1.1.1j_3-win64-mingw.tar.xz from cache
Extracting openssl-1.1.1j_3-win64-mingw.tar.xz ... Could not find 'openssl-1.1.1j_3-win64-mingw'! (error 16)
At C:\users\silver zachara\scoop\apps\scoop\current\lib\core.ps1:510 char:9
+         throw "Could not find '$(fname $from)'! (error $($proc.ExitCo ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Could not find ...gw'! (error 16):String) [], RuntimeException
    + FullyQualifiedErrorId : Could not find 'openssl-1.1.1j_3-win64-mingw'! (error 16)

silverqx avatar Feb 25 '21 07:02 silverqx

Problem still exists with openssl-1.1.1j_4

silverqx avatar Mar 07 '21 09:03 silverqx

The problem is that it is openssl-1.1.1j_4-win64-mingw.tar.xz tar and xz archive, so scoop extracts xz archive with Expand-7zipArchive function and the result of this decompression is openssl-1.1.1j_4-win64-mingw.tar file, but scoop's movedir function expects to have extracted directory at .\openssl-1.1.1j_4-win64-mingw which he can not find and because of that it throws an exception.

If I look at the openssl-mingw package history, it was .tar.xz archive before too, so something was changed in the scoop core what is causing this issue.

silverqx avatar Mar 07 '21 09:03 silverqx

If somebody is searching workaround then you are in, add this line read-host "Press ENTER to continue..." to the "C:\Users\Your_UserName\scoop\apps\scoop\current\lib\core.ps1" at line 496, it is exactly an empty line in following snippet:

function movedir($from, $to) {
    $from = $from.trimend('\')
    $to = $to.trimend('\')

    $proc = New-Object System.Diagnostics.Process
    $proc.StartInfo.FileName = 'robocopy.exe'

Then when the script will wait for the keypress, extract openssl-1.1.1j_4-win64-mingw.tar into the subfolder openssl-1.1.1j_4-win64-mingw and press some key afterward, so the script can continue and it will be installed properly. 😁

silverqx avatar Mar 07 '21 09:03 silverqx

I think the reason is, that the .tar.xz file contains a folder without the revision number (_4 in your example).

Problem still exists: https://github.com/ScoopInstaller/Main/issues/2593

jeffrson avatar Aug 25 '21 08:08 jeffrson

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 27 '21 14:10 stale[bot]

Ok, this problem was fixed, now I have upgraded openssl-mingw without problems.

silverqx avatar Dec 15 '21 18:12 silverqx