[elbe-devel] [PATCH 3/3] pbuilder: use env instead of param to set profile

Torben Hohn torben.hohn at linutronix.de
Fri Mar 1 13:43:16 CET 2019


On Tue, Feb 19, 2019 at 07:08:44PM +0100, Manuel Traut wrote:
> Build dependencies are resolved by pbuilder. But if pbuilder just
> passes the profile information to e.g. dpkg-buildpackage it pulls the
> dependencies for the default profile.
> 
> To avoid this use an environment parameter to set the profile.
> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/elbeproject.py | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index cef53296..69f93df6 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -640,13 +640,8 @@ class ElbeProject (object):
>              # cpuset == -1 means empty cpuset_cmd
>              cpuset_cmd = ''
>  
> -        if profile:
> -            profile_opt = ' -P%s' % profile
> -        else:
> -            profile_opt = ''
> -
>          try:
> -            self.log.do('cd "%s"; %s pdebuild --debbuildopts "-j%s -sa%s" '
> +            self.log.do('cd "%s"; %s pdebuild --debbuildopts "-j%s -sa" '
>                          '--configfile "%s" '
>                          '--use-pdebuild-internal --buildresult "%s"' % (
>                              os.path.join(self.builddir,
> @@ -654,9 +649,9 @@ class ElbeProject (object):
>                                           "current"),
>                              cpuset_cmd,
>                              cfg['pbuilder_jobs'],
> -                            profile_opt,
>                              os.path.join(self.builddir, "pbuilderrc"),
> -                            os.path.join(self.builddir, "pbuilder", "result")))
> +                            os.path.join(self.builddir, "pbuilder", "result")),
> +                        env_add={'DEB_BUILD_PROFILES': profile})
>  
>              self.repo.remove(os.path.join(self.builddir,
>                                            "pdebuilder",
> -- 
> 2.20.1
> 

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20190301/d1bc655c/attachment.sig>


More information about the elbe-devel mailing list