[Buildroot] [PATCH buildroot-test] scripts/autobuild-run: properly delete output dir even with write-protected folders

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat Aug 8 21:18:23 UTC 2020


Hello,

On Sun, 19 Jul 2020 14:15:24 +0200
"Yann E. MORIN" <yann.morin.1998 at free.fr> wrote:

> We might need to be a little bit more careful, though:
> 
>     def rm_ro(f, p, _):
>         os.chmod(os.path.dirname(p), stat.S_IWRITE)
>         os.chmod(p, stat.S_IWRITE)

Thanks for the suggestion! This didn't work as is, since os.chmod()
sets the permissions, it does not *add* to the existing permissions. So
doing os.chmod(foo, stat.S_IWRITE) makes the "foo" directory only
writable, no longer readable/executable.

So I fixed that, and just sent a v2.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list