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

Add check for ZOPEN_ROOTFS before refreshing zopen #35

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

IgorTodorovskiIBM
Copy link
Collaborator

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.

@IgorTodorovskiIBM
Copy link
Collaborator Author

/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
Copy link
Collaborator

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?

Copy link
Collaborator

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

Copy link
Collaborator Author

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

@IgorTodorovskiIBM
Copy link
Collaborator Author

Depends on zopencommunity/meta#602

Copy link
Collaborator

@MikeFultonDev MikeFultonDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@IgorTodorovskiIBM IgorTodorovskiIBM merged commit 6e25541 into main Nov 29, 2023
1 check passed
@IgorTodorovskiIBM IgorTodorovskiIBM deleted the add_check_for_setup branch November 29, 2023 13:06
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

Successfully merging this pull request may close these issues.

2 participants