From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6623741503488393216 X-Received: by 2002:a50:ea8d:: with SMTP id d13-v6mr245488edo.0.1542300109051; Thu, 15 Nov 2018 08:41:49 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:9688:: with SMTP id w8-v6ls1915729ejx.9.gmail; Thu, 15 Nov 2018 08:41:48 -0800 (PST) X-Google-Smtp-Source: AJdET5d0qKMDsSqsUNzJh05qrC6GFuTJsennDDw0yKGLiR0VQOFrlIhDpTv6BAFsL9+ydu0vLxKD X-Received: by 2002:a17:906:404f:: with SMTP id y15-v6mr217552ejj.5.1542300108601; Thu, 15 Nov 2018 08:41:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542300108; cv=none; d=google.com; s=arc-20160816; b=E7ExJjFEkiSDDmxU6TMO2lbW0fO1e5Y2mmdp1wuKbqu30c+DWEmrlrcn5Ykhm7Jr2J Elrl6E2HDdZucfU0FW5cGQik5buzEKTtcrKsLJrJ2jaVFcg62VDcmyWsT5yEOOLpzYl9 cBSfGrjpuUp4F3xXhzyyDvNzOwz3WbFtASlXK/5Y6XHAMhnxusOMtoEosNIr+XQBHLwD DlZO0RZ/22KimO4v5T5a/VVwhZWCs7i22v33ckcBsEo2D9EhzmxrnF0fxvwuDckZxMLI zr/Ph/b4v66lxz3a1oFVPQKNJ6R0BREvV0q4UVGJoNFbaZK25UXWyFkg1UJcPZsXdUXq fI7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=FUD3+iuxHynZ3gm7v5ysVDvAx1SrGVEVnZtaLVlYm1c=; b=d6QpFTI59fWyFzx6+Cwr34gR+KHJI6WYRkE5TwJiiiNabybx/0SUwyRYgiCstcUdMP EDNSqIEU8xNrZYLdBrk9tRYVPc4IkHNL+tpTyWcKJxZzrbcGJujve2S/F+lMZaPkUkCh aeIiqOjZ2YQRpkduFEeMC+wQkKvxkXPQUGAk7w43s3BDx3OU4ZjJ26XneEjKm8xq+RaP ijKudIU+8IPgRIgtE1RFkjc+esHuYBKxo7ILXLw8joIDws1qDC3F8KuvaxH1Je3Ayrhe qeiBR2ryUb8t2r2tHqpyY76DzwgPmP1JOuUJRq16XWy9R+1ugdU0CV3uikec67w8ugkt Nbgg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id n20-v6si819934edt.3.2018.11.15.08.41.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 08:41:48 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id wAFGfm17014579 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 15 Nov 2018 17:41:48 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.0.37]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id wAFGflOW007340; Thu, 15 Nov 2018 17:41:47 +0100 Date: Thu, 15 Nov 2018 17:41:47 +0100 From: Henning Schild To: isar-users Cc: Jan Kiszka Subject: Re: [PATCH] meta/dpkg-raw: do_install into a fresh directory every time Message-ID: <20181115174147.473a95a2@md1za8fc.ad001.siemens.net> In-Reply-To: <20181115092544.1a8f314d@md1za8fc.ad001.siemens.net> References: <20181114153955.13232-1-henning.schild@siemens.com> <20181115092544.1a8f314d@md1za8fc.ad001.siemens.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: B7wUiWvsjSsW Am Thu, 15 Nov 2018 09:25:44 +0100 schrieb "[ext] Henning Schild" : > 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 : > > > 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 > > Signed-off-by: Henning Schild > > --- > > 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 >