Return-Path: Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mail.openembedded.org (Postfix) with ESMTP id 98CB47BDF6 for ; Mon, 7 Jan 2019 15:33:01 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id y185so6383364wmd.1 for ; Mon, 07 Jan 2019 07:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=n8fxoafS/z0kIMKnGXp+4rqZyVsWN/iFPnOgLG8oVzA=; b=b74eYjhdk/UokoAbEbwheFzabpVJ7FRnm3K9fGY9WIyrpdN4ohwhzl+/Z0h0uylw/c NcEuPgtt8KhGc1BJhVz7GMNodVaIIk41cgk4rlM00lI2LLmd9/81eJu7Jju2VmKmZkux EijqObXRVanmgNjXHzbiVxyL3mYk9qBz5dFxU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=n8fxoafS/z0kIMKnGXp+4rqZyVsWN/iFPnOgLG8oVzA=; b=kuf4/bOpM4rl7ZZZKFruzutWpwVTYwIbbZMyQ70KIx37ZZBxslg+U1YtTgHI7gLmW3 KK1dEonyaZaTShPhmIRlSB3Q9YwJKyZE36uS8DzwfpBdAvsAtk69/JAXJx4vwg9XFPKE hcevv+FAvQmgVGQaOFAF0zlWlXNAkDLasXL9l/6jLANiICj5LE+GBhvg4gQN+4RgMLQ4 GEGo3W0UqJgWGW0Th5SHBB/fNjQasjiTt31k3LdAIbB/6DNZ5gv/z+VyOJB/Od5pzVL/ MN99WwjyAZu0LPmul3tTNOK/aBD10G5pTANioLFyGrvWTl/eX67qPbZqMRUWUo3dt8wX w6Gg== X-Gm-Message-State: AJcUukdcuVTFoSO1O981mzN5nKLJ6p2hkXWSEAAuGIWnYgGp+NyuFe7q oBQ1VJ6E1VMxqdTrwY8HGNkkRA== X-Google-Smtp-Source: ALg8bN6LoMq44Y0L2Fzr7RhCoRPUolsyeUVFRk1Mx4iF9yF0fEmuxT+8QKh7r6de5z8ohGdPHToIgg== X-Received: by 2002:a1c:96ce:: with SMTP id y197mr9459877wmd.36.1546875182041; Mon, 07 Jan 2019 07:33:02 -0800 (PST) Received: from hex (5751f4a1.skybroadband.com. [87.81.244.161]) by smtp.gmail.com with ESMTPSA id a187sm8499823wmf.33.2019.01.07.07.33.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Jan 2019 07:33:01 -0800 (PST) Message-ID: <9f4819b992b64b38374f642e529dbaa236bf93e2.camel@linuxfoundation.org> From: Richard Purdie To: liu.ming50@gmail.com, openembedded-core@lists.openembedded.org Date: Mon, 07 Jan 2019 15:33:00 +0000 In-Reply-To: <1546792257-4686-1-git-send-email-liu.ming50@gmail.com> References: <1546792257-4686-1-git-send-email-liu.ming50@gmail.com> User-Agent: Evolution 3.30.2-1 Mime-Version: 1.0 Subject: Re: [PATCH V2] meta: handle IMAGE_ROOTFS/IMGDEPLOYDIR by task varflags X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 15:33:01 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Sun, 2019-01-06 at 17:30 +0100, liu.ming50@gmail.com wrote: > From: Ming Liu > > I found a issue that sometimes there are leftovers in IMAGE_ROOTFS > that are generated by the previous builds. I think this is caused by > IMAGE_ROOTFS is not in do_rootfs[cleandirs], so add it in provided > that > INC_RPM_IMAGE_GEN is not set. > > IMGDEPLOYDIR could be added to do_rootfs[dirs] as well, hence some > code > in rootfs.py to generate the IMAGE_ROOTFS/IMGDEPLOYDIR directories > could be removed. > > Signed-off-by: Ming Liu > --- > meta/classes/image.bbclass | 4 ++-- > meta/lib/oe/rootfs.py | 5 ----- > 2 files changed, 2 insertions(+), 7 deletions(-) Firstly, lets split the patch into two, the cleanup and the "fix". The cleanup is fine. The fix is more problematic as I don't want to start encoding logic into the cleandirs var flag. You've missed INC_IPK_IMAGE_GEN for example so the logic would need to become more twisted. Looking at the code in lib/oe/rootfs.py, it does cleanup the directory: self.inc_rpm_image_gen = self.d.getVar('INC_RPM_IMAGE_GEN') if self.inc_rpm_image_gen != "1": bb.utils.remove(self.image_rootfs, True) else: self.pm.recovery_packaging_data() so I'm not sure this will fix the issue you're seeing anyway. Cheers, Richard