Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Train needs more robust stat functionality on Linux #686

Open
tas50 opened this issue May 11, 2021 · 0 comments
Open

Train needs more robust stat functionality on Linux #686

tas50 opened this issue May 11, 2021 · 0 comments

Comments

@tas50
Copy link
Contributor

tas50 commented May 11, 2021

The current implementation of Stat functionality for Linux in Train is not robust enough to hand new / unknown linux variants.

There is logic at this line to determine if we should use --printf or -c when running the command:

format = (backend.os.esx? || backend.os[:name] == "alpine" || backend.os[:name] == "yocto") ? "-c" : "--printf"

This relies on a hard coded list of distros that need -c, which does not work when we encounter a new distro. It's made worse since the failures that occur here are not clear and you'd have to spend the time digging into train to fully understand where the stat command is failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant