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

base: lmp: sota_var_cleanup: use the ostree_rmdir_helper #1148

Merged
merged 1 commit into from
May 18, 2023

Conversation

quaresmajose
Copy link
Member

@quaresmajose quaresmajose commented May 17, 2023

It will help removing directories with content inside without failing.

@quaresmajose quaresmajose requested a review from a team May 17, 2023 10:51
@quaresmajose quaresmajose force-pushed the ostree_rmdir_helper branch from 6585b4a to 5c861ed Compare May 17, 2023 12:58
@MrCry0 MrCry0 self-requested a review May 18, 2023 09:27
It will help removing directories with content inside without failing.

Signed-off-by: Jose Quaresma <[email protected]>
@quaresmajose quaresmajose force-pushed the ostree_rmdir_helper branch from 5c861ed to 15c3a08 Compare May 18, 2023 09:46
ostree_rmdir_helper local
ostree_rmdir_helper lib/misc
ostree_rmdir_helper volatile
ostree_rmdir_helper ${@'' if oe.types.boolean('${VOLATILE_LOG_DIR}') else 'log'}
Copy link
Member

Choose a reason for hiding this comment

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

This will call helper with empty inputs when VOLATILE_LOG_DIR is not set, we should probably have an if here instead to avoid surprises later on.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have tested it explicit call one only with just ostree_rmdir_helper and it works with an empty arg, because it check if the arg is a directory and not a link before removing and when the arg is empty the functions does nothing.

@ricardosalveti ricardosalveti merged commit 4641c4c into foundriesio:main May 18, 2023
@quaresmajose quaresmajose deleted the ostree_rmdir_helper branch May 23, 2023 05:40
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.

3 participants