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

Win MSI | When updating existing installations delete files from the previous version #155

Closed
carlosperate opened this issue May 31, 2021 · 12 comments
Labels
bug Something isn't working @ docs Improvements or additions to documentation : win
Milestone

Comments

@carlosperate
Copy link
Member

It would be an effective workaround to this problem: mu-editor/mu#1421 (comment)

Basically each new Mu release will have newer versions of all the required wells (any dependency or subdependency that is not version locked will fetch the latest at the time the installer is created) and we encounter issues like this when wheels from a previous installation are present after Mu has been updated:

ERROR: Cannot install cryptography 3.4.6 (from C:\Users\mike\AppData\Local\Programs\Mu Editor\Python\lib\site-packages\mu\wheels\cryptography-3.4.6-cp36-abi3-win_amd64.whl) and cryptography 3.4.7 (from C:\Users\mike\AppData\Local\Programs\Mu Editor\Python\lib\site-packages\mu\wheels\cryptography-3.4.7-cp36-abi3-win_amd64.whl) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested cryptography 3.4.6 (from C:\Users\mike\AppData\Local\Programs\Mu Editor\Python\lib\site-packages\mu\wheels\cryptography-3.4.6-cp36-abi3-win_amd64.whl)
    The user requested cryptography 3.4.7 (from C:\Users\mike\AppData\Local\Programs\Mu Editor\Python\lib\site-packages\mu\wheels\cryptography-3.4.7-cp36-abi3-win_amd64.whl)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
@carlosperate carlosperate changed the title Win MSI | When updating existing installations delete file from the previous version Win MSI | When updating existing installations delete files from the previous version May 31, 2021
@tmontes tmontes added bug Something isn't working : win labels Jul 3, 2021
@tmontes tmontes added this to the NEXT milestone Jul 3, 2021
@tmontes
Copy link
Member

tmontes commented Jul 9, 2021

Thanks for the report. Will investigate!

Back of mind thought: might be due to the fact that MSI versions are not as "expressive" as PEP 440's. Existing pup-created Mu MSIs are all version 1.0.0!

@tmontes tmontes modified the milestones: NEXT, NOW Jul 22, 2021
@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

THESIS:

  • Our MSIs do not remove files from previous version because the MSIs we have produced so far are all the same version -- Mu versions 1.1.0b1 through 1.1.0b5 all resolve down MSI version 1.1.0.

DIAG PLAN:

  • Create a new puppy 1.5.0 version with an additional file.
  • MSI package it.
  • Create a subsequent version where that file is removed.
  • Package it as MSI 1.5.0, 1.5.1, 1.6.0, and 2.0.0.

THEN:

  • Install the first 1.5.0 and the "newer" 1.5.0 with the removed file -- observe behaviour.
  • Install the first 1.5.0 and then 1.5.1 -- observe behaviour.
  • Install the first 1.5.0 and then 1.6.0 -- observe behaviour.
  • Install the first 1.5.0 and then 2.0.0 -- observe behaviour.

...ensuring, of course, that no puppy is installed when starting each of the above listed experiments.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

PROGRESS:

  • Created and packaged puppy 1.5.0 with a bundled hello.txt file.
  • Created and packaged puppy 1.6.0 much like 1.4.0, without the bundled file in 1.5.0.
  • Repacakged puppy 1.6.0 as 1.5.1.
  • Repackaged puppy 1.6.0 as 1.5.0.
  • Repackaged puppy 1.6.0 as 2.0.0.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

1.5.0 (original) to 1.5.0 (replacement):

  • No puppy installed.
  • Installed 1.5.0 (original) MSI file.
  • Does not run -- Made stupid Python packaging mistake.

NEXT:

  • Redo this all over again with:
    • 1.7.0 includes a bundled file (properly packaged!)
    • 1.8.0 removes it.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

PROGRESS:

  • Created and packaged puppy 1.7.0 with a bundled hello.txt file.
  • Created and packaged puppy 1.8.0 much like 1.4.0, without the bundled file in 1.7.0.
  • Repackaged puppy 1.8.0 as 1.7.0.post1.
  • Repacakged puppy 1.8.0 as 1.7.1.
  • Repackaged puppy 1.8.0 as 2.0.0.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

1.7.0 >> 1.7.0.post1:

  • No puppy versions installed.
  • Installed 1.7.0 MSI: launches and works as expected, bundled file is there, used and displayed.
  • Installed 1.7.0.post1 MSI on top of it:
    • Programs and Features shows two installed versions (?!?!?!): 1.7.0 and 1.7.0.post1 in the description, but both 1.7.0 MSI version.
    • Launching shows 1.7.0 in the title bar but does not use/show the bundled hello.txt file.
    • The hello.txt file is still on disk.

This is somehow expected and along the lines of the reported behaviour.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

1.7.0 >> (uninstall) >> 1.7.0.post1:

  • No puppy versions installed.
  • Installed 1.7.0 MSI: launches and works as expected, bundled file is there, used and displayed.
  • Uninstalled 1.7.0.
  • Installed 1.7.0.post1 MSI:
    • Programs and Features shows a single 1.7.0.post1 (description) version installed, 1.7.0 MSI verison.
    • Launching works as expected with 1.7.0.post1 in the title bar no bundled text file displayed.
    • The previously bundled hello.txt file is no longer on disk.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

1.7.0 >> 1.7.1:

  • No puppy versions installed.
  • Installed 1.7.0 MSI: launches and works as expected, bundled file is there, used and displayed.
  • Installed 1.7.1 MSI on top of it:
    • Programs and Features shows a single 1.7.1 version installed.
    • Launching works as expected with 1.7.1 in the title bar no bundled text file displayed.
    • The previously bundled hello.txt file is no longer on disk.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

1.7.0 >> 1.8.0:

  • No puppy versions installed.
  • Installed 1.7.0 MSI: launches and works as expected, bundled file is there, used and displayed.
  • Installed 1.8.0 MSI on top of it:
    • Programs and Features shows a single 1.8.0 version installed.
    • Launching works as expected with 1.8.0 in the title bar no bundled text file displayed.
    • The previously bundled hello.txt file is no longer on disk.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

1.7.0 >> 2.0.0:

  • No puppy versions installed.
  • Installed 1.7.0 MSI: launches and works as expected, bundled file is there, used and displayed.
  • Installed 2.0.0 MSI on top of it:
    • Programs and Features shows a single 2.0.0 version installed.
    • Launching works as expected with 2.0.0 in the title bar no bundled text file displayed.
    • The previously bundled hello.txt file is no longer on disk.

@tmontes
Copy link
Member

tmontes commented Jul 22, 2021

CONCLUSION:

  • The established THESIS is confirmed.
  • The pup-produced MSI files properly replace/remove existing files when installed on top of a previously installed pup-produced MSI file for the same product...
  • ...if and only if the new MSI version is greater than the installed MSI version.

The originally described issue results from the fact that all pup-produced Mu MSI files, from PEP 440 versions 1.1.0b1 to 1.0.0b5 result in the same 1.1.0 MSI version.

NEXT:

  • Document this behaviour.

@tmontes
Copy link
Member

tmontes commented Aug 26, 2021

Docs updated in the just merged #167. Closing.

@tmontes tmontes closed this as completed Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @ docs Improvements or additions to documentation : win
Projects
None yet
Development

No branches or pull requests

2 participants