From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>, Harald Seiler <hws@denx.de>
Subject: Re: [PATCH v2] dpkg-base: Remove newly deployed debs from buildchroots
Date: Mon, 17 Aug 2020 19:21:22 +0200 [thread overview]
Message-ID: <20200817192122.2c75051f@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <96eea6bd-7d68-9850-0724-47e811113997@siemens.com>
On Mon, 17 Aug 2020 17:38:46 +0200
Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 17.08.20 14:50, Henning Schild wrote:
> > On Tue, 11 Aug 2020 09:05:59 +0200
> > "[ext] Jan Kiszka" <jan.kiszka@siemens.com> wrote:
> >
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> This ensures clean reinstallation after partial rebuilds.
> >>
> >> A typical error pattern so far was that firmware packages pulled by
> >> the buildchroot-target were not updated there on rebuilds, causing
> >> the old firmware being deployed into the image.
> >>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >> ---
> >>
> >> Changes in v2:
> >> - removed bogus -U options which sneaked in from reading the wrong
> >> man page (zypper's apt-get wrapper: -U, --no-clean-deps)
> >>
> >> meta/classes/dpkg-base.bbclass | 12 +++++++++---
> >> 1 file changed, 9 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/meta/classes/dpkg-base.bbclass
> >> b/meta/classes/dpkg-base.bbclass index 9aa2d546..08880d7d 100644
> >> --- a/meta/classes/dpkg-base.bbclass
> >> +++ b/meta/classes/dpkg-base.bbclass
> >> @@ -154,20 +154,26 @@ python do_dpkg_build() {
> >>
> >> addtask dpkg_build before do_build
> >>
> >> -CLEANFUNCS += "repo_clean"
> >> +CLEANFUNCS += "deb_clean"
> >>
> >> -repo_clean() {
> >> +deb_clean() {
> >> DEBS=$( find ${S}/.. -maxdepth 1 -name "*.deb" || [ ! -d ${S}
> >> ] ) if [ -n "${DEBS}" ]; then
> >> for d in ${DEBS}; do
> >> repo_del_package "${REPO_ISAR_DIR}"/"${DISTRO}" \
> >> "${REPO_ISAR_DB_DIR}"/"${DISTRO}"
> >> "${DEBDISTRONAME}" "${d}"
> >> + package=$(basename "${d}")
> >> + package_remove="/usr/bin/apt-get remove -y
> >> ${package%%_*}"
> >> + sudo -E chroot ${BUILDCHROOT_DIR} ${package_remove} ||
> >> true
> >
> > This will cause serious headache when rebuilding essential packages.
> > You risk removing dpkg/apt and others.
>
> Not sure if that would already work, at least when the result actually
> targets the buildchroot and not just the device.
I am also not sure, especially when looking at the buildchroots.
> >
> > I think we rather need an "apt-get upgrade --allow-downgrades"
> > together with a "apt-get autoremove" somewhere.
>
> I think those only work if the version number changed which is not
> guaranteed. We would need some switch that enforces re-installation,
> and that possibly only when some trigger tells us that the package has
> changed. apt-get reinstall?
Not changing the version number is probably bad style. I think one
should always change it when working on a recipe. While working on it
people hopefully know what to clean, and others merging changes will
simply get a proper rebuild with a new version.
> If we do not find a quick solution, I think such corner cases could
> also be addressed when needed. The current situation is too
> problematic to leave it like it us much longer.
Agreed, it could just be a made-up corner-case. Just wanted to point
out the potential danger and stress the fact that changed content
without changing the version is a bad idea.
Henning
> Jan
>
next prev parent reply other threads:[~2020-08-17 17:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-11 7:05 Jan Kiszka
2020-08-11 7:47 ` Harald Seiler
2020-08-17 12:50 ` Henning Schild
2020-08-17 15:38 ` Jan Kiszka
2020-08-17 17:21 ` Henning Schild [this message]
2020-08-18 5:53 ` Jan Kiszka
2020-08-17 19:27 ` Baurzhan Ismagulov
2020-08-18 5:57 ` Jan Kiszka
2020-08-23 16:30 ` Baurzhan Ismagulov
2020-08-24 7:17 ` Jan Kiszka
2020-08-23 16:06 ` Baurzhan Ismagulov
2020-08-24 7:16 ` Jan Kiszka
2020-09-21 19:17 ` Jan Kiszka
2020-10-28 13:39 ` Kanagarajan, Vijaikumar
2020-10-28 13:52 ` Jan Kiszka
2020-10-28 14:20 ` Kanagarajan, Vijaikumar
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=20200817192122.2c75051f@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=hws@denx.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