From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6498671579909586944 X-Received: by 10.80.149.81 with SMTP id v17mr1709470eda.10.1518421248997; Sun, 11 Feb 2018 23:40:48 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.171.6 with SMTP id s6ls5998963edc.2.gmail; Sun, 11 Feb 2018 23:40:48 -0800 (PST) X-Google-Smtp-Source: AH8x226moG87lpzHGovQMKMlhzTb1UU1oo84Upw0pj+wDKQD/jcypGrO4BBqYsObTXuDiiQuFBeo X-Received: by 10.80.184.23 with SMTP id j23mr2894956ede.3.1518421248357; Sun, 11 Feb 2018 23:40:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518421248; cv=none; d=google.com; s=arc-20160816; b=Lj5JrvnuoSb2XHiR5NYHoSsshojpuaryjpmXTy9f4J7XJ0GyRLq/BrolwlCyTN5JQv 3hDpiYFzkUIk3916pBHv3Bdi/EwDBqe9lKszNT9Q5Kxx6ApgPYAjKZ8knzUBKXfbW7sE vRI94GTKuCh1Mfx0YQJAUp/tJ23w7lHKYcZPUDOGKQ5U87G88wGNMM3h02jXPU3OyB7s aMWefShWjZYfgjmoTUBUh16B4bUlZibD5GmFvEKiJv3hpoE+uhFnL7+A1sn9ZzjKXMFw zrrib73ZCPfFpEFmgRjeTM7G0b7U1WV4iZDMrMjP2weW8uxj2hvB3sh+G2/xD+xqSpi5 U1yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=4HbGZjv/c4P9vKYRip4ZYRM5KkrDL/MF33HRfvI64tU=; b=LQQ4QhYOHdY3baAOIVGFIGAvbB64ZkvCS0pRXxw1eD/A88+SnZK1k2ubJ6jLT2bGnS U1Qs0cPAk5q1I0pPMDrZEF/o2nYi4/+QoAnuWFrSkAJFRsdUtn6qRrIBx7tyR6h9fdNF 01SndO+iX6LfGGHIWlsjIVfElbiddWPYcddS9bUIZd8bavOOwsDf49RGLxuXhpKTRaRZ MYJ4cjlDxP836235gM08KYN7QeUIV386myhXoyNHNxF2MalCOYTtzRMnwH0Uf7fli6AR XH/Qf9K1orcqKgE2/Mr9ekW6FJ2oEC5NQojP5WvE8WNzYPhvtrXUIKYcG2SWMFxsV7d+ 9Kjg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id t4si511220edt.2.2018.02.11.23.40.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2018 23:40:48 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w1C7elBT016103 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Feb 2018 08:40:47 +0100 Received: from [167.87.31.168] ([167.87.31.168]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w1C7elWJ028163; Mon, 12 Feb 2018 08:40:47 +0100 Subject: Re: [PATCH v2] fetch/git: add support for disabling shared clones on unpack To: "[ext] Henning Schild" , bitbake-devel@lists.openembedded.org Cc: isar-users@googlegroups.com References: <20171212144443.30618-1-henning.schild@siemens.com> <20171212151203.31408-1-henning.schild@siemens.com> From: Jan Kiszka Message-ID: <027e7d81-b55a-ce05-9188-c34376a78197@siemens.com> Date: Mon, 12 Feb 2018 08:40:47 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20171212151203.31408-1-henning.schild@siemens.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: lYurRlo/IK6l On 2017-12-12 16:12, [ext] Henning Schild wrote: > 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. s/existant/existent/ > > 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" > > Ping on this feature: Could we get some feedback if/how such a configuration option would be acceptable for upstream? We'd like to avoid having to patch or fork bitbake downstream for such a tiny change. Thanks, Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux