public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [RFC v2 2/3] doc: Add section for isar-apt reuse functionality
Date: Mon, 13 Jun 2022 09:07:58 +0200	[thread overview]
Message-ID: <20220613070759.16949-3-ubely@ilbers.de> (raw)
In-Reply-To: <20220613070759.16949-1-ubely@ilbers.de>

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 doc/user_manual.md | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/doc/user_manual.md b/doc/user_manual.md
index 02874b6d..80f79ddd 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -24,6 +24,7 @@ Copyright (C) 2016-2019, ilbers GmbH
  - [Create an ISAR SDK root filesystem](#create-an-isar-sdk-root-filesystem)
  - [Create a containerized Isar SDK root filesystem](#create-a-containerized-isar-sdk-root-filesystem)
  - [Creation of local apt repo caching upstream Debian packages](#creation-of-local-apt-repo-caching-upstream-debian-packages)
+ - [Reusing isar-apt repository](#reusing-isar-apt-repository)
 
 
 ## Introduction
@@ -1254,6 +1255,28 @@ sudo rm -rf tmp
 bitbake mc:qemuarm-buster:isar-image-base
 ```
 
+## Reusing isar-apt repository
+
+### Motivation
+
+Building custom recipes from sources may take a lot of time to download the sources and build the package. Also, reusing isar-apt makes it possible to work offline.
+
+### Solution
+
+After a custom package is built, it's placed into isar-apt repository. It's possible to reuse this repository for further builds. The behavior is controlled by `ISAR_APT_REUSE` variable in `conf/local.conf`:
+
+- `ISAR_APT_REUSE = "0"` - always rebuild custom packages from sources, even if they already exist in the repository
+- `ISAR_APT_REUSE = "1"` - reuse previously built binary if it exists in repository with the same version
+
+If `ISAR_APT_REUSE` is not set it behaves like `"0"`
+
+It also may be useful to move `isar-apt` directory out from `tmp/deploy` so that it could be easily shared between builds. To do that, modify `conf/local.conf` by adding lines similar to the following ones:
+
+```
+REPO_ISAR_DIR = "/path/to/isar-apt/${DISTRO}-${DISTRO_ARCH}/apt"
+REPO_ISAR_DB_DIR = "/path/to/isar-apt/${DISTRO}-${DISTRO_ARCH}/db"
+```
+
 ## Add foreign packages from other repositories to the generated image
 
 ### Motivation
-- 
2.20.1


  parent reply	other threads:[~2022-06-13  7:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13  7:07 [RFC v2 0/3] PoC for isar-apt repo reusing Uladzimir Bely
2022-06-13  7:07 ` [RFC v2 1/3] meta: Reuse existing local isar-apt repo in new builds Uladzimir Bely
2022-06-13  7:07 ` Uladzimir Bely [this message]
2022-06-13  7:07 ` [RFC v2 3/3] ci: Added test for isar-apt reuse functionality Uladzimir Bely

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=20220613070759.16949-3-ubely@ilbers.de \
    --to=ubely@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