* [PATCH] dpkg-base: Support format source 3.0 (git)
@ 2017-12-12 12:22 Alexander Smirnov
2017-12-12 12:23 ` Alexander Smirnov
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Smirnov @ 2017-12-12 12:22 UTC (permalink / raw)
To: isar-users; +Cc: Alexander Smirnov
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dpkg-base: Support format source 3.0 (git)
2017-12-12 12:22 [PATCH] dpkg-base: Support format source 3.0 (git) Alexander Smirnov
@ 2017-12-12 12:23 ` Alexander Smirnov
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Smirnov @ 2017-12-12 12:23 UTC (permalink / raw)
To: isar-users
On 12/12/2017 03:22 PM, Alexander Smirnov wrote:
> 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.
>
Hope this could unblock you for a while with git 3.0 packages.
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-12 12:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-12 12:22 [PATCH] dpkg-base: Support format source 3.0 (git) Alexander Smirnov
2017-12-12 12:23 ` Alexander Smirnov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox