[elbe-devel] [PATCH] build_sysroot: build sysroot in seperate buildenv

John Ogness john.ogness at linutronix.de
Fri Jul 20 16:45:12 CEST 2018


On 2018-07-20, John Ogness <john.ogness at linutronix.de> wrote:
>>> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
>>> index be23410d..6a8090ff 100644
>>> --- a/elbepack/elbeproject.py
>>> +++ b/elbepack/elbeproject.py
>>> @@ -191,6 +192,12 @@ class ElbeProject (object):
>>>          else:
>>>              self.targetfs = None
>>>  
>>> +        # dont create sysroot instance, it should be build from scratch
>>> +        # each time, because the pkglist including the -dev packages is
>>> +        # tracked nowhere.
>>> +        self.sysrootenv = None
>
> We probably want to make sure there is no sysroot laying around.
>
>             self.log.do('rm -rf %s; mkdir "%s"' % (self.sysrootpath,
>                                                    self.sysrootpath))

Sorry. Obviously it should not recreate an empty directory.

              self.log.do('rm -rf %s' % self.sysrootpath)

>
> This code already exists in build_sysroot, but that is maybe too
> late. Consider the following:
>
> set_xml
> build
> build_sysroot
> set_xml
> build
> build_cdroms (introduced in a later patch)
>
> With that sequence of commands, the packages from the sysroot-env will
> be used instead of those from the build-env. And since the 2nd xml could
> be totally different, a totally incorrect cdroms will be generated.
>
> You should probably add this code to set_xml as well since it is very
> similar:
>
>             self.sysrootenv = None
>             self.log.do('rm -rf %s; mkdir "%s"' % (self.sysrootpath,
>                                                    self.sysrootpath))

And here as well.

              self.log.do('rm -rf %s' % self.sysrootpath)



More information about the elbe-devel mailing list