public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 5/5] class/dpkg: Unify workplace for packages
Date: Mon, 11 Sep 2017 18:47:55 +0200	[thread overview]
Message-ID: <20170911184755.45159d91@md1em3qc> (raw)
In-Reply-To: <20170908155606.7654-6-asmirnov@ilbers.de>

Am Fri, 8 Sep 2017 18:56:06 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> Get rid of splitting package's data between WORKDIR and BUILDCHROOT.
> Now everything is stored into WORKDIR, and BUILDCHROOT is used for
> compilation only.
> 
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
>  meta/classes/dpkg.bbclass | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 360a95c..f1a29aa 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -3,12 +3,11 @@
>  
>  # Add dependency from buildchroot creation
>  DEPENDS += "buildchroot"
> -do_unpack[deptask] = "do_build"
> +do_build[deptask] = "do_build"
>  
>  # Each package should have its own unique build folder, so use
>  # recipe name as identifier
>  PP = "/home/builder/${PN}"
> -BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
>  
>  do_fetch[dirs] = "${DL_DIR}"
>  
> @@ -27,9 +26,8 @@ python do_fetch() {
>  
>  addtask fetch before do_unpack
>  
> -do_unpack[dirs] = "${BUILDROOT}"
> +do_unpack[dirs] = "${WORKDIR}"
>  do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> -S ?= "${BUILDROOT}"
>  
>  # Unpack package and put it into working directory in buildchroot
>  python do_unpack() {
> @@ -37,7 +35,7 @@ python do_unpack() {
>      if len(src_uri) == 0:
>          return
>  
> -    rootdir = d.getVar('BUILDROOT', True)
> +    rootdir = d.getVar('WORKDIR', True)

This change is in conflict with the comment, please fix the comment of
do_unpack.

Henning

>      try:
>          fetcher = bb.fetch2.Fetch(src_uri, d)
> @@ -48,17 +46,22 @@ python do_unpack() {
>  
>  addtask unpack after do_fetch before do_build
>  
> +BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
>  do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>  
>  # Build package from sources using build script
>  do_build() {
> +    mkdir -p ${BUILDROOT}
> +    sudo mount --bind ${WORKDIR} ${BUILDROOT}
>      sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
> +    sudo umount ${BUILDROOT}
> +    rm -rf ${BUILDROOT}
>  }
>  
>  
>  # Install package to dedicated deploy directory
>  do_install() {
> -    install -m 644 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
> +    install -m 644 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
>  }
>  
>  addtask install after do_build


  reply	other threads:[~2017-09-11 16:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 15:56 [PATCH v2 0/5] Unify work space " Alexander Smirnov
2017-09-08 15:56 ` [PATCH v2 1/5] image: Unify path to image rootfs Alexander Smirnov
2017-09-08 16:00   ` Henning Schild
2017-09-08 15:56 ` [PATCH v2 2/5] isar: Change build folders tree Alexander Smirnov
2017-09-08 16:04   ` Henning Schild
2017-09-08 15:56 ` [PATCH v2 3/5] stamps: Name stamps canonicaly and unified Alexander Smirnov
2017-09-08 15:56 ` [PATCH v2 4/5] image: Name image " Alexander Smirnov
2017-09-08 15:56 ` [PATCH v2 5/5] class/dpkg: Unify workplace for packages Alexander Smirnov
2017-09-11 16:47   ` Henning Schild [this message]
2017-09-11 18:10     ` Alexander Smirnov
2017-09-08 16:06 ` [PATCH v2 0/5] Unify work space " Henning Schild
2017-09-08 16:10   ` Alexander Smirnov
2017-09-08 16:12     ` Alexander Smirnov
2017-09-08 16:15     ` Henning Schild
2017-09-11  7:36       ` Alexander Smirnov
2017-09-11  8:00         ` Henning Schild
2017-09-11  8:19           ` 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=20170911184755.45159d91@md1em3qc \
    --to=henning.schild@siemens.com \
    --cc=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.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