From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6899501277566205952 X-Received: by 2002:a1c:6002:: with SMTP id u2mr4723926wmb.29.1606415347139; Thu, 26 Nov 2020 10:29:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:2348:: with SMTP id j69ls1362492wmj.0.gmail; Thu, 26 Nov 2020 10:29:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpmcRyeKlwBU21OT/WC0BxlggnJHwWfoQOrCyXyUcsTo62vM4VHi+ts7pHcv8u9KtwLepa X-Received: by 2002:a7b:c34a:: with SMTP id l10mr4694004wmj.125.1606415346298; Thu, 26 Nov 2020 10:29:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415346; cv=none; d=google.com; s=arc-20160816; b=YVjHwAy/NL3lgBed4UNiwt/ILE6OoJNyLcw7X5KaeX/jeErn8rA85WBMs8GlIgn634 bJV5tZd+lDXMFDMMMu+nglzvVAXbCItDY1ejBt+md1uYqImUseHprdXWxj3Tt7I3OlyW 7Sl9jy2aIOfhFPH2A0uEzSstJrBPCSU+njAIQehaHN8d7M2dWO+hjUARqpLoh2Q4s76A zCgMsm2hUXnW+UAP0NMNQaDw9mg9uGUAWKdVSSfkw1rtHRUWUXIOYmCmTa54ORPGKuEi czriD+FYfmV9bsnmH97fVfr0KxxaICCv2ojqq8/13gIs0MA6X+nf4W+7eDgvY/Q8B4ii RRxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=bjyc/AnITYqgbyEIv4gnVUjhB+RwoaQ68TQ1OhRyz+c=; b=Efkr3Q6Q41CO7krugqjxBOmpQsEXs/oDyZ/bnBEhq0eKhbwmo1me6SgiQ2oo5reAF4 24pQIZ9JjVRdQqRgKHfVEzzmtUvctgEiyHdtp0ZOWtNdVVQ0qIli9RT9vzIudrw3BAa7 HV0CyQe3omaRB68n/w+PbypnZF0hioRX4VPrd0yERM5bao71XpQks7x+kt/MkCQx5+D7 kghX8a7V9vU//OvwC1lFekA3wmANpdvNwGj7+brdHKQOhSNfEiYmaB3KTLFq7NgiKm5F VKV8av67bCPcRjpjmMURXZalT9pfElJ/YNRfYhQMkMbDF0DvJXJUg01MIh2F7nlbabgn DHiA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id y187si226499wmd.1.2020.11.26.10.29.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:29:06 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com IronPort-SDR: /iCfOyy2zuxXjcF7wtffx46s92VI2dcsZWMgdRH7wtr7AHC2xXdTUSljoUF8k/atVo+MdQJLzq UzGEeggdnFDm+D/pjJEllTLMThqf+UsehuL8DRjCGxtSLUlEiK02S2kdLRL93f997ffg7nSCtG AKhc8SM8xUTTN2AoGR+9QSdnibmEn5THhUhVE0AxMTf86EL9o/jvy9/IvH42StG3xe93L5UOfN vk4/npvmLaS/jsXYl4SV7ZA4+DxnBiI+Lv2gFr/b2lNe7R5JpPVYNOuG9POfdMyi+piddm3RZO 9DY= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644680" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:29:05 -0800 IronPort-SDR: meZ54ljynGCJS5wxTXmc+76xojjQUDWtOYcBt0gEFhsHg46jeLn8vRKoh6XxZtWehN9RTQg3ZQ 8+wnYSknmI346Qagy4i+iTsQKOmzeqDqIpJ98mAonwwYJPb/PgaUNA3hae9rASYKX5dsIqH5Yd IPN36HukJmD0W0nBW6BxbwsWmasL1R91oZU6nlKF8E9KN1gckJvcvFcA3+qmowE4uQBV5YOQYv buYkRaHGLgK20bRaP+x1iR5/153Ksy4Th3bOAN6cIRFMO5ayGGmU/FZ6kZpt2slENeV3HmM7Z1 5P0= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 08/14] repository: Add a sanity test to check missing sources Date: Thu, 26 Nov 2020 23:58:12 +0530 Message-ID: <20201126182818.7261-9-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: hidK0g7QRM7I Add a sanity test routine to test if sources for all packages are present in the repo. Signed-off-by: Vijai Kumar K --- 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