Page MenuHome

Fix T74218: Problems when running 'make update_po' in BASH shell on MacOS
AbandonedPublic

Authored by Ankit Meel (ankitm) on Apr 12 2020, 8:07 AM.

Details

Summary

Fix T74218
BSD find [1] is different from Linux find [2]
-printf is not available in the former. So -print is used.
I also tried -exec but couldn't get over white spaces in a test
directory. Also, as mentioned in my earlier comment:
https://developer.blender.org/T74218#908107
making an array of directories was necessary because chaining many -exec
commands was not feasible.

Also, invoking a shell using sh -c wasn't worth the complexity, so I fixed the
SVN_DIRS_ALL itself.

  1. The error in -printf '%h\n. This option in 'find' command is NOT available on Darwin. There are two occurrences in this file.

This is fixed by using -print & then iterating over the array.

  1. export LANG="en_US.UTF8 should be export LANG="en_US.UTF-8",

This was already fixed in rBM6308.

  1. svn: Skipping argument: E200025: 'locale//vi/.svn' ends in a reserved name

This is fixed by using /../ since /a/.svn is not a working directory,
but /a/ is. Also, extra / in locale/ is removed.

  1. Last, and the most severed is the creation of locale/locale/<lang_code> directory and files. This is wrong. (locale) is repeated twice.

This needs to be fixed & is not is in this patch.

Also see P1335 for corresponding logs.

[1]: https://www.unix.com/man-page/mojave/1/find/
[2]: https://linux.die.net/man/1/find

Diff Detail

Repository
rBM Blender Manual

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Apr 12 2020, 8:07 AM
Ankit Meel (ankitm) created this revision.
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)
Ankit Meel (ankitm) changed the repository for this revision from rBMT Blender Manual Translations to rBM Blender Manual.

Removed more printf, added more /../

Ankit Meel (ankitm) edited the summary of this revision. (Show Details)Apr 12 2020, 8:15 AM
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)Apr 12 2020, 8:57 AM

Looks good, I was looking at your log and was seeing some strange results of nested local directories.

Not Changed: manual/../locale/locale/vi/LC_MESSAGES/sculpt_paint/weight_paint/index.po
Not Changed: manual/../locale/locale/locale/LC_MESSAGES/sculpt_paint/weight_paint/tools.po

I assume this is just a miss configuration or from testing?

I didn't look into that. So 1/4th part of T74218 still remains open.

Last, and the most severed is the creation of locale/locale/<lang_code> directory and files. This is wrong. (locale) is repeated twice.

I'm afraid someone else would have to fix it.

Ankit Meel (ankitm) edited the summary of this revision. (Show Details)Apr 16 2020, 7:29 AM
This revision is now accepted and ready to land.May 6 2020, 4:28 AM

@Ankit Meel (ankitm) I added you to the documentation project so you can commit this.

Campbell Barton (campbellbarton) requested changes to this revision.EditedMay 8 2020, 6:12 AM

Tested this and this is causing the script to remove many files:

eg: svn rm --force locale/locale/es/LC_MESSAGES/sculpt_paint/sculpting/tools/clay_thumb.po

I get many lines like this after running the script, before & after make update_po on Linux:



  • Changing the IFS seems fine.
  • It seems like it should be possible to keep this script working on macOS without changing directories.

Note, it might be best to rewrite this utility in Python, as changes in behavior between each OS is hard to manage, which would also allow this to run on Windows.

This revision now requires changes to proceed.May 8 2020, 6:12 AM

I have a WIP for a python version in the repository

Rewrote this script in Python for better portability: rBM6631: update_po: rewrite as a Python script