From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: MOHAMMAD RASIM <mohammad.rasim96@gmail.com>
Cc: yocto@yoctoproject.org
Subject: Re: can bitbake build offline ?
Date: Thu, 26 Jul 2018 12:40:10 +0200 [thread overview]
Message-ID: <10152170.chYgiU6tNd@localhost.localdomain> (raw)
In-Reply-To: <a2a07618-2378-4563-109b-a6654ab29220@gmail.com>
On Thursday, 26 July 2018 12:09:46 PM CEST MOHAMMAD RASIM wrote:
> Well, actually I used the find command in that wiki page to find the
> recipe that uses tag name to chose github revision and it found only one
> recipe
>
> >meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-
> >klibc_1.5.1.bb
Hmm, right, it seems like you're using a previous branch - this got fixed
in a later update of that recipe.
> I masked this recipe in the local.conf file and bitbake failed at
> parsing other recipes, looking at those recipes I saw that they don't
> use tag names but they use
>
> >SRCREV = "${AUTOREV}"
>
> which is logical since bitbake has to issue ls-remote to know what is
> the latest revision on the remote git repo (maybe the wiki page needs
> update to point this ?)
>
> Now I can't remove this AUTOREV in these recipes since I need bitbake to
> fetch the latest updates ( I push updates regularly on that repo and I
> don't want to update the recipe file each time to add the latest revision)
>
> So, here comes the hard part, Is it possible to tell bitbake to issue
> ls-remote if there is network and to use the latest fetched revision in
> the sources directory if the network is disabled ? that way I can use
> ${AUTOREV} in my recipes and bitbake will build from the local repo in
> the sources directory unless there is network to update the local repo,
> probably there is no such thing :) .
So there isn't a mechanism to do exactly that, no, however you can sort of
achieve the same thing if you set up a .inc file that sets the SRCREV values
for each recipe and sets BB_NO_NETWORK at the same time (though the
latter could still be separate). e.g. let's call it no_network.inc:
BB_NO_NETWORK = "1"
SRCREV_pn-abc = "b4c2bd84ee6f699e348d602a82d2d0963384cdea"
SRCREV_pn-xyz = "e3b30def2cd1c9ede7630489c3949a45b6eba6ee"
..
Then to build offline you would just add the following to your config:
require no_network.inc
FYI you can enable buildhistory and use the buildhistory-collect-srcrevs
script to generate all those SRCREV lines so you don't have to do that
by hand:
https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#maintaining-build-output-quality
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
next prev parent reply other threads:[~2018-07-26 10:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1aa737c1-9930-4a32-2060-6c6103142d88@gmail.com>
2018-07-26 3:44 ` can bitbake build offline ? MOHAMMAD RASIM
2018-07-26 6:26 ` Paul Eggleton
2018-07-26 10:09 ` MOHAMMAD RASIM
2018-07-26 10:40 ` Paul Eggleton [this message]
2018-07-26 14:10 ` MOHAMMAD RASIM
2018-07-21 8:32 MOHAMMAD RASIM
2018-07-21 8:42 ` Alexander Kanavin
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=10152170.chYgiU6tNd@localhost.localdomain \
--to=paul.eggleton@linux.intel.com \
--cc=mohammad.rasim96@gmail.com \
--cc=yocto@yoctoproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.