From: Henning Schild <henning.schild@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH] meta/dpkg-raw: do_install into a fresh directory every time
Date: Thu, 15 Nov 2018 17:41:47 +0100 [thread overview]
Message-ID: <20181115174147.473a95a2@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20181115092544.1a8f314d@md1za8fc.ad001.siemens.net>
Am Thu, 15 Nov 2018 09:25:44 +0100
schrieb "[ext] Henning Schild" <henning.schild@siemens.com>:
> Please do not merge, i think it is still not correct. bitbake can
> still run do_install without the cleanup if do_install changed and
> the stamp is still there.
> This should be [cleandirs] .. but we need sudo. So probably a
> "prefunc".
>
> I think we might have that pattern in a few places. do_patch might
> have this problem as well, if we ever patch again we also need to
> unpack again.
>
> Still have to confirm all that.
As expected ... this does not work. And do_patch has the same
problem ... and probably a few more places.
To reproduce the do_patch issue add
do_patch_append() {
true
}
to meta-isar/recipes-app/example-hello/example-hello.bb between two
builds. One could also argue that such a thing will never happen ... but
i would not be sure.
I still did not understand how or if oe solves this.
Henning
> Henning
>
> Am Wed, 14 Nov 2018 16:39:55 +0100
> schrieb Henning Schild <henning.schild@siemens.com>:
>
> > Permission problems revealed that we always packaged the sum of
> > possibly many rebuilds and maybe recipe versions. do_install should
> > always start working on an empty $D to ensure that the package only
> > contains output of the current build.
> >
> > Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> > meta/classes/dpkg-raw.bbclass | 10 +++++++++-
> > 1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/dpkg-raw.bbclass
> > b/meta/classes/dpkg-raw.bbclass index d662422..968e28d 100644
> > --- a/meta/classes/dpkg-raw.bbclass
> > +++ b/meta/classes/dpkg-raw.bbclass
> > @@ -8,13 +8,21 @@ MAINTAINER ?= "FIXME Unknown maintainer"
> >
> > D = "${WORKDIR}/image/"
> >
> > +# make sure we start with a fresh ${D} every single time
> > +do_fresh_image() {
> > + sudo rm -rf ${D}
> > +}
> > +
> > +do_fresh_image[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> > +addtask fresh_image after do_unpack before do_install
> > +
> > # Populate folder that will be picked up as package
> > do_install() {
> > bbnote "Put your files for this package in ${D}"
> > }
> >
> > do_install[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> > -addtask install after do_unpack before do_prepare_build
> > +addtask install after do_fresh_image before do_prepare_build
> >
> > deb_package_prepare() {
> > sudo rm -rf ${D}/DEBIAN
>
next prev parent reply other threads:[~2018-11-15 16:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 15:39 Henning Schild
2018-11-14 16:00 ` Jan Kiszka
2018-11-15 8:25 ` Henning Schild
2018-11-15 16:41 ` Henning Schild [this message]
2018-11-15 16:57 ` [PATCH v2] " Henning Schild
2018-11-23 9:46 ` [PATCH] " Henning Schild
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=20181115174147.473a95a2@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--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