[elbe-devel] [PATCH 10/10] elbeproject: add some rmtree "finetuning" to the debootstrapped host sysroot

Manuel Traut manut at linutronix.de
Wed Apr 10 10:56:24 CEST 2019


On 15:42 Mon 08 Apr     , Torben Hohn wrote:
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

Acked-by: Manuel Traut <manut at linutronix.de>

maybe it would make since to have the list of directory removals
at some arch generic place like xmldefaults.py?? But i'm not sure.

However i would prefer

rdirs = [ '/boot', '/dev', ..]
for r in rdirs:
	self.host_sysrootenv.rfs.rmtree(r)


> ---
>  elbepack/elbeproject.py | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index 40977e8b..f88b8a60 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -336,6 +336,24 @@ class ElbeProject (object):
>                  self.log.printo("commiting changes failed: %s" % str(e))
>                  raise AptCacheCommitError(str(e))
>  
> +        # This is just a sysroot, some directories
> +        # need to be removed.
> +        #
> +        # This can move into finetuning in the
> +        # second implementation step.
> +        self.host_sysrootenv.rfs.rmtree('/boot')
> +        self.host_sysrootenv.rfs.rmtree('/dev')
> +        self.host_sysrootenv.rfs.rmtree('/etc')
> +        self.host_sysrootenv.rfs.rmtree('/home')
> +        self.host_sysrootenv.rfs.rmtree('/media')
> +        self.host_sysrootenv.rfs.rmtree('/mnt')
> +        self.host_sysrootenv.rfs.rmtree('/proc')
> +        self.host_sysrootenv.rfs.rmtree('/root')
> +        self.host_sysrootenv.rfs.rmtree('/run')
> +        self.host_sysrootenv.rfs.rmtree('/sys')
> +        self.host_sysrootenv.rfs.rmtree('/tmp')
> +        self.host_sysrootenv.rfs.rmtree('/var')
> +
>      def build_sdk(self):
>          triplet = self.xml.defs["triplet"]
>  
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel



More information about the elbe-devel mailing list