From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6498671579909586944 X-Received: by 2002:a17:906:cc88:: with SMTP id oq8mr25016133ejb.66.1619542384123; Tue, 27 Apr 2021 09:53:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:e085:: with SMTP id gh5ls9487806ejb.6.gmail; Tue, 27 Apr 2021 09:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUpwgs1FZ4Nhb4560scwXCbWlgL7ZujxSbcQmXhsdpU50N4GG2YNAyc1sPy7JhfcoCIubB X-Received: by 2002:a17:906:6683:: with SMTP id z3mr24765359ejo.390.1619542383299; Tue, 27 Apr 2021 09:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619542383; cv=none; d=google.com; s=arc-20160816; b=dtKZmhxPxtE1ydj2BC6Ky4t/v5A1ZKZGVUfi0j7DB4BQiHrc2Ct2gFjwfH1u5PvxHo aXQIocuXfG6A2vNNk0RvVCOECo886v5EAd8p/SZ4xNdqdsW0WEH83Mk8CeQRpNqqJkzw QxqINPc9cyaGHhkNlTrlkg3cl+PeRziRM8Zmd1c3PjIeX+A5mTjVhJytHAO29V6tNHbR AEm9syW/6sO6eZt9hKtrc1ZMkb3arSjs6NPkISNZOD1f19m17FEB6bT1Rgl12fO1lZSb gGsubSPjoRyudNYmaGGReHCvZKwGQ6VLFpKu/RVyvb5f7gVV5Qvkzf4sVLd1SLn25WCp lrxA== 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=Z7GKLqwfCN2GrsHR8HBuSGWsOBfQg0d5UOquUMmpSFg=; b=Ca5SzJSRjJ3osZX+MNqLv5HFPznrKJrF1tzFjgYIsejLKepgANKH8jCDAf5vi4KHkZ cgLqneT5mGHvjclmrgXFyCCvj63Gktl9sl53fswq+8RIV18GIeLbTb75f2sve1u2/AUv ef0jEQVbS7kS2rMRJtzRdHWoEzvgBhEA38EKeBh4gphDh/uqfdlzdSLpDLNMbsfq5nKr Z3DfqKez9e7hF3OJfVFLMqNOCTPBaWrtdqLGtC4xXE88GJDzAjriidi6Mm+dnx73yNyw ucNrlTOfvYnQftf5iEYuqU3MdMMAZTwse4Y+g79KGR5ii3OegRTCEsFVxmHIIKYJ12ca shGw== 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 g7si495183edm.3.2021.04.27.09.53.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Apr 2021 09:53:03 -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 13RGr2kg021150 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Apr 2021 18:53:02 +0200 Received: from md1za8fc.ad001.siemens.net ([167.87.26.73]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 13RGr165002869; Tue, 27 Apr 2021 18:53:02 +0200 Date: Tue, 27 Apr 2021 18:53:00 +0200 From: Henning Schild To: Cc: , Richard Purdie , Cedric Hombourger , Chris Larson Subject: Re: [PATCH v3 1/3] fetch/git: add support for disabling shared clones on unpack Message-ID: <20210427185300.5f4357ea@md1za8fc.ad001.siemens.net> In-Reply-To: <20210414063241.18528-1-henning.schild@siemens.com> References: <20210414063241.18528-1-henning.schild@siemens.com> X-Mailer: Claws Mail 3.17.8 (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: 6v4TtQIszT0o Note mainly to isar-users, this is now merged in upstream bitbake. Once we update our bitbake we can set "BB_GIT_NOSHARED = 1" in our bitbake.conf and drop the git adjust task. That should allow use of git outside the chroot and hopefully does not have a too negative impact on unpack performance ... for big things like the kernel Henning Am Wed, 14 Apr 2021 08:32:39 +0200 schrieb Henning Schild : > By default the unpacker will create a "shared" clone when cloning from > the DL_DIR to the WORKDIR. This patch introduces an option to control > that behaviour. > > Imagine some recipe steps are executed in a namespace that is > different from the one your downloader and unpacker ran in. (chroot) > Because a "shared" clone has an absolute reference to its "alternate" > you now have to make that "alternate" visible in that new namespace > (chroot) at the exact place. > > With this patch you can unpack "noshared" and get a stand-alone copy. > This copy will also work if the "alternate" is not visible or > existant. > > The switch is a global bitbake switch and will affect all git urls. > Build systems that need "noshared" most likely need it for everything > they do with git. > > Signed-off-by: Henning Schild > --- > lib/bb/fetch2/git.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py > index e3ba80a3f52a..3e25b4b6047c 100644 > --- a/lib/bb/fetch2/git.py > +++ b/lib/bb/fetch2/git.py > @@ -168,7 +168,11 @@ class Git(FetchMethod): > if len(branches) != len(ud.names): > raise bb.fetch2.ParameterError("The number of name and > branch parameters is not balanced", ud.url) > - ud.cloneflags = "-s -n" > + ud.noshared = d.getVar("BB_GIT_NOSHARED") == "1" > + > + ud.cloneflags = "-n" > + if not ud.noshared: > + ud.cloneflags += " -s" > if ud.bareclone: > ud.cloneflags += " --mirror" >