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

(inkscape) removes msi before upgrade to prevent 1638 error, fixes #550 #996

Closed
wants to merge 1 commit into from

Conversation

jtcmedia
Copy link
Contributor

Description

Added a beforemodify script that checks to see if Inkscape is installed and uninstalls the msi.

Motivation and Context

fixes #550

How Has this Been Tested?

Installed 0.92.2 w/ beforemodify script, then did an upgrade to 0.92.3. Tested OK.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Migrated package (a package has been migrated from another repository)

Checklist:

  • My code follows the code style of this repository.
  • My change requires a change to documentation (this usually means the notes in the description of a package).
  • I have updated the documentation accordingly (this usually means the notes in the description of a package).
  • All files are up to date with the latest Contributing Guidelines
  • The added/modified package passed install/uninstall in the chocolatey test environment.
  • The changes only affect a single package (not including meta package).

@@ -0,0 +1,7 @@
$app = Get-WmiObject -Class Win32_Product -Filter "Name Like 'Inkscape%'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use the Get-WmiObject, but rather use a combination of Get-UninstallRegistryKey and Uninstall-ChocolateyPackage instead.

If you could update with that, I would be more than happy to merge this one in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also forgot, this must be done in the install script, not the before modify script (Since the before modify script is run on both upgrade and uninstall, but doesn't fail the package if it doesn't work))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdmiringWorm I tried that before but ran into problems. I've spent enough time on this so I encourage someone else to have a go at this.

@AdmiringWorm
Copy link
Member

@HolisticDeveloper while indeed it is still subject to the potential slow downs that was mentioned, that wasn't the only reason I requested it to be changed.

Whenever the Win32_Product is used, it forces Windows Installer to reconfigure every application that have been installed through MSI (this is also the cause of the potention slow down though).

This is also why it's suggested to avoid when possible.
https://github.com/chocolatey/package-validator/wiki/DontUseGetWmiObjectForFindingInstalledPackages

@AdmiringWorm
Copy link
Member

Thank you for your contribution, unfortunately as it currently stands we can't use it as is.
However, the issue you wanted to fix with this PR have been fixed with an alternate edition and will be available when the next version of InkScape is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(inkscape) Due to the bug in vendor installer, package should uninstall prior to update
2 participants