From patchwork Tue Apr 13 07:02:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henning Schild X-Patchwork-Id: 410 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:c543:0:0:0:0:0 with SMTP id j3csp2520647ooq; Tue, 13 Apr 2021 08:02:57 -0700 (PDT) X-Received: by 2002:a19:c753:: with SMTP id x80mr22653520lff.589.1618326177113; Tue, 13 Apr 2021 08:02:57 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1618326177; cv=pass; d=google.com; s=arc-20160816; b=G4cMGmluuZQkqZja0f/CYpF1S9ZYpzK5D9fTH40PUtO/Qwtc1L/uttOVXEwurj+mSv m6p1goboBeFtccbt7Mh9OJ0+VN1cMO8xautvK4m56J1E6ABDE2ZAUshyB81OnBGO4IN4 zjnKdeaeOAdDQPA+OTBpEOtxP9OjNBSxRG7jS9Q44L/dyPwW3KBavyMR0MmfwyOozMgk ifkFB4CRttj0eyI8Ay1g0TXsMUpDEAqEGSGh0VwLn0ZCBev78w5JkIHp3D6fXbWosTox d4DeSy6z3ay7vT9LTDluVUmf0IiSQSoUKehewsbv4v/LjHMuMRUAaz/AQDk8c4mIoKY5 vTJQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=dmrC8IVfG3XRnMFHhIRpdyilzzaWO72H3mTY1Jp+sp4=; b=QnXgjiXzRyVRihGpXxyEKWxuDhkvsdP6OjeuhEHG03LOm2p9pE9SnTyKGj0i9VCM6e lNx85IyuFMwsBh7mcpTuFh/mVcGt/sRqI+3fbMTstPu7JITO/KaGomQaJmGJ5comyX6E aMpRiFG2LmSb3az1Je5Mt41D5O7S+pePyPq6v3Mfgn5kFm+o0x2WVYZYWIXvyRxrw3b4 DBfnJf4gQki/JHu90bAbszLvgpFeYclsmGA2Jpqg7etfPSDi4YDVx5L9izps54cAV4WF yVJwRrlXbnX2lRz9NSC5FhwbjTVzv85qvORhcvFTphatNtq15vdwYJ+IGm6TPxroebFP DjHQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=LL+lC5az; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbdjmjpgy2mgrbihf22bqmgqemfy5iva@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBDJMJPGY2MGRBIHF22BQMGQEMFY5IVA@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id k6sor184308lfg.160.2021.04.13.08.02.56 (Google Transport Security); Tue, 13 Apr 2021 08:02:57 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbdjmjpgy2mgrbihf22bqmgqemfy5iva@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=LL+lC5az; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbdjmjpgy2mgrbihf22bqmgqemfy5iva@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBDJMJPGY2MGRBIHF22BQMGQEMFY5IVA@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1618326176; cv=pass; d=google.com; s=arc-20160816; b=eA9fCixyDmcJ9cnllX1EFOwcv1OuPzzf4BZyuQGtp+1StRRsA0LqyQDof61jiUa6nA wc1iyBRg4VgKvAnVdLQlugX4pWTlMnDPJ8Y/CvsJH8TxbOsJIMh6Djs2y9nRtkQQhEzZ S0TcR9vSDoYyDVhAhIwYB6+Ek7F30RPAYDXuNRvlpYHYRWGvjJ2YGL9jsuBWPR6T5l3D vCixdmQsh6vSVxgPjC8ed7YYpb+D0cbHuepuVrr4UXdaavrscs43A762BGd/0EN/Eipj PNzl5UhQtgEQJDZU7+33cRnGlQLXaybloNXcl1735hkeijXKrw3hj5hQM5MTLYFe6CAV EvOg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=dmrC8IVfG3XRnMFHhIRpdyilzzaWO72H3mTY1Jp+sp4=; b=dhJldNfauFJWP/QSNiwAC+qVkJBMui9gszWKKjjK1GNu0MsB65o/KDdiX5iFvPz/ws ZHxe3ALClb/fi0bezZ6XOCm9OYKLqQgwvhL/aMZwQkZkBDZbsLfiDxqYQ3Tb3gmPJzSs Z5i0/v8E0oMfqfBr5cNlnmYzttJZuyPUGZARMlD2lMICQoI8UfHMd/xbxjdzeTb0QkfF 5cwPNo4iNmKHW2Mq+ELEJJbUX36a14LzREb2iLN45tRvWWn7z5qldXHOodjDrQBQesXh VrowecgoKypo6J/vgiYBNXKX2uLGdkm+9a07RrrBMu5f2UV97THDha6PyvDwRgyV5w0H 7JSw== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=dmrC8IVfG3XRnMFHhIRpdyilzzaWO72H3mTY1Jp+sp4=; b=LL+lC5azqJ87N+TXYOKX8f1DWYnpIG8fM8hkfWEtEadvOvqO8VENVQZtwUAe/RufHl QAGXfmFIvrCSZ9vSZ0c1jC7sPaRbN1iMgmMMS2pOaFuzS29JkAru8fa96P97vUkmAJTa 9qPpOB7r6zh4ilKhobnXHI4Uc3wW50wVf102M/QNyp5tSCBlmXJHgJQHNKNGOVOewmzP Y9/R+uxAap5NmaMtxo7yW6lmbjSLk+i+ij8frbAF/thjnPi2SUutuJDvrsQ6NQlh93m4 AtXVQde1T+JCEQELPdRl6NKAYv6+FfMrJxlqUUPvLylM0359CPXfT9F9pwcYhr4K43OP Li6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=dmrC8IVfG3XRnMFHhIRpdyilzzaWO72H3mTY1Jp+sp4=; b=YEYcAItRJYGcU7AL84wYFl23l2bjUCC1VRjpBXYmidpyA+OHrgFJZYsJI5yFeAZN3h OmxZEsNDIdFu5aVUfHEl9/Y2oq7hbKIOhikSmylpc1yURQoWdTvB1sqj1hTgxOqPSpbx F6BTNSFP0gBVQ+NuiojJ+DIdamAlybY/lcgXj9J6ATU9FwKiR6K5NpIFFaHlCjIiV211 mUwFHDhU7ZniBfyZsIwy4YSgIZANXXj4rJUrAXJVyJaFhFmOaqPeLAl7SUIjrFSvVKpY Y3bLLEwUpZ+h037MukS5tSV8tpHGpbR5Adgg5ql0v/lZdXvb5aWsxFAfJnysVQbm9tNw vdRg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530iRU4TcPuV4jiV7dbm1fZYI3bdL1TerLOH0obMK6xwPpdZds5U 8rFrqfy45PBnxSmb6VZsUBY= X-Google-Smtp-Source: ABdhPJyVa25baOqzY1sdTxySd/6BEwLFwjC2Tw2w6YE9Lp9QI568xL/Tm+JmhEohjYFrrON7zcigtQ== X-Received: by 2002:ac2:4e83:: with SMTP id o3mr11079434lfr.616.1618326176440; Tue, 13 Apr 2021 08:02:56 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9b0e:: with SMTP id u14ls1744576lji.5.gmail; Tue, 13 Apr 2021 08:02:55 -0700 (PDT) X-Received: by 2002:a05:6512:555:: with SMTP id h21mr17582230lfl.645.1618326175448; Tue, 13 Apr 2021 08:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618326175; cv=none; d=google.com; s=arc-20160816; b=GqPMAsVh45A+aMJ1ol8O4zUwFY7u8sIAWbS8teWSlw69wXNYXVBmJoP2yQB60g475k lhSLFAYfHfsrNROt1HQejIU1bfy89a4/jEwa51fk1yMKRAvKp1RkXctAkVrO5jTOb8OV XSWXDTEhDfdw1OVY8OpANzxLF3halm5TZKL6sN0nP79yekoqCduBEZDv2mz8ybt2Obqv 8KS/p9y8GAoy+S6gV2GDduA+YcU4lm3XmKucbbPaGMeB3q8z/PhDDY3OEgw2eQ7EoGP1 G00lXyg0tUQSWWz8yM2IdP2STnhEEk7M1Jdc/CE8OP9FsGrpRY7FAZp6Muj28kEFacVu 3qWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=+E0ub95PikeB1KBRtBC9+Zi9X5EY14N0l/v4OP73gSo=; b=lD6cmLOGoo51ZP+Cjr3uo0AD3uAuLqUhHxfJIrt4wj8oQgQ1UCCrIgg2u1sB/+hII+ yIMz7bMARZIhO+ZLJwgOOkn3Vl98rTjmOVfwKFBIVsYV0/RnArf75hnu1WXSj+pT0M8A qvpiqHFGYE81pJPvcxn9PAqp+1aNDrAKl+BY0+9FSvWDpHbX8TRLXf1P/kmWc/6+Fto7 Fve9wiCQI1/6h00MAGoEbNlza3AZ3vjRV5ir6BbCXlhd8XzAoqNd8FqcdicVgG9waioy CV/QTCx/++B9suRol2Yk1O6XnbJJ3b/NoP9vhCnHmaG45gkacfkruX2tn4/cqyOH+fk1 AzTg== 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 Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id j7si528399ljc.6.2021.04.13.08.02.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Apr 2021 08:02:55 -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; Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 13DF2sX5008165 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Apr 2021 17:02:54 +0200 Received: from localhost.localdomain ([167.87.48.83]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 13DF2rM2021528; Tue, 13 Apr 2021 17:02:53 +0200 From: Henning Schild To: bitbake-devel@lists.openembedded.org Cc: isar-users@googlegroups.com, Richard Purdie , Cedric Hombourger , Chris Larson , Henning Schild Subject: [PATCH v2 1/3] fetch/git: add support for disabling shared clones on unpack Date: Tue, 13 Apr 2021 17:02:49 +0200 Message-Id: <20210413150251.1969-1-henning.schild@siemens.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 X-Original-Sender: henning.schild@siemens.com X-Original-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 Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1696848006270555052?= X-GMAIL-MSGID: =?utf-8?q?1696937989458340073?= 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"