[elbe-devel] [PATCH] pbuilder-profiles: add nocheck and nodoc to DEB_BUILD_OPTIONS

Christian Teklenborg chris at linutronix.de
Tue Jul 7 16:31:55 CEST 2020


Setting the --profile nocheck and nodoc is not sufficient. The build must also
set the environment variable DEB_BUILD_OPTIONS to nocheck/nodoc.

This patch fixes the issue #232.

Signed-off-by: Christian Teklenborg <chris at linutronix.de>
---
 elbepack/elbeproject.py | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 72594283..2d4c7d3b 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -768,14 +768,27 @@ class ElbeProject (object):
             # cpuset == -1 means empty cpuset_cmd
             cpuset_cmd = ''
 
+        profile_list = profile.split(",")
+        deb_build_options = "DEB_BUILD_OPTIONS='"
+
+        if "nodoc" in profile_list:
+            deb_build_options += "nodoc "
+        if "nocheck" in profile_list:
+            deb_build_options += "nocheck"
+        deb_build_options += "'"
+
+        if not "nodoc" in profile_list:
+            if not "nocheck" in profile_list:
+                deb_build_options=""
+
         try:
             if cross:
                 do('cd "%s"; dpkg-source -b .; %s '
-                   'pbuilder build --host-arch %s --configfile "%s" '
+                   '%s pbuilder build --host-arch %s --configfile "%s" '
                    '--basetgz "%s" --buildresult "%s" '
                    '../*.dsc' % (
                        os.path.join(self.builddir, "pdebuilder", "current"),
-                       cpuset_cmd, self.arch,
+                       deb_build_options, cpuset_cmd, self.arch,
                        os.path.join(self.builddir, "cross_pbuilderrc"),
                        os.path.join(self.builddir, "pbuilder_cross", "base.tgz"),
                        os.path.join(self.builddir, "pbuilder_cross", "result")),
@@ -785,11 +798,11 @@ class ElbeProject (object):
                                                "result",
                                                "*.changes"))
             else:
-                do('cd "%s"; %s pdebuild --debbuildopts "-j%s -sa" '
+                do('cd "%s"; %s %s pdebuild --debbuildopts "-j%s -sa" '
                    '--configfile "%s" '
                    '--use-pdebuild-internal --buildresult "%s"' % (
                        os.path.join(self.builddir, "pdebuilder", "current"),
-                       cpuset_cmd,
+                       deb_build_options, cpuset_cmd,
                        cfg['pbuilder_jobs'],
                        os.path.join(self.builddir, "pbuilderrc"),
                        os.path.join(self.builddir, "pbuilder", "result")),
-- 
2.20.1



More information about the elbe-devel mailing list