From: ngotogenome@... Date: 2016-06-08T11:40:48+00:00 Subject: [ruby-dev:49654] [Ruby trunk Bug#12471] make update-mspec always fails on Solaris Issue #12471 has been reported by Naohisa Goto. ---------------------------------------- Bug #12471: make update-mspec always fails on Solaris https://bugs.ruby-lang.org/issues/12471 * Author: Naohisa Goto * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- r55303 以降、Solaris 10 にて make update-rubyspec すると、以下のエラーが常に発生します。 ~~~ make update-rubyspec V=1 make: *** [update-mspec] Error 1 ~~~ r55303 の変更で、以下のように if で直接 cd するように変更されましたが、 ~~~ update-mspec: @$(CHDIR) $(srcdir); \ - if [ -d spec/mspec ]; then \ + if cd spec/mspec 2> $(NULL); then \ echo updating mspec ...; \ ~~~ Solaris の /bin/sh では、if で cd を使うと、cd できなかった場合は else 以下は実行されず、それどころか if の後の文さえ実行されず、cd 失敗時に即座に実行終了してしまうことが判明しました。以下は実行例です。 ~~~ Solaris$ /bin/sh -c "if cd /does_not_exist; then echo YES; else echo NO; fi; echo END" /bin/sh: /does_not_exist: does not exist Solaris$ ~~~ Linuxでは、想定通りに実行されます。 ~~~ Linux$ /bin/sh -c "if cd /does_not_exist; then echo YES; else echo NO; fi; echo END" /bin/sh: 1: cd: can't cd to /does_not_exist NO END Linux$ ~~~ 存在するディレクトリの場合は、大丈夫なようです。 ~~~ Solaris$ /bin/sh -c "if cd /tmp; then echo YES; else echo NO; fi; echo END" YES END Solaris$ ~~~ このため、r55303 はrevertしたいと思います。 -- https://bugs.ruby-lang.org/