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] dpkg-base: Support format source 3.0 (git)
Date: Tue, 12 Dec 2017 15:22:30 +0300	[thread overview]
Message-ID: <20171212122230.623-1-asmirnov@ilbers.de> (raw)

By default git objects are inaccessible from buildchroot but they could
be required by dpkg-buildpackage. So this patch fetches objects to work
directory and drop alternates.

NOTE: this is a workaround and it's intended to unblock the work until
proper solution will be implemented in bitbake.

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 4941f9b..ad58f0b 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() {
+    # Packages with format source 3.0 (git) require access to git objects,
+    # so drop alternates and fetch them to package working directory
+    if [ -f ${WORKDIR}/git/.git/objects/info/alternates ]; then
+        git --git-dir ${WORKDIR}/git/.git repack -a
+        rm -f ${WORKDIR}/git/.git/objects/info/alternates
+    fi
+
     mkdir -p ${BUILDROOT}
     sudo mount --bind ${WORKDIR} ${BUILDROOT}
     _do_build_cleanup() {
-- 
2.9.5


             reply	other threads:[~2017-12-12 12:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 12:22 Alexander Smirnov [this message]
2017-12-12 12:23 ` Alexander Smirnov

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=20171212122230.623-1-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