-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
When chisel is called by a bash instance and installs bash_bins into --root /, it will encounter an ETXTBSY error: error: cannot extract from package "bash": open /usr/bin/bash: text file busy. This is because Chisel tries to open the running /usr/bin/bash file, which triggers this error.
We want Chisel to be able to handle such cases, just like how dpkg is handling rewriting the /usr/bin/bash binary file by writing to a temporary file, and move this temporary file to overwrite the previous one, such that we can safely overwrite the running binary files.
References:
- https://github.com/guillemj/dpkg/blob/0fa25abf11871c75de58e14743810609518e647e/src/main/unpack.c#L1471
- Log from
inotifywaitondpkg -i bash:
/proc/942119/root/usr/bin/ MOVED_FROM bash.dpkg-new
/proc/942119/root/usr/bin/ MOVED_TO bash
Metadata
Metadata
Assignees
Labels
No labels