-
Notifications
You must be signed in to change notification settings - Fork 112
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
Temporary images cause tmppath to remain #237
Comments
I cannot reproduce this here. genimage should delete the content of .../tmp at the end. What's the output of the first genimage run? It should end with something like this:
|
Here's the full output from a more minimal project:
|
michaelolbrich
added a commit
to michaelolbrich/genimage
that referenced
this issue
Feb 23, 2024
Right now cleanup is partially broken: If the tmppath exists, then its content is removed at the end as expected. However, if the tmppath is missing then it is created but nothing is removed. Change this to remove the directory including its content at the end when the directory was created but stick to removing just the content if the directory existed before genimage was called. Fixes: pengutronix#237 Signed-off-by: Michael Olbrich <[email protected]>
Ah, in my test, tmppath already existed and in that case, the content was removed as expected. Try #239, that should fix this. |
Yep, that works! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given this config:
...if I run
genimage --config usb.cfg
then the following files are generated:If I then try to run
genimage
a second time, I get this output:I can understand the competing goals to (a) leave temporary artefacts around for debugging after running, but also (b) not delete stuff that might be important by default at startup. But it makes it annoying to integrate with other tools if there's this extra cleanup logic that's only needed sometimes. So if it is deliberate and not just an oversight, I'd suggest a flag to control this eg.
--cleanup
or its opposite--leave-tmp
, or something like that.The text was updated successfully, but these errors were encountered: