From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6623741503488393216 X-Received: by 2002:a1c:2dcf:: with SMTP id t198-v6mr1021682wmt.11.1542270346268; Thu, 15 Nov 2018 00:25:46 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:fac4:: with SMTP id a4-v6ls3707116wrs.26.gmail; Thu, 15 Nov 2018 00:25:45 -0800 (PST) X-Google-Smtp-Source: AJdET5dWiwm6ISasSfJmLP05JHFTlITHLzU97pryYr6nq8IrIGZUAlz+UnJkIEDtNxIMrOBciF+j X-Received: by 2002:adf:ee51:: with SMTP id w17mr1033807wro.17.1542270345893; Thu, 15 Nov 2018 00:25:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542270345; cv=none; d=google.com; s=arc-20160816; b=y0TwtxnlQF25CYXcuOi3Hl12HC0ZiB+P+K9QUJXB6A460EoaGVTxbFimiMSFzdRkwY HmocgxvoilZfhjyeJOlsIBtxd+V3P1hmxASKZ0CTL7iJFg36DToYP/sn3Qk7OVNP43DE 2D3CeCi686HfIqjG4t6Wu89U9Szv4YWuOiNwtFC+JVmCBt2YW7bE1BAP98E5LYNxB/YT 1rzjgMWy4VJdv6gQZZeJIgxmmufOFlCLnNDmECauBquJs+5ZwZNXXLn0NfhBFkyHicYF 6fH0T5OGptKaPfptaSa/0BOlibNEt3tq0s/s881wqvOPQ+5B8VqOf2RNkabm25QaeYr5 4gyg== 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=tf8X+LQFvjkwSEwbUizmu5p+rvwd7RRdc2644dcEDYY=; b=oy0oH0v4QwRn834t+4aFuim+c7rlJRZeuzrplZNmWzNo+GigGS74O+4JF6oAMtROw/ 4cKN7qnJyoOz8rpFBBUURlNLyrtOl8lR/2r07myzDlv3dP9J4MoWWrx0c/XFXFjSaILX dNF0CMDTmzpcf3DDb0S/+K+hMB5PR4G44nuq8RSCUiHsuFg4pDjsI5KBqOMVB4Jx+JbA EBQj8idZ4MxJOVDKGnmvlxe/juTRVtaPn+bIbrv4S7et/ambGHEO7ojO3+Ay+fatNuQR lsanU2ax1TFkLZBvft2VT+q17F6tiM1i/TD7Vqu59MATv+tPf2obkIqOG4o3I4xgT3DK GEQg== 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 k39si110793wre.2.2018.11.15.00.25.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 00:25:45 -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 mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id wAF8Pjaj021305 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 15 Nov 2018 09:25:45 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.0.37]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id wAF8Pi3k007660; Thu, 15 Nov 2018 09:25:44 +0100 Date: Thu, 15 Nov 2018 09:25:44 +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: <20181115092544.1a8f314d@md1za8fc.ad001.siemens.net> In-Reply-To: <20181114153955.13232-1-henning.schild@siemens.com> References: <20181114153955.13232-1-henning.schild@siemens.com> 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: 6XzA9h7Mi6Hr 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. 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