Without `time` package from `extra` repo standard-compliant `time -p foo bar` doesn't work in `sh` or `sh --posix`.
Unfortunately I couldn't find discussion if any, as `time` is so common keyword.
The POSIX standard doesnt/didn't require that `time` be a separate installed package. Time is a bash shell built in, and the bash built-in version meets the POSIX standard. How does `time -p foo bar` not work?
The POSIX standard requires `sh` utility to be present and requires `sh -c "time -p ls"` to work. In Archlinux this doesn't work in the base system as it only works if `time` package outside of `base` group is installed . It is irrelevant whether it works in bash or not.
So adding `time` package to `base` group will improve POSIX compliance as more standard-compliant scripts will run.
So I have 3 questions:
1) Is compliance to IEEE Std 1003.1 among design goals of `base` package group?
2) Is it a bug that sh -c "time ls" fails to run `time` builtin utility and looks for an executable instead?
3) If answer to (1) is "yes" and answer to (2) is "no" is it a bug that `time` is not in `base`?
The POSIX standard requires ... `sh -c "time -p ls"` to work.
Where is this requirement? It's not in the link you posted.
`time -p ls` I think is not required to work as `ls` may be built-in. But it's only an example - feel free to replace it with an executable of your choice.
Last edited by nponeccop (2013-02-26 12:56:17)
I don't even see it in e.g. opensuse at all. And I've never heard of any software that requires it.
feel free to replace it with an executable of your choice.
No, *you* come up with a decent example of something worth caring about
"Arch is what you make it". If you want your system to conform to some outdated standard, you can by installing the needed packages. It is not a very strong consideration in Arch development...