)]}'
{"diskimage_builder/elements/zypper-minimal/post-install.d/01-locale-cleanup":[{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"796d69c59becd928b5e66a7645d228b721d5c59a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"set -eu"},{"line_number":21,"context_line":"set -o pipefail"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"function baseStripAndKeep {"},{"line_number":24,"context_line":"    # /.../"},{"line_number":25,"context_line":"    # helper function for strip* functions"},{"line_number":26,"context_line":"    # read stdin lines of files to check for removing"},{"line_number":27,"context_line":"    # - params - files which should be keep"},{"line_number":28,"context_line":"    # ----"},{"line_number":29,"context_line":"    local keepFiles\u003d\"$@\""},{"line_number":30,"context_line":"    local found"},{"line_number":31,"context_line":"    while read file; do"},{"line_number":32,"context_line":"        local baseFile\u003d$(/usr/bin/basename $file)"},{"line_number":33,"context_line":"        found\u003d0"},{"line_number":34,"context_line":"        for keep in $keepFiles;do"},{"line_number":35,"context_line":"            if echo $baseFile | grep -q $keep; then"},{"line_number":36,"context_line":"                found\u003d1"},{"line_number":37,"context_line":"                break"},{"line_number":38,"context_line":"            fi"},{"line_number":39,"context_line":"        done"},{"line_number":40,"context_line":"        if [ \"$found\" \u003d 0 ]; then"},{"line_number":41,"context_line":"            rm -rf \"$file\""},{"line_number":42,"context_line":"        fi"},{"line_number":43,"context_line":"    done"},{"line_number":44,"context_line":"}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"find /usr/lib/locale -mindepth 1 -maxdepth 1 -type d 2\u003e/dev/null | \\"},{"line_number":47,"context_line":"    baseStripAndKeep C.utf8 en_US en_US.utf8"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"3f1d235d_cc166156","line":47,"range":{"start_line":23,"start_character":0,"end_line":47,"end_character":44},"updated":"2017-07-12 07:08:33.000000000","message":"I personally still don\u0027t understand the reason for making the removal of locales so complex and why a simple find+exec would not work as suggested in previous comment.","commit_id":"e9036626765bf0434287b861ff97fa3c208757a8"},{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"332d3a3ee9d05a8ea12e6fdf8fca646cb78ed4b4","unresolved":false,"context_lines":[{"line_number":21,"context_line":"set -eu"},{"line_number":22,"context_line":"set -o pipefail"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"find /usr/lib/locale -mindepth 1 -maxdepth 1 -type d 2\u003e/dev/null | \\"},{"line_number":25,"context_line":"    grep -Ev \u0027(C.utf8|en_US|en_US.utf8)\u0027 | xargs rm -rf"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"1f1a1f67_c4bf87ce","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":55},"updated":"2017-07-13 20:53:32.000000000","message":"An alternative with less pipes could also be\n\nfind /usr/lib/locale -mindepth 1 -maxdepth 1 -type d ! -name en_US -a ! -name en_US.utf8 -a ! -name C.utf8 -exec rm -r \"{}\" \\;\n\nbut I don\u0027t personally mind\n\nEither way is fine with me :)","commit_id":"7f080565879322c3dbed91971aae7bf2ac75fdd4"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"5700919b54fcda9f0c34e2bc76fb06ac2d421897","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1f1a1f67_f79c38c1","line":13,"updated":"2017-07-17 00:36:57.000000000","message":"doesn\u0027t appear locale-archive is used\n\n open(\"/usr/lib/locale/locale-archive\", O_RDONLY|O_CLOEXEC) \u003d -1 ENOENT (No such file or directory)\n\nso that seems ok.\n\nThis seems to leave behind *one* extra locale, that doesn\u0027t seem to be a directory?\n\nopensuse-422-citycloud-sto2-9867158:/usr/lib/locale # find /usr/lib/locale -mindepth 1 -maxdepth 1 -type d 2\u003e/dev/null |     grep -Ev \u0027(C.utf8|en_US|en_US.utf8)\u0027 | xargs rm -rf\n\nopensuse-422-citycloud-sto2-9867158:/usr/lib/locale # ls -l\ntotal 20\ndrwxr-xr-x 3 root root 4096 Jul 17 00:31 C.utf8\ndrwxr-xr-x 3 root root 4096 Jul 17 00:31 en_US\ndrwxr-xr-x 3 root root 4096 Jul 17 00:31 en_US.iso885915\ndrwxr-xr-x 3 root root 4096 Jul 17 00:31 en_US.utf8\ndrwxr-xr-x 3 root root 4096 Jul 17 00:31 es_EC.utf8\n\n(es_EC.utf8); i\u0027m not worried about one file, but if it represents some issue with the logic ...","commit_id":"656bf48d52f6c2c5ca0863148b607d1d548c72a1"}],"diskimage_builder/elements/zypper-minimal/pre-install.d/01-locale-cleanup":[{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"6c3818a03c59ef3be55d8ffeb850e72dde042082","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            fi"},{"line_number":39,"context_line":"        done"},{"line_number":40,"context_line":"        if [ \"$found\" \u003d 0 ]; then"},{"line_number":41,"context_line":"             Rm -rf \"$file\""},{"line_number":42,"context_line":"        fi"},{"line_number":43,"context_line":"    done"},{"line_number":44,"context_line":"}"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"3f1d235d_773314ac","line":41,"range":{"start_line":41,"start_character":13,"end_line":41,"end_character":14},"updated":"2017-07-07 07:05:06.000000000","message":"capital R?","commit_id":"77bde33caeabe13bbd818c31a5ba9ca373a09285"},{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"6c3818a03c59ef3be55d8ffeb850e72dde042082","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    done"},{"line_number":44,"context_line":"}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"find /usr/lib/locale -mindepth 1 -maxdepth 1 -type d 2\u003e/dev/null | \\"},{"line_number":47,"context_line":"    baseStripAndKeep en_US en_US.utf8"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"3f1d235d_d7c78863","line":47,"range":{"start_line":46,"start_character":0,"end_line":47,"end_character":37},"updated":"2017-07-07 07:05:06.000000000","message":"I think this might be more complicated than necessary. Maybe we could just get away with inverted matching rules like this?\n\nfind /usr/lib/locale -mindepth 1 -maxdepth 1 -type d ! -name en_US -a ! -name en_US.utf8 -exec rm -r \"{}\" \\;","commit_id":"77bde33caeabe13bbd818c31a5ba9ca373a09285"}]}
