[elbe-devel] [PATCH v2 3/3] elbepack: elbeproject.py: build sources with pbuilder

Bastian Germann bage at linutronix.de
Thu Sep 15 12:49:09 CEST 2022


Am 15.09.22 um 12:40 schrieb viraj:
> 
> 
> On 8/30/22 02:28, Bastian Germann wrote:
>> Am 01.08.22 um 16:32 schrieb Viraj Shah:
>>> * Changing directory to pbuilder path and doing "apt-get source" results
>>>     in using the mirrors from the initvm and not from the target mirrors.
>>> * Use chroot instead. Build env, and use chroot to use the target mirror
>>>     configured in xml file.
>>> * Add dependency of dpkg-dev that would be used in later step for
>>>     apt-get  source.
>>> * Once the package source is downloaded in chroot, move it to the
>>>     pbuilder enviornment where the source package should belong. And
>>
>> Typo: environment
>>
>>>     remove the unnecessary files later.
>>>
>>> Signed-off-by: Viraj Shah <viraj.shah at linutronix.de>
>>
>> Again, the subject does not describe the changes.
>>
>>> ---
>>>    elbepack/elbeproject.py | 12 ++++++++++--
>>>    1 file changed, 10 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
>>> index aec56f0a8..59ea55a4f 100644
>>> --- a/elbepack/elbeproject.py
>>> +++ b/elbepack/elbeproject.py
>>> @@ -417,7 +417,7 @@ class ElbeProject:
>>>            do("cd %s; chmod +x %s" % (self.builddir, n))
>>>            do("cd %s; rm sdk.txz" % self.builddir)
>>>    -    def pbuild(self, p):
>>> +    def pbuild(self, p, build_bin=True, build_sources=True):
>>
>> I do not see build_bin being used. Why add it here?
>> You have not switched the caller to hand over build_sources.
>>
>>>            self.pdebuild_init()
>>>            src_path = os.path.join(self.builddir, "pdebuilder",
>>> "current")
>>>    @@ -439,7 +439,15 @@ class ElbeProject:
>>>                apt_args = '--yes -q --download-only'
>>>                if self.xml.prj.has('noauth'):
>>>                    apt_args += ' --allow-unauthenticated'
>>> -            do('cd "%s";apt-get source %s "%s"' % (pdb_path,
>>> apt_args, src_uri))
>>> +            do('mkdir -p "%s"' % self.chrootpath)
>>> +            self.buildenv = BuildEnv(self.xml, self.chrootpath,
>>> +                                     build_sources=build_sources,
>>> clean=True)
>>> +            cmd = ('/bin/apt-get update;/bin/apt-get install -y
>>> dpkg-dev')
>>
>> Why do you install dpkg-dev here? apt-get is in package apt and should
>> already be installed.
>> Please use the path /usr/bin/apt-get.
> In this case, the target rfs should be buster. Like you mentioned I also
> checked oldstable (1.8.2.3) version does have dependency of dpkg-dev
> listed in apt.
> So, I am out of ideas, why it is not installed with apt.

Please answer the question first why you would want to install dpkg-dev here.
Without this, the apt-get call is void.

> 
>>
>>> +            chroot(self.chrootpath, cmd)
>>> +            cmd = ('/bin/apt-get source %s "%s"'% (apt_args, src_uri))
>>> +            chroot(self.chrootpath, cmd)
>>> +            do('mv "%s"/%s* "%s"' % (self.chrootpath, src_uri,
>>> pdb_path))
>>> +            do('rm -rf "%s"' % (self.chrootpath))
>>>                  do('dpkg-source -x %s/*.dsc "%s"' % (pdb_path,
>>> src_path))
>>>            else:
>>
>> I have integrated the previous two patches so that you can only send
>> this one in v3.
>> _______________________________________________
> 
> _______________________________________________
> 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