From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a2e:8098:: with SMTP id i24mr6036892ljg.50.1599297566070; Sat, 05 Sep 2020 02:19:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:544e:: with SMTP id d14ls273589lfn.2.gmail; Sat, 05 Sep 2020 02:19:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3ZWdd/FhFwA4maAoyRARmypekFG5jbWJIoo0O62Pz4PN8GVUJiax7+Im/n1sULD/x5juE X-Received: by 2002:a19:d11:: with SMTP id 17mr5922910lfn.0.1599297565342; Sat, 05 Sep 2020 02:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599297565; cv=none; d=google.com; s=arc-20160816; b=CbJMgUACZ9B5Ym/vtAdaMsCER/BZxQmQ2VahcZKr+BF07FAGZlbS9fJGU8+vLXE+0s Ho8nvXULuC6dLA9/4WRSxHQWx7ffn5k2UKWkNaEF8WK6pFIZ0sCG5U2ecPb0SUwCF6pL amkOLS8+PoxduECH4ehuhVyEPIEjLhe8EDXvX4tH/8ILnN2tU8eWj7yCKGvFkmPcCPds ZAH7zhiRcOwxmQ0Z7XpO3tdAerw9mdB2dqHmQ6JVZvOBDgAUFTU0ZgmneqemhPfO+Loj vL/raNCPNeTvDtQ/XeKlQoYgobzPzRMt+Hj+SBtm7PpHwlS6UeFrgOi9zbxu6zZrtejD kHDg== 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=xt7iNVZpylspwdTNfrAdOpNFP/iOe/Z9fKiuof9TUA8=; b=nud0/Bi0uw28BHi7qktA5kFmHjU0FWUXDue/ZT/uYRhnfLU+euC58Uw8wxN7F/mJgE A7a5e9cGSsImsRkjt9LJu5KCU4QyLLBQExy1+sR1mykZY/zKICFJdQfXyl0di4tyzuX/ o0m+e9IdXUV44I0Ghygi2qC+MHtjubfhtAB04ub/T4kPl4LtNAccnPVgy3/BHs8GZFkS ANAMziDXluSykC7pAflo3k/mgS1n95JAqkrOyfem0A2E6CDdNV0cvPGpzABiC/Jzx9eq 0lHNyE9Zs80hx3tUpzYrYwoQ1JxYpwa3mSZ4QvB9DpmGxik4zhmKVcUNl/Ak9bRz+Twh YuKg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id a23si387431lji.7.2020.09.05.02.19.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Sep 2020 02:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 0859JOgD007227 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 5 Sep 2020 11:19:24 +0200 Received: from md1za8fc.ad001.siemens.net ([167.87.13.147]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 0859JObA005669; Sat, 5 Sep 2020 11:19:24 +0200 Date: Sat, 5 Sep 2020 11:19:23 +0200 From: Henning Schild To: Vijai Kumar K Cc: Subject: Re: [PATCH v2 06/10] wic_fakeroot: Handle standalone pseudo invocations Message-ID: <20200905111923.1fb5065c@md1za8fc.ad001.siemens.net> In-Reply-To: <20200902185624.15044-7-Vijaikumar_Kanagarajan@mentor.com> References: <20200902185624.15044-1-Vijaikumar_Kanagarajan@mentor.com> <20200902185624.15044-7-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: Claws Mail 3.17.6 (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: ibz4I5uVqYZ+ wic_fakeroot says that it can eventually be replaced with "true", which would make this patch obsolete. And probably the python symlinking from the previous patch. The stretch debian package has gotten a few updates since, and jessie is not support by isar anymore. So maybe worth checking if the fsck hack is still needed, and therefore the whole script. Also what wic calls might have changed, or it might itself "ignore" the problem that my code seems to work around there. Same goes for "export MTOOLS_SKIP_CHECK=1", that might not be required anymore. and should be double-checked. Henning On Thu, 3 Sep 2020 00:26:20 +0530 Vijai Kumar K wrote: > When using --exclude-path option wic copies the rootfs to a new > location and invokes pseudo as a standalone command to rebuild the > database in the new rootfs. > > This is not applicable when using wic_fakeroot. Return 0 for such > standalone invocations in wic_fakeroot. > > It also looks for files.db inside the pseudo directory and throws an > exception if it is not found. Handle that too. > > Signed-off-by: Vijai Kumar K > --- > meta/classes/wic-img.bbclass | 1 + > scripts/wic_fakeroot | 5 +++++ > 2 files changed, 6 insertions(+) > > diff --git a/meta/classes/wic-img.bbclass > b/meta/classes/wic-img.bbclass index a2c9627..b1a7259 100644 > --- a/meta/classes/wic-img.bbclass > +++ b/meta/classes/wic-img.bbclass > @@ -144,6 +144,7 @@ EOSUDO > export BUILDDIR=${BUILDDIR} > export MTOOLS_SKIP_CHECK=1 > mkdir -p ${IMAGE_ROOTFS}/../pseudo > + touch ${IMAGE_ROOTFS}/../pseudo/files.db > > # create the temp dir in the buildchroot to ensure uniqueness > WICTMP=$(cd ${BUILDCHROOT_DIR}; mktemp -d -p tmp) > diff --git a/scripts/wic_fakeroot b/scripts/wic_fakeroot > index 88a03fa..16b011e 100755 > --- a/scripts/wic_fakeroot > +++ b/scripts/wic_fakeroot > @@ -25,6 +25,11 @@ cmd = args[0] > # rootfs/root ... > assert os.geteuid() == 0, "wic_fakeroot must be run as root!" > > +# Check if we are calling the pseudo command itself. Return 1 > +# for standalone pseudo operations. > +if cmd.startswith('-'): > + sys.exit(0) > + > # e2fsck <= 1.43.5 returns 1 on non-errors (stretch and before > affected) # treat 1 as safe ... the filesystem was successfully > repaired and is OK if cmd.startswith('fsck.'):