public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH 4/4 v2] dpkg-base: Update git alternates
Date: Thu, 23 Nov 2017 13:25:32 +0300	[thread overview]
Message-ID: <20171123102532.26274-5-asmirnov@ilbers.de> (raw)
In-Reply-To: <20171123102532.26274-1-asmirnov@ilbers.de>

Update git alternates to work in buildchroot.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta/classes/dpkg-base.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 21ae88d..d51a709 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -18,6 +18,13 @@ dpkg_runbuild() {
 
 # Wrap the function dpkg_runbuild with the bind mount for buildroot
 do_build() {
+    if [ -d ${WORKDIR}/git/.git ]; then
+        OBJ_PATH=$(cat ${WORKDIR}/git/.git/objects/info/alternates)
+        REPO_PATH=$(dirname $OBJ_PATH)
+        REPO_NAME=$(basename $REPO_PATH)
+        echo "/git/$REPO_NAME/objects" > ${WORKDIR}/git/.git/objects/info/alternates
+    fi
+
     mkdir -p ${BUILDROOT}
     sudo mount --bind ${WORKDIR} ${BUILDROOT}
     _do_build_cleanup() {
-- 
2.9.5


  parent reply	other threads:[~2017-11-23 10:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 10:25 [PATCH 0/4 v2] Buildchroot prepare/cleanup Alexander Smirnov
2017-11-23 10:25 ` [PATCH 1/4 v2] dpkg-base: Fix buildchroot dependancy Alexander Smirnov
2017-11-23 10:25 ` [PATCH 2/4 v2] image: Add do_rootfs template to image class Alexander Smirnov
2017-11-23 10:25 ` [PATCH 3/4 v2] buildchroot: Add prepare and cleanup tasks Alexander Smirnov
2017-11-24 14:55   ` Henning Schild
2017-11-24 15:48     ` Alexander Smirnov
2017-11-24 16:34   ` Henning Schild
2017-11-24 16:51     ` Alexander Smirnov
2017-11-27  7:56       ` Henning Schild
2017-11-27  8:15         ` Alexander Smirnov
2017-12-08  7:58   ` Christian Storm
2017-12-11  9:23     ` Alexander Smirnov
2017-12-11 12:16       ` Henning Schild
2017-12-11 13:37         ` Storm, Christian (CT RDA ITP SES-DE)
2017-12-11 14:12           ` Alexander Smirnov
2017-12-11 15:14             ` Christian Storm
2017-12-12  7:39               ` Alexander Smirnov
2017-12-12  8:01                 ` Christian Storm
2017-12-12  8:21                   ` Alexander Smirnov
2017-12-11 11:32     ` Henning Schild
2017-12-11 18:29   ` Henning Schild
2017-12-11 19:56     ` Alexander Smirnov
2017-12-12  8:04       ` Christian Storm
2017-12-12 12:05       ` Henning Schild
2017-12-13  5:43         ` Jan Kiszka
2017-12-11 18:32   ` Henning Schild
2017-11-23 10:25 ` Alexander Smirnov [this message]
2017-11-24 14:57   ` [PATCH 4/4 v2] dpkg-base: Update git alternates Henning Schild
2017-11-24 15:12     ` Alexander Smirnov
2017-11-27  7:44       ` Henning Schild
2017-11-27  8:03         ` Alexander Smirnov
2017-11-27 15:42           ` Henning Schild

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171123102532.26274-5-asmirnov@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox