public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Moessbauer, Felix" <felix.moessbauer@siemens.com>
To: Uladzimir Bely <ubely@ilbers.de>
Cc: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
	"jan.kiszka@siemens.com" <jan.kiszka@siemens.com>,
	"Schmidt, Adriaan" <adriaan.schmidt@siemens.com>
Subject: RE: [PATCH v3 4/5] base-apt: Predownload packages to base-apt before install.
Date: Wed, 30 Mar 2022 13:41:50 +0000	[thread overview]
Message-ID: <AM9PR10MB4869463B4FC7842757263F39891F9@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20220325103226.27033-5-ubely@ilbers.de>

> -----Original Message-----
> From: isar-users@googlegroups.com <isar-users@googlegroups.com> On
> Behalf Of Uladzimir Bely
> Sent: Friday, March 25, 2022 11:32 AM
> To: isar-users@googlegroups.com
> Subject: [PATCH v3 4/5] base-apt: Predownload packages to base-apt before
> install.
> 
> This patch uses debrepo script to predownload packages to base-apt repository
> before they are installed in buildchroot/rootfs.
> 
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> ---
>  meta/classes/dpkg-base.bbclass               |  8 ++++++++
>  meta/classes/dpkg-gbp.bbclass                |  7 +++++++
>  meta/classes/dpkg.bbclass                    |  7 +++++++
>  meta/classes/image-locales-extension.bbclass |  7 +++++++
>  meta/classes/image-tools-extension.bbclass   |  7 +++++++
>  meta/classes/rootfs.bbclass                  | 20 ++++++++++++++++++++
>  6 files changed, 56 insertions(+)
> 
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 86933c57..6106ca01 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -102,8 +102,16 @@ python() {
>  }
> 
>  do_apt_fetch() {
> +    ${SCRIPTSDIR}/debrepo \
> +        --srcmode \
> +        --workdir="${TMPDIR}/debrepo/${BASE_DISTRO}-
> ${BASE_DISTRO_CODENAME}" \
> +        ${SRC_APT}
>      dpkg_do_mounts
>      E="${@ isar_export_proxies(d)}"
> +    sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \
> +        -o Dir::Etc::SourceList="sources.list.d/base-apt.list" \
> +        -o Dir::Etc::SourceParts="-" \
> +        -o APT::Get::List-Cleanup="0"

Hi,

This looks like a lot of code duplication.
We already have a bunch of similar calls to apt spread across ISAR.
Just to name a few:

- buildchroot/files/deps.sh
- deb-dl-dir.bbclass
- dpkg-base.bbclass
- dpkg-gbp.bbclass
- image-locales-extension.bbclass
- image-tools-extension.bbclass
- rootfs.bbclass
- isar-bootstrap.inc

With sbuilder the situation will get even worse, as the do_install_builddeps task is no longer available.
By that, users that have to prepare their sources in advance to building will manually have to fiddle around with apt to install pre-build dependencies.
Affected OSS layers I know of are meta-coral (dpkg-bazel.bbclass) and meta-iot2050 (npm.bbclass).

Maybe we should re-think our apt handling and add a proper infrastructure.
By that, we can handle all options centrally and give the user an easy to use interface to install a package.
Also error prone aspects like mounts and locks should be handled by that infrastructure.

Finally, this would significantly reduce future maintenance effort in downstream layers.

Felix

--
Siemens AG, Technology, T CED SES-DE
Otto-Hahn-Ring 6, 81739 München, Germany





  reply	other threads:[~2022-03-30 13:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 10:32 [PATCH v3 0/5] Improving base-apt usage PoC Uladzimir Bely
2022-03-25 10:32 ` [PATCH v3 1/5] Add debrepo python script handling base-apt Uladzimir Bely
2022-03-25 10:32 ` [PATCH v3 2/5] meta: Use cached base-apt repo to debootstrap Uladzimir Bely
2022-03-25 10:32 ` [PATCH v3 3/5] meta: always use base-apt repo in local mode Uladzimir Bely
2022-03-25 10:32 ` [PATCH v3 4/5] base-apt: Predownload packages to base-apt before install Uladzimir Bely
2022-03-30 13:41   ` Moessbauer, Felix [this message]
2022-03-25 10:32 ` [PATCH v3 5/5] draft: make isar-apt repo visible for base-apt Uladzimir Bely

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=AM9PR10MB4869463B4FC7842757263F39891F9@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM \
    --to=felix.moessbauer@siemens.com \
    --cc=adriaan.schmidt@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=ubely@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