On Wed, 2018-02-21 at 12:50 +0100, claudius.heine.ext@siemens.com wrote: > From: Claudius Heine > > This patch introduces the 'isar-bootstrap-helper' bitbake class to > support recipes that use the basic root file system created by > isar-bootstrap. > > In this patch the function 'setup_root_file_system' is defined that > allows to copy the root file system to the directory specified in the > first parameter and installs additional packages specified by the > next parameters. It also adds the local 'isar-apt' repo to the apt > configuration and fetches its index. > > Signed-off-by: Claudius Heine > --- > meta/classes/isar-bootstrap-helper.bbclass | 36 > ++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > create mode 100644 meta/classes/isar-bootstrap-helper.bbclass > > diff --git a/meta/classes/isar-bootstrap-helper.bbclass > b/meta/classes/isar-bootstrap-helper.bbclass > new file mode 100644 > index 0000000..49c81c1 > --- /dev/null > +++ b/meta/classes/isar-bootstrap-helper.bbclass > @@ -0,0 +1,36 @@ > +# Helper functions for using isar-bootstrap > +# > +# This software is a part of ISAR. > +# Copyright (c) Siemens AG, 2018 > +# > +# SPDX-License-Identifier: MIT > + > +setup_root_file_system() { > + RFSDIR="$1" For consistency sake, I'll rename this variable to ROOTFSDIR, the same used in the isar-bootstrap recipe. > + shift > + PACKAGES="$@" > + > + sudo cp -Trpfx \ > + "${DEPLOY_DIR_IMAGE}/isar-bootstrap-${DISTRO}- > ${DISTRO_ARCH}/" \ > + "$RFSDIR" > + > + echo "deb file:///isar-apt ${DEBDISTRONAME} main" | \ > + sudo tee "$RFSDIR/etc/apt/sources.list.d/isar-apt.list" > >/dev/null > + > + sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} $RFSDIR/isar-apt > + sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs $RFSDIR/dev > + sudo mount -t proc none $RFSDIR/proc > + > + # Install packages: > + E="${@ bb.utils.export_proxies(d)}" > + sudo -E chroot "$RFSDIR" /usr/bin/apt-get update \ > + -o Dir::Etc::sourcelist="sources.list.d/isar-apt.list" \ > + -o Dir::Etc::sourceparts="-" \ > + -o APT::Get::List-Cleanup="0" > + sudo -E chroot "$RFSDIR" \ > + /usr/bin/apt-get install -y \ > + --allow-unauthenticated \ > + --no-install-recommends \ Should I instead of using '--no-install-recommends' put the following in the apt configuration within the isar-bootstrap process? APT::Install-Recommends "0" ; APT::Install-Suggests "0" ; regards, Claudius > + -o Debug::pkgProblemResolver=yes \ > + $PACKAGES > +} -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153 Keyserver: hkp://pool.sks-keyservers.net