From: Henning Schild <henning.schild@siemens.com>
To: "Maxim Yu. Osipov" <mosipov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 04/10] isar-boot-strap: Add option to keep cache
Date: Thu, 25 Oct 2018 16:28:31 +0200 [thread overview]
Message-ID: <20181025162831.6cf51bda@md1pvb1c.ad001.siemens.net> (raw)
In-Reply-To: <20181011165305.1622-5-mosipov@ilbers.de>
Am Thu, 11 Oct 2018 18:52:59 +0200
schrieb "Maxim Yu. Osipov" <mosipov@ilbers.de>:
> From: Alexander Smirnov <asmirnov@ilbers.de>
>
> The default ISAR behavior assumes to remove all the packages
> from apt cache, but we need them to put into base-apt.
>
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
> meta/classes/isar-bootstrap-helper.bbclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/isar-bootstrap-helper.bbclass
> b/meta/classes/isar-bootstrap-helper.bbclass index f046216..b7cd64a
> 100644 --- a/meta/classes/isar-bootstrap-helper.bbclass
> +++ b/meta/classes/isar-bootstrap-helper.bbclass
> @@ -70,6 +70,7 @@ setup_root_file_system() {
> --fstab) FSTAB=$2; shift ;;
> --host-arch) ROOTFS_ARCH=${HOST_ARCH} ;;
> --host-distro) ROOTFS_DISTRO=${HOST_DISTRO} ;;
> + --keep-apt-cache) KEEP_APT_CACHE=1 ;;
> -*) bbfatal "$0: invalid option specified: $1" ;;
> *) break ;;
> esac
> @@ -131,6 +132,11 @@ setup_root_file_system() {
> /usr/bin/apt-get purge --yes $pkg
> done
> if [ ${CLEAN} ]; then
> + if [ ${KEEP_APT_CACHE} ]; then
> + mkdir -p ${WORKDIR}/apt_cache
> + sudo mv $(find $ROOTFSDIR/var/cache/apt -name '*.deb')
> ${WORKDIR}/apt_cache
> + sudo chown $USER ${WORKDIR}/apt_cache/*
In my build USER is not set. So we fail with
>> chown: invalid user:
>> '/out/build/tmp/work/debian-stretch-amd64/isar-image-base/apt_cache/adduser_3.115_all.deb'
Where adduser is the first of *. Should be `whoami`.
Henning
> + fi
> sudo -E chroot "$ROOTFSDIR" \
> /usr/bin/apt-get autoremove --purge --yes
> sudo -E chroot "$ROOTFSDIR" \
next prev parent reply other threads:[~2018-10-25 14:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 16:52 [PATCH v2 00/10] Introduce local apt repo to cache upstream debian packages for offline usage Maxim Yu. Osipov
2018-10-11 16:52 ` [PATCH v2 01/10] base-apt: Add helper class Maxim Yu. Osipov
2018-10-23 16:01 ` Henning Schild
2018-10-11 16:52 ` [PATCH v2 02/10] meta: Unify path names to local repositories Maxim Yu. Osipov
2018-10-11 16:52 ` [PATCH v2 03/10] base-apt: Introduce base implementation Maxim Yu. Osipov
2018-10-11 16:52 ` [PATCH v2 04/10] isar-boot-strap: Add option to keep cache Maxim Yu. Osipov
2018-10-23 16:06 ` Henning Schild
2018-10-25 14:28 ` Henning Schild [this message]
2018-10-11 16:53 ` [PATCH v2 05/10] image: Add cache_base_repo task Maxim Yu. Osipov
2018-10-11 16:53 ` [PATCH v2 06/10] isar-bootstrap: Make possible to reuse the cache Maxim Yu. Osipov
2018-10-23 16:30 ` Henning Schild
2018-10-11 16:53 ` [PATCH v2 07/10] buildchroot: Make it buildable from base-apt Maxim Yu. Osipov
2018-10-11 16:53 ` [PATCH v2 08/10] workaround: Use --allow-unauthenticated working with base-apt Maxim Yu. Osipov
2018-10-23 16:09 ` Henning Schild
2018-10-25 14:33 ` Henning Schild
2018-10-11 16:53 ` [PATCH v2 09/10] local.conf: Add option to use cached base repository Maxim Yu. Osipov
2018-10-11 16:53 ` [PATCH v2 10/10] doc: Creation of local apt repo caching upstream Debian packages Maxim Yu. Osipov
2018-10-17 12:13 ` [PATCH v2 00/10] Introduce local apt repo to cache upstream debian packages for offline usage Maxim Yu. Osipov
2018-10-17 17:11 ` Jan Kiszka
2018-10-17 18:15 ` Maxim Yu. Osipov
2018-10-23 9:56 ` Maxim Yu. Osipov
2018-11-19 8:48 ` Baurzhan Ismagulov
2018-11-19 8:58 ` Jan Kiszka
2018-10-23 16:14 ` Henning Schild
2018-10-29 12:28 ` Baurzhan Ismagulov
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=20181025162831.6cf51bda@md1pvb1c.ad001.siemens.net \
--to=henning.schild@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