GenericMappingTools / gmtserver-admin

Cache data and script for managing the GMT data server
GNU Lesser General Public License v3.0
7 stars 3 forks source link

Update server-info in Makefile #179

Closed Esteban82 closed 1 year ago

Esteban82 commented 1 year ago

See details in #178. The idea is to update the server-info section of Makefile.

I replace earth__server.txt for _*_server.txt. The problem with this is that reads the gmt_data_server.txt file. To avoid this, first I remove the file. Then, I save the file in the temporal folder (/tmp/) . Finally, I move the file to the information folder.

With these changes, I think that will get a gmt_data_server.txt for any type cellestial body (earth, moon, mars, etc).

seisman commented 1 year ago

I replace earthserver.txt for *server.txt. The problem with this is that reads the gmt_data_server.txt file. To avoid this, first I remove the file. Then, I save the file in the temporal folder (/tmp/) . Finally, I move the file to the information folder.

I don't remember how the scripts works and how these files are used. If these earth__server.txt files are only used when building the gmt_data_server.txt file, why don't we rename `earth_server.txttoearth_info.txt(or anything else) instead? Then we can use_info.txt` to match earth, moon or any other type cellestial body.

Esteban82 commented 1 year ago

why don't we rename earth_*_server.txt to earth_*_info.txt (or anything else) instead? Then we can use *_info.txt to match earth, moon or any other type cellestial body.

I think it is a good idea. I will check it.

PaulWessel commented 1 year ago

This may be a breaking change for all on older GMT versions.

Esteban82 commented 1 year ago

This may be a breaking change for all on older GMT versions.

Ok, so we shouldn't modify the name of the earth_*_server.txt files, right?

PaulWessel commented 1 year ago

No, because some people who fancy Linux and CentOS live in a previous century of GMT versions, like 6.1.1 etc or even 5. They actually believe old software has less bugs than the code we fix. I cannot wrap my head around it but it is a fact of life.

seisman commented 1 year ago

This may be a breaking change for all on older GMT versions.

I thought these earth_*_server.txt files are never used by GMT. The only two files that are used are gmt_data_server.txt and gmt_hash_server.txt, no?

PaulWessel commented 1 year ago

Yes, that is the truth.

willschlitzer commented 1 year ago

It seems like @Esteban82's solution is the only one to avoid changing the name of earth_*_server.txt

maxrjones commented 1 year ago

I'm a bit confused on the conclusion. If the earth_*_server.txt files are not used by GMT then changing the name of those files shouldn't matter, right? In which case @seisman's proposal would be fine.

PaulWessel commented 1 year ago

You are right. Irrelevant to GMT but may change some gmtserver admin scripts which is no big deal.

Esteban82 commented 1 year ago

Ok, so I think that there is two option:

  1. To remove gmt_data_server.txt and then do cat *_*_server.txt.
  2. Change the suffix of the files (to _info.txt) and then do cat *_info.txt

For the option 1 there is a PR. I also could do the option 2. Let me know what do you prefer.

Esteban82 commented 1 year ago

For the option 1 there is a PR. I also could do the option 2. Let me know what do you prefer.

I don't want to be a pain but we could finish this topic. I would need someone to approve this PR.