From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6498671579909586944 X-Received: by 10.28.245.7 with SMTP id t7mr321940wmh.0.1513788265151; Wed, 20 Dec 2017 08:44:25 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.160.131 with SMTP id m3ls7105568wrm.3.gmail; Wed, 20 Dec 2017 08:44:24 -0800 (PST) X-Google-Smtp-Source: ACJfBovWl2G7TDFp90Tu91mHiy5jargDc2XR9YNYCwyfFlKb92OeUnmWgjKmFD4/qg42VIeheNK6 X-Received: by 10.28.191.90 with SMTP id p87mr777982wmf.26.1513788264759; Wed, 20 Dec 2017 08:44:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513788264; cv=none; d=google.com; s=arc-20160816; b=rsBbnu63P+/JVUeh/YCyHUuhQIKrZchOIOCQ9L0Xr2TY6Wsg+O2eKa3FPbAXBJeTXr WLvlCXDq1HjNHjVNcr6VjSGHjc5utRpHc/QLtj07D0fswD/apFuBilfrzajl3Y2yv4dW dtYiduj1aVpyHui3CiAicwxg1NRGRY0Z6IniGlFgKP/c2aU18LG+F7oXs3Ps5qcNPUKx 5hRaUcUeLdzq8zPpRpSNGgrdiVKefPU5gs9H8z9Lu6xQ9U8H6MGKTgLMZOgBaHKIGfDD UiiCVTuCWQr4N7gBzmHDuBI7ksqY0rHdPGxse2463HOHyhiwmyLQmXNQ8rSuz5ts2imI 7j5w== 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:from:date:arc-authentication-results; bh=FzqnSWYG7ItCfYgvPq9niZWCGj6VeJYlYfu66gLObEU=; b=QtWpq1xfZrJt9Tci9vOGGVQyJIX99o5OktnvTRE/FRO6wgsi4IRpatKCC0oh+jDCwD ao35OP0sQm3dgs0IEyoDilPnh95SoTzFTtz6pNDsV0nY6ovYRhIEnWtfoWizOonALnr2 E+MVMbcxYs3uOdJ7ZfmkKcbTMCGrME5gqhMH2S+CCybA7fbp2BiZMVFGA4HSfQoOmMAO 1Z/VkqtqlAbEvOQNKqjkuvoxgQiQ3ESLIl6XGCGpecY2LTxnxLrknPGLH8/orFsX3aWP tOgF29c6o0rUhv4P8D2IB72Zgj3OAPpyMhiGOvPqnvBgdYVYFrXr8IeCgKrkB86Wya4I ZAaQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id b123si313726wmf.1.2017.12.20.08.44.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Dec 2017 08:44:24 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id vBKGiO7h022447 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 20 Dec 2017 17:44:24 +0100 Received: from mmd1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id vBKGiO21027039 for ; Wed, 20 Dec 2017 17:44:24 +0100 Date: Wed, 20 Dec 2017 17:44:23 +0100 From: Henning Schild Cc: Subject: Re: [PATCH] fetch/git: add support for disabling shared clones on unpack Message-ID: <20171220174423.2bb50e2a@mmd1pvb1c.ad001.siemens.net> In-Reply-To: <20171220164209.9609-1-henning.schild@siemens.com> References: <20171220164209.9609-1-henning.schild@siemens.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: Fc0seUgiMAPI Sorry for the noise, but the mailinglist of bitbake is more like "closedembedded". My messages where never approved and i had to subscribe ... Am Wed, 20 Dec 2017 17:42:09 +0100 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. Probably something that hardly anyone would want to > do. > > 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. > > Signed-off-by: Henning Schild > --- > lib/bb/fetch2/git.py | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py > index 5ef8cd69..7b7f02b2 100644 > --- a/lib/bb/fetch2/git.py > +++ b/lib/bb/fetch2/git.py > @@ -53,6 +53,13 @@ Supported SRC_URI options are: > For local git:// urls to use the current branch HEAD as the > revision for use with AUTOREV. Implies nobranch. > > +- noshared > + When unpacking do not clone with the parameter "--shared". This > option will > + allow the unpacked copy to work stand-alone i.e. if your recipe > runs in a > + chroot where the "alternate" can not be found. Setting this will > increase > + the unpack-time and the disk-usage. > + The default is "0", set noshared=1 if needed. > + > """ > > #Copyright (C) 2005 Richard Purdie > @@ -159,6 +166,8 @@ class Git(FetchMethod): > > ud.nobranch = ud.parm.get("nobranch","0") == "1" > > + ud.noshared = ud.parm.get("noshared","0") == "1" > + > # usehead implies nobranch > ud.usehead = ud.parm.get("usehead","0") == "1" > if ud.usehead: > @@ -176,7 +185,9 @@ 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.cloneflags = "-n" > + if not ud.noshared: > + ud.cloneflags += " -s" > if ud.bareclone: > ud.cloneflags += " --mirror" >