From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Maxim Yu. Osipov" <mosipov@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH] isar-bootstrap: Eliminate multiple debootstraps for the same distro/host
Date: Fri, 13 Jul 2018 16:33:56 +0200 [thread overview]
Message-ID: <28698641-b811-2973-9daf-e68c8de53cf3@siemens.com> (raw)
In-Reply-To: <20180713112259.19647-1-mosipov@ilbers.de>
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?
>
> 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.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2018-07-13 14:33 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 [this message]
2018-07-16 7:18 ` Maxim Yu. Osipov
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=28698641-b811-2973-9daf-e68c8de53cf3@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=mosipov@ilbers.de \
/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