[CDRIVER-2682] Add an uninstall target Created: 02/Jun/18 Updated: 28/Oct/23 Resolved: 29/Aug/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 1.13.0 |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Kevin Albertson | Assignee: | Roberto Sanchez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
Suggested by matt.broadstone, adding a target to allow make uninstall would be useful. It might be as simple as removing all files listed in install_manifest.txt suggested here. |
| Comments |
| Comment by Githook User [ 01/Sep/18 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: Merge branch 'master' of github.com:mongodb/mongo-c-driver
|
| Comment by Githook User [ 28/Aug/18 ] |
|
Author: {'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}Message: |
| Comment by Roberto Sanchez [ 31/Jul/18 ] |
|
kevin.albertson, thanks for the feedback. |
| Comment by Kevin Albertson [ 31/Jul/18 ] |
|
I like that approach. Having a CMake uninstall target to call the script, so the user can still make uninstall, would be convenient if the build directory is still around. But it'll still be possible to uninstall if the build directory has been cleaned. |
| Comment by Roberto Sanchez [ 31/Jul/18 ] |
|
So, I have started looking into this and I wonder if we could consider an alternate approach. The main drawback of the uninstall target is that it only works if the build directory is still around (and hasn't been cleaned). That may not always be the case. A more complete/robust solution might be to have in the install target convert the install_manifest.txt into a script appropriate for the platform (batch or powershell for Windows and POSIX shell for others) that uses the platform-specific remove commands to eliminate the files and directories (the latter only if empty after removing known files). The script would be installed to a common location (like <prefix>/share/mongo-c-driver/uninstall.sh) and could be called directly by the user. The CMake build could still support an actual uninstall target that just calls that script (determining the prefix based on how the build directory was configured). This would be a bit more work than the naive approach proposed in the StackOverflow posting, but I do not think it would be a great deal more. Would this be a viable approach? |
| Comment by A. Jesse Jiryu Davis [ 08/Jun/18 ] |
|
Roberto, something to put at the back of your queue. |