public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
To: isar-users@googlegroups.com
Cc: henning.schild@siemens.com, ibr@radix50.net,
	jan.kiszka@siemens.com,
	Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Subject: [PATCH v5 08/13] repository: Add a sanity test to check missing sources
Date: Fri, 17 Apr 2020 15:00:35 +0530	[thread overview]
Message-ID: <20200417093040.15130-9-Vijaikumar_Kanagarajan@mentor.com> (raw)
In-Reply-To: <20200417093040.15130-1-Vijaikumar_Kanagarajan@mentor.com>

Add a sanity test routine to test if sources for all packages
are present in the repo.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
 meta/classes/repository.bbclass            | 10 ++++++++++
 meta/recipes-devtools/base-apt/base-apt.bb |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass
index c70138f..7b6e47b 100644
--- a/meta/classes/repository.bbclass
+++ b/meta/classes/repository.bbclass
@@ -96,3 +96,13 @@ repo_contains_package() {
     # no
     return 2
 }
+
+repo_sanity_test() {
+    local dir="$1"
+    local dbdir="$2"
+    local output="$( reprepro -s -b "${dir}" --dbdir "${dbdir}" sourcemissing )"
+    if [ -n "${output}" ]; then
+        bbwarn "One or more sources are missing in base-apt"
+        bbwarn "${output}"
+    fi
+}
diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb
index da3e32e..8940ae8 100644
--- a/meta/recipes-devtools/base-apt/base-apt.bb
+++ b/meta/recipes-devtools/base-apt/base-apt.bb
@@ -66,6 +66,8 @@ repo() {
     fi
 
     populate_base_apt
+    repo_sanity_test "${REPO_BASE_DIR}"/"${BASE_DISTRO}" \
+        "${REPO_BASE_DB_DIR}"/"${BASE_DISTRO}"
 }
 
 python do_cache() {
-- 
2.17.1


  parent reply	other threads:[~2020-04-17  9:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17  9:30 [PATCH v5 00/13] Deb-src caching implementation Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 01/13] rootfs: Make rootfs finalize a separate task Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 02/13] deb-dl-dir: Cache host distro debs separately Vijai Kumar K
2020-04-22  6:52   ` Henning Schild
2020-04-17  9:30 ` [PATCH v5 03/13] meta: cache deb srcs as part of postprocessing Vijai Kumar K
2020-04-22  7:06   ` Henning Schild
2020-04-22  9:57     ` vijai kumar
2020-04-29  6:19       ` Henning Schild
2020-05-04  8:42         ` vijai kumar
2020-05-08  5:44           ` vijai kumar
2020-06-11 11:44             ` vijai kumar
2020-09-03 11:43               ` vijaikumar....@gmail.com
2020-09-03 18:58                 ` Henning Schild
2020-09-04  5:12                   ` vijaikumar....@gmail.com
2020-04-22  7:28   ` Henning Schild
2020-04-22 10:35     ` vijai kumar
2020-04-17  9:30 ` [PATCH v5 04/13] deb-dl-dir: Make debsrc_download faster Vijai Kumar K
2020-04-22  7:15   ` Henning Schild
2020-04-22 10:11     ` vijai kumar
2020-04-29  7:05       ` Henning Schild
2020-04-17  9:30 ` [PATCH v5 05/13] deb-dl-dir: Download files only belonging to the current image Vijai Kumar K
2020-04-22  7:25   ` Henning Schild
2020-04-22 10:20     ` vijai kumar
2020-04-17  9:30 ` [PATCH v5 06/13] deb-dl-dir: Factor out the mounting part Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 07/13] deb-dl-dir: Fix skipping of removed files Vijai Kumar K
2020-04-17  9:30 ` Vijai Kumar K [this message]
2020-04-17  9:30 ` [PATCH v5 09/13] base-apt: Introduce BASE_REPO_FEATURES Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 10/13] repository: Fix failures due to missing section Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 11/13] scripts/ci_build.sh: Enable deb-src caching Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 12/13] rootfs: Fix possible overwrite of existing resolv.conf Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 13/13] rootfs: Handle failures when postprocess is rerun Vijai Kumar K
2020-04-17 14:21 ` [PATCH v5 00/13] Deb-src caching implementation vijai kumar
2020-04-22  7:41 ` 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=20200417093040.15130-9-Vijaikumar_Kanagarajan@mentor.com \
    --to=vijaikumar.kanagarajan@gmail.com \
    --cc=Vijaikumar_Kanagarajan@mentor.com \
    --cc=henning.schild@siemens.com \
    --cc=ibr@radix50.net \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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