public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Subject: Re: [PATCH 3/4 v2] buildchroot: Add prepare and cleanup tasks
Date: Tue, 12 Dec 2017 10:39:27 +0300	[thread overview]
Message-ID: <16c190d8-c359-26cc-4933-93629b9a7b77@ilbers.de> (raw)
In-Reply-To: <20171211151400.hrmyrvswyw53e7tz@MD1KR9XC.ww002.siemens.net>

Hi,

On 12/11/2017 06:14 PM, Christian Storm wrote:
>> Sorry, but I still don't understand how this patch brakes your build
>> because it doesn't influence on dependencies at all.
>> If you need strict order for packages to be built, then anyway you
>> have to specify this in recipe:
>>
>> In recipe B:
>>
>> DEPENDS += "A"
>> do_build[deptask] = "do_build"
>>
>> It would be very helpful for me if you could provide recipes and workaround.
> 
> 
> OK, here's one example, anonymized, that used to work:
> 
> ```meta-mylayer/recipes-core/A/A.bb
> ...
> SRC_URI = "git://..."
> SRC_DIR = "git"
> 
> PROVIDES = "${PN}-dev"
> inherit dpkg
> 
> dpkg_runbuild() {
>    ...
>    sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
>    ...
> }
> ```
> 
> This is a pretty standard recipe whose only purpose is to build two .deb
> packages, one containing the binaries, one containing build-time
> dependencies for B.bb below:
> The resulting A-dev.deb package then contains, e.g.,
>    /usr/lib/x86_64-linux-gnu/libA.a
> and this is used as build-time dependency from B. Consider
>    /usr/lib/x86_64-linux-gnu/libA.a
> to be linked into the software binary compiled by B.B.
> 
> ```meta-mylayer/recipes-core/B/B.bb
> ...
> SRC_URI = "git://..."
> SRC_DIR = "git"
> 
> DEPENDS = "A-dev"
> inherit dpkg
> 
> dpkg_runbuild() {
>    ...
>    ## UGLY hack to install build-time dependency A-dev required for the
>    ## software to be compiled here
>    for item in $(echo ${DEPENDS} | sed 's/buildchroot//g'); do
>      sudo dpkg --root=${BUILDCHROOT_DIR} -i ${DEPLOY_DIR_DEB}/${item}_*
>    done
> 

BTW: why can't you add this hack to 'build.sh', after 
'dpkg-buildpackage' complete, just run 'dpkg -i' on newly baked 
packages. Also ugly, but no headache with deps parsing. :-)

>    sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
>    ...
> }
> ```
> 
> This does not work on current -next. Even if you do the
>    do_build[deptask] = "do_build"
> because do_cleanup() kicks in and unmounts ${BUILDCHROOT_DIR}/git
> and the task reordering of deploy_deb().
> 
> 
> Hope this example helps?

Probably I get the possible issue. How do you add packages A and B to 
the build chain, via IMAGE_INSTALL? If so, where do you set 
IMAGE_INSTALL variable?

Alex

  reply	other threads:[~2017-12-12  7:39 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 10:25 [PATCH 0/4 v2] Buildchroot prepare/cleanup Alexander Smirnov
2017-11-23 10:25 ` [PATCH 1/4 v2] dpkg-base: Fix buildchroot dependancy Alexander Smirnov
2017-11-23 10:25 ` [PATCH 2/4 v2] image: Add do_rootfs template to image class Alexander Smirnov
2017-11-23 10:25 ` [PATCH 3/4 v2] buildchroot: Add prepare and cleanup tasks Alexander Smirnov
2017-11-24 14:55   ` Henning Schild
2017-11-24 15:48     ` Alexander Smirnov
2017-11-24 16:34   ` Henning Schild
2017-11-24 16:51     ` Alexander Smirnov
2017-11-27  7:56       ` Henning Schild
2017-11-27  8:15         ` Alexander Smirnov
2017-12-08  7:58   ` Christian Storm
2017-12-11  9:23     ` Alexander Smirnov
2017-12-11 12:16       ` Henning Schild
2017-12-11 13:37         ` Storm, Christian (CT RDA ITP SES-DE)
2017-12-11 14:12           ` Alexander Smirnov
2017-12-11 15:14             ` Christian Storm
2017-12-12  7:39               ` Alexander Smirnov [this message]
2017-12-12  8:01                 ` Christian Storm
2017-12-12  8:21                   ` Alexander Smirnov
2017-12-11 11:32     ` Henning Schild
2017-12-11 18:29   ` Henning Schild
2017-12-11 19:56     ` Alexander Smirnov
2017-12-12  8:04       ` Christian Storm
2017-12-12 12:05       ` Henning Schild
2017-12-13  5:43         ` Jan Kiszka
2017-12-11 18:32   ` Henning Schild
2017-11-23 10:25 ` [PATCH 4/4 v2] dpkg-base: Update git alternates Alexander Smirnov
2017-11-24 14:57   ` Henning Schild
2017-11-24 15:12     ` Alexander Smirnov
2017-11-27  7:44       ` Henning Schild
2017-11-27  8:03         ` Alexander Smirnov
2017-11-27 15:42           ` Henning Schild

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=16c190d8-c359-26cc-4933-93629b9a7b77@ilbers.de \
    --to=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