Project

General

Profile

Actions

Bug #12471

closed

make update-mspec always fails on Solaris

Added by ngoto (Naohisa Goto) almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:49654]

Description

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したいと思います。


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #13433: Solaris10上で make update-rubyspec が失敗ClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0