Skip to content

Conversation

@PaulWessel
Copy link
Member

This PR follows a suggestion in #7738 to allow the removal of just one data set, say earth_relief without deleting all the other Earth data. In addition I added option -N which simply lists (to stdout) which directories would have been deleted.

This PR follows a suggestion in #7738 to allow teh removal of just one data set, say earth_relief without deleting all the other Earth data. In addition I added option -N which simply lists (to stdout) which directories would have been deleted.
@PaulWessel PaulWessel added the enhancement Improving an existing feature label Aug 18, 2023
@PaulWessel PaulWessel added this to the 6.5.0 milestone Aug 18, 2023
@PaulWessel PaulWessel self-assigned this Aug 18, 2023
@Esteban82
Copy link
Member

I got an error with -N

gmt clear data -N
ERROR: Caught signal number 11 (Segmentation fault) at
/lib/x86_64-linux-gnu/libc.so.6(+0xba2b7)[0x7f701b0ba2b7]
[0x0]
Stack backtrace:
/usr/local/lib/libgmt.so.6(gmt_sig_handler_unix+0xf1)[0x7f701b558b41]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f701b042520]
/lib/x86_64-linux-gnu/libc.so.6(+0xba2b7)[0x7f701b0ba2b7]
/usr/local/lib/libgmt.so.6(+0x3f3e6)[0x7f701b43f3e6]
/usr/local/lib/libgmt.so.6(GMT_clear+0x1ce)[0x7f701b44031e]
/usr/local/lib/libgmt.so.6(GMT_Call_Module+0x4ff)[0x7f701b45e86f]
gmt(main+0x51b)[0x5583e8bcb8db]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f701b029d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f701b029e40]
gmt(_start+0x25)[0x5583e8bcc7b5]

Check that argument to data was not given and check for -N in a separate loop before doing the work.
@PaulWessel
Copy link
Member Author

Yikes. OK, that is fixed now but then there was another but so now my entire data dor os gone. Fixed that too but probably smart if you try this on a .server dir while renaming your original one .server_save and then just copy a few datasets to the temporary dir to see if it works. I am running gmt get data right now...

@Esteban82
Copy link
Member

Now works. But I don't understand the error message (last one).

gmt clear data -N
clear [NOTICE]: Directories to be deleted if -N was not in effect:
/home/federico/.gmt/server/earth/earth_day
/home/federico/.gmt/server/earth/earth_relief/earth_relief_05m_p
/home/federico/.gmt/server/earth/earth_relief/earth_relief_01m_p
/home/federico/.gmt/server/earth/earth_relief
/home/federico/.gmt/server/earth
/home/federico/.gmt/server
clear [ERROR]: Unrecognized target - skipped

@PaulWessel
Copy link
Member Author

I'll see if I can reproduce once gmt get stops...

@PaulWessel
Copy link
Member Author

Strange since printing out the server directory is the last thing clear does so not sure what that means.

@PaulWessel
Copy link
Member Author

OK, forgo to skip -N -V in the second loop (since I added a separate loop to detect -N).
Works for me now. See what you get.

@Esteban82
Copy link
Member

Now it is fine.

@Esteban82 Esteban82 merged commit 0dcf60d into master Aug 19, 2023
@Esteban82 Esteban82 deleted the clear-upgrades branch August 19, 2023 12:01
@maxrjones maxrjones added the add-changelog Add PR to the changelog label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants