-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add check for ZOPEN_ROOTFS before refreshing zopen #35
Conversation
/run tests |
@@ -138,7 +138,9 @@ zopen_install() | |||
|
|||
zopen_append_to_setup() { | |||
cat <<ZZ | |||
\$PWD/bin/zopen init --refresh | |||
if [ -n "\$ZOPEN_ROOTFS" ] && [ -d "\$ZOPEN_ROOTFS" ]; then | |||
\$PWD/bin/zopen init --refresh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to verify that $PWD/bin/zopen is executable first in case we move stuff around in the future and break this layout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are probably other places we have this assumption so ok if we don't do this one - but seems a bit dangerous without a check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, curl, git, and a few others :) Although we have checks in place for the return code there: https://github.com/ZOSOpenTools/gitport/blob/main/buildenv#L109
Depends on zopencommunity/meta#602 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
To address the situation when someone downloads metaport and initializes a new filesystem with
zopen init
. We don't want to be refreshing something that does not exist.