From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>, isar-users@googlegroups.com
Subject: Re: [PATCH] isar-bootstrap: Eliminate multiple debootstraps for the same distro/host
Date: Mon, 16 Jul 2018 10:18:12 +0300 [thread overview]
Message-ID: <b72e398d-c157-c1e6-7c76-fc9b38f66930@ilbers.de> (raw)
In-Reply-To: <28698641-b811-2973-9daf-e68c8de53cf3@siemens.com>
On 07/13/2018 05:33 PM, Jan Kiszka wrote:
> On 2018-07-13 13:22, Maxim Yu. Osipov wrote:
>> After applying this patch only single debootstrap for
>> particular platform is created and pointed by corresponding
>> link uder DEPLOY_DIR_IMAGE.
>
> under
>
>>
>> For proper locking of parallel builds shell tasks
>> apt_config_install, set_locale, setup_chroot, apt_update
>> and deploy were collapsed to common debotstrap helper.
>
> debootstrap
>
>> Due to problems in bitbake with shell functions expansion
>> under quotes these functions were substituted by their
>> bodies.
>
> But this implies no code duplications, just inlining, right?
Exactly.
>>
>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>> ---
>> meta/classes/image.bbclass | 2 +-
>> .../isar-bootstrap/isar-bootstrap-host.bb | 57 +++------
>> .../isar-bootstrap/isar-bootstrap-target.bb | 52 +++------
>> .../recipes-core/isar-bootstrap/isar-bootstrap.inc | 127 ++++++++++++++-------
>> meta/recipes-devtools/buildchroot/buildchroot.bb | 2 +-
>> meta/recipes-devtools/sdkchroot/sdkchroot.bb | 2 +-
>> 6 files changed, 119 insertions(+), 123 deletions(-)
>>
>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>> index 7935b69..20eb3fd 100644
>> --- a/meta/classes/image.bbclass
>> +++ b/meta/classes/image.bbclass
>> @@ -66,7 +66,7 @@ INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>> inherit ${IMAGE_TYPE}
>>
>> do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
>> -do_rootfs[depends] = "isar-apt:do_cache_config isar-bootstrap-target:do_deploy"
>> +do_rootfs[depends] = "isar-apt:do_cache_config isar-bootstrap-target:do_bootstrap"
>>
>> do_rootfs() {
>> die "No root filesystem function defined, please implement in your recipe"
>> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
>> index cca0984..3996d8d 100644
>> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
>> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
>> @@ -8,13 +8,15 @@
>> Description = "Minimal host Debian root file system"
>>
>> WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${HOST_DISTRO}-${HOST_ARCH}"
>> +DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_IMAGE}/isar-bootstrap-${HOST_DISTRO}-${HOST_ARCH}"
>> +ISAR_BOOTSTRAP_LOCK = "${DEPLOY_DIR_IMAGE}/isar-bootstrap-${HOST_DISTRO}-${HOST_ARCH}.lock"
>>
>> include isar-bootstrap.inc
>> inherit isar-bootstrap-helper
>>
>> -do_generate_keyring[stamp-extra-info] = "${HOST_DISTRO}-${HOST_ARCH}"
>> +do_generate_keyring[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>>
>> -do_apt_config_prepare[stamp-extra-info] = "${HOST_DISTRO}-${HOST_ARCH}"
>> +do_apt_config_prepare[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>> do_apt_config_prepare[dirs] = "${WORKDIR}"
>> do_apt_config_prepare[vardeps] += "\
>> APTPREFS \
>> @@ -22,54 +24,25 @@ do_apt_config_prepare[vardeps] += "\
>> DEBDISTRONAME \
>> APTSRCS \
>> HOST_DISTRO_APT_SOURCES \
>> + DEPLOY_ISAR_BOOTSTRAP \
>> "
>> python do_apt_config_prepare() {
>> - apt_preferences_out = d.getVar("APTPREFS", True)
>> - apt_preferences_list = (d.getVar("HOST_DISTRO_APT_PREFERENCES", True) or ""
>> - ).split()
>> - aggregate_files(d, apt_preferences_list, apt_preferences_out)
>> + if not os.path.islink(d.getVar("DEPLOY_ISAR_BOOTSTRAP", True)):
>> + apt_preferences_out = d.getVar("APTPREFS", True)
>> + apt_preferences_list = (d.getVar("HOST_DISTRO_APT_PREFERENCES", True) or ""
>> + ).split()
>> + aggregate_files(d, apt_preferences_list, apt_preferences_out)
>
> Shouldn't this be indented consistently (4 space)? Also in the rest of
> the patch.
Sorry, will fix that in v2.
Kind regards,
Maxim.
--
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
prev parent reply other threads:[~2018-07-16 7:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 11:22 Maxim Yu. Osipov
2018-07-13 14:33 ` Jan Kiszka
2018-07-16 7:18 ` Maxim Yu. Osipov [this message]
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=b72e398d-c157-c1e6-7c76-fc9b38f66930@ilbers.de \
--to=mosipov@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.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