diskuv / dkml-installer-ocaml

The Windows-friendly distribution of OCaml
Apache License 2.0
63 stars 2 forks source link

Needs an uninstaller #3

Closed jonahbeckford closed 2 years ago

jonahbeckford commented 2 years ago

cc @nojb

Tracking item to make an OCaml uninstaller.

thaddeusemb commented 2 years ago

Using u-unsigned-diskuv-ocaml-windows_x86_64-0.4.1.exe uninstaller from https://github.com/diskuv/dkml-installer-ocaml/releases/tag/v0.4.1_r4 gives:

dkml-package.bc: [INFO] Running: C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\bin\dkml-install-user-runner.exe
                                   uninstall-user-network-ocamlcompiler
                                   --verbosity=info --color=always --prefix
                                   C:\Users\person 1\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\sg
dkml-install-user-runner.exe: [INFO] Running bytecode with: C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\sg\staging-ocamlrun\windows_x86_64\bin\ocamlrun
                                                              C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\sg\network-ocamlcompiler\generic\uninstall_userprofile.bc
                                                              --prefix
                                                              C:\Users\person 1\AppData\Local\Programs\DiskuvOCaml
                                                              --scripts-dir
                                                              C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\sg\network-ocamlcompiler\windows_x86_64
                                                              --verbosity=info
                                                              --color=always
uninstall_userprofile.bc: [INFO] Uninstalling OCaml with
                                 C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\sg\network-ocamlcompiler\windows_x86_64\uninstall-userprofile.bat
                                   -InstallationPrefix
                                   C:\Users\PERSON~1\AppData\Local\Programs\DISKUV~1
                                   -SkipProgress
uninstall_userprofile.bc: [INFO] Running command: C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\sg\network-ocamlcompiler\windows_x86_64\uninstall-userprofile.bat
                                                    -InstallationPrefix
                                                    C:\Users\PERSON~1\AppData\Local\Programs\DISKUV~1
                                                    -SkipProgress
New-Item : An item with the specified name C:\Users\PERSON~1\AppData\Local\Programs\DISKUV~1 already exists.
At C:\Users\person
1\AppData\Local\Temp\7z7DAD29C8\sg\network-ocamlcompiler\windows_x86_64\uninstall-userprofile.ps1:113 char:5
+     New-Item -Path $InstallationPrefix -ItemType Directory | Out-Null
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceExists: (C:\Users\PERSON...ograms\DISKUV~1:String) [New-Item], IOException
    + FullyQualifiedErrorId : DirectoryExist,Microsoft.PowerShell.Commands.NewItemCommand

FATAL [a0d16230]. A transient failure occurred.

Root cause: The conformant command had exit code 1:
                                           C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\sg\network-ocamlcompiler\windows_x86_64\uninstall-userprofile.bat
                                             -InstallationPrefix
                                             C:\Users\PERSON~1\AppData\Local\Programs\DISKUV~1
                                             -SkipProgress

>>> A transient failure occurred. <<<

dkml-package.bc: [ERROR] FATAL [5f927a8b].
                         A transient failure occurred.

                         Root cause: The command had exit code 20:
                                                                    C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\bin\dkml-install-user-runner.exe
                                                                      uninstall-user-network-ocamlcompiler
                                                                      --verbosity=info --color=always
                                                                      --prefix
                                                                      C:\Users\person 1\AppData\Local\Programs\DiskuvOCaml
                                                                      --staging-files
                                                                      C:\Users\PERSON~1\AppData\Local\Temp\7z7DAD29C8\sg

                         >>> A transient failure occurred. <<<

Press "y" and ENTER to exit the installer.
jonahbeckford commented 2 years ago

5 decouples this issue from 32-bit. That is, this issue is only for the 64-bit uninstaller.