[bitbake-devel] [PATCH 1/1] lib/bb/utils: add safeguard against recursively deleting things we shouldn't
Paul Eggleton
paul.eggleton at linux.intel.com
Mon Apr 20 13:59:28 UTC 2015
On Monday 20 April 2015 09:46:19 Trevor Woerner wrote:
> On 15-04-17 10:26 AM, Paul Eggleton wrote:
> > Add some very basic safeguard against recursively deleting paths such
> > as / and /home in the event of bugs or user mistakes.
>
> I liked Nicolas Dechesne's idea of only allowing deletion in paths that
> include TMPDIR or TOPDIR. Is there any reason bitbake would need to
> delete (potentially dangerous) paths anywhere else?
Unfortunately this would be problematic for people who decide to split out
directories managed by the build system to different paths (which they often do
when part of the system has to be shared over NFS, or to put part of TMPDIR on
a larger disk, or spread between SSDs and rotational media, etc.). Another
issue is that the functions in question don't actually have access to d (the
datastore) and thus can't actually get the value of these variables, at least
with the way the code is currently structured.
> With a list-based approach the list will keep growing indefinitely.
> Inevitably an ex-Solaris person will come along (for example) and have
> their /home directories in /export/home and need a patch for that, etc,
> etc...
It's not all-encompassing, I agree. I'm all for improving it but unfortunately
restricting to TMPDIR/TOPDIR will break for a lot of users.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the bitbake-devel
mailing list