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

Replaced deprecated cmd to fix package uninstall #1426

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

jsnowy
Copy link
Contributor

@jsnowy jsnowy commented Sep 15, 2024

I found that the “cmake_uninstall.cmake.in” in the test branch can't remove any installation files, but still prompted files uninstalled. Then I located a bug at this line: COMMAND "@CMAKE_COMMAND@" -E remove \"{file}\", and found that there are two issues: 1st. the "" was added in front of the file string quote, resulting in incorrect parsing of the file path, it needs to be removed. 2nd. The deprecated cmake -E remove command does not check whether the file path is correct, nor return an error to be captured by if (NOT "${rm_retval}" STREQUAL 0), the solution is to use 'cmake -E rm' instead. I have made these fix and added a file verification to my fork repository, I hope to contribute my code here.

@Nightwalker-87 Nightwalker-87 added this to the v1.8.1 milestone Oct 3, 2024
@Nightwalker-87 Nightwalker-87 changed the title Replace deprecated cmd to Fix Uninstall Replaced deprecated cmd to fix package uninstall Oct 3, 2024
@Nightwalker-87 Nightwalker-87 merged commit a548e83 into stlink-org:testing Oct 3, 2024
10 checks passed
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Oct 3, 2024
@jsnowy jsnowy deleted the fixUninstall branch November 27, 2024 10:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants