[elbe-devel] [PATCH 3/3] pbuilder: use env instead of param to set profile
Manuel Traut
manut at linutronix.de
Tue Feb 19 19:08:44 CET 2019
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>
---
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
More information about the elbe-devel
mailing list