public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: isar-users@googlegroups.com
Cc: Frank Lenormand <lenormf@gmail.com>,
	Henning Schild <henning.schild@siemens.com>
Subject: [PATCH] build.sh: Yet another fix for the installation of build deps
Date: Wed,  3 Jan 2018 18:59:48 +0100	[thread overview]
Message-ID: <20180103175948.26103-1-henning.schild@siemens.com> (raw)

The perl code guessing the build-deps of packages can not handle all the
possible syntax that could be found in Build-Depends. And it ignores
Build-Depends-Indep. So there are several issues in it.

This patch uses an official debian-tool "mk-build-deb" to install the build
deps. The tool generates a package which which will Depends: on the
Build-Depends:. Architecture operators, -Indep etc. are handled
correctly.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/recipes-devtools/buildchroot/buildchroot.bb | 3 ++-
 meta/recipes-devtools/buildchroot/files/build.sh | 9 ++-------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
index 59ad0e0..581cb9a 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
@@ -25,7 +25,8 @@ BUILDCHROOT_PREINSTALL ?= "gcc \
                            locales \
                            docbook-to-man \
                            apt \
-                           automake"
+                           automake \
+                           devscripts"
 
 WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
 
diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
index 5e310ad..975252e 100644
--- a/meta/recipes-devtools/buildchroot/files/build.sh
+++ b/meta/recipes-devtools/buildchroot/files/build.sh
@@ -6,13 +6,8 @@
 # Go to build directory
 cd $1
 
-# Get list of dependencies manually. The package is not in apt, so no apt-get
-# build-dep. dpkg-checkbuilddeps output contains version information and isn't
-# directly suitable for apt-get install.
-DEPS=`perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)|\[[^]]+\]//mg; print if $p' < debian/control`
-
-# Install deps
-apt-get install -y $DEPS
+# Install all build deps
+mk-build-deps -i -r debian/control
 
 # If autotools files have been created, update their timestamp to
 # prevent them from being regenerated
-- 
2.13.6


             reply	other threads:[~2018-01-03 17:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03 17:59 Henning Schild [this message]
2018-01-03 18:04 ` Henning Schild
2018-01-04  9:44 ` [PATCHv2] build.sh: yet " Henning Schild
2018-01-04  9:46   ` Henning Schild
2018-01-11 11:38   ` Alexander Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180103175948.26103-1-henning.schild@siemens.com \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=lenormf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox