From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6878157486786871296 X-Received: by 2002:a17:906:ca83:: with SMTP id js3mr3194407ejb.42.1606311888369; Wed, 25 Nov 2020 05:44:48 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:d151:: with SMTP id r17ls458581edo.1.gmail; Wed, 25 Nov 2020 05:44:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbI4KXhXiOTsp+AUp5ja68AEtb+TVZzq9rh1vxpQ6rHakbJBYSmb2dOHDufOBeUX+s1TH0 X-Received: by 2002:a50:cfcf:: with SMTP id i15mr3487342edk.351.1606311887413; Wed, 25 Nov 2020 05:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606311887; cv=none; d=google.com; s=arc-20160816; b=osFekebvu7a2H3tioPRajx71SZnQuNBn2MXXkzNVXRV0x3UH9S6S5Hfb6BF5cG+8+4 ooSls9IlSvcl82uDeSMtvoxb4HTNQPFtjk+1iqK3GtdNT9hSGWiQFpT1ZoUVVM3ZssQt hYBJsahRKWcndggDIFEfkI8noRcbgd5vPeFc76whEWCpiM4+ndhyz/vVDLrDOhK2kUJ4 H3aS/fNLSybwhO+dEiiFjhJMtQaQCHUOMiRRnAzs22IplvgxFxftLm34K5nVF1QNoO+K B59siT7dqnyQbAQUw9yVXGKb+SVO984s8zMyjO2mXj/4EwrJSyBA+OzRgQcpAidbsXZX nCkQ== 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=lYyyWV41QjzvLy8ogVX0DPIRK09ZN1714kVnTjs/ORwlA4yTyn3c5KkDg+AwUhwbq+ qvFkX8MXtmlBNM3b3kgrQEH7ZAbOVjJbyxfTmZPxuYd31ZOM/4KqLORjhXGoJP/TjQCl riwczt8aa4B3N0cFIKYFZNR55JYbPDnvsUgZv8lJzttdJNrZ0Fho1Wf66lawNNWinLeh 49dOYVQdNezD9bwCavfuj33lbp+Gm+CwsFpv1SMMQNzhwNgKr4TWLn6Fs7GqdNlsh3iG LkA3q9J2iCasGd5SQyxrJFeTJSCwRf+7jSH0XuXqO7PwFF7lv79eA9Tu74vgNRUGlF0y DfRA== 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 v7si130589edj.5.2020.11.25.05.44.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 05:44:47 -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: 5pEajxCeo3KqMO4fNPyibW85WPv0PqD4AvdM3q8KfHZvCT+QPZ/Fpb143AWy1e/pp1XWBJicVh FH5C9rIXNRilgmhEPd/NFymtupIYEMFB4SW7ebVSf+gRUzjCHfyGLR09uBwLm84+f9QTAINChO zE4UEz/myy7B+7sELuBmmpvat9RB/L31lmObkzDGhrrKNY03CkjP0T2DQq8V6KQ6zmD9xW5ly7 1mPu4ThVvy87jNmVZFD5JaRtaYn0v3sbEaQ6JBAD5UfV+977WzTmD6zLaS6BANbkabgpZi/ChV /zs= X-IronPort-AV: E=Sophos;i="5.78,368,1599552000"; d="scan'208";a="55597781" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 25 Nov 2020 05:44:46 -0800 IronPort-SDR: 28kZmAUV9G6kbxqTvHkDsTlawDGMKfPgT1fiwO6WovQmOMJG3gZ3qodlMTUB3K/nIn485Ju0kt taLtgR1SQZ/XspnEMmTWaP2+aeVGNwwO/0pmOigKwWOyH1QMP/J6n/EH8Y6H12WxhvvZIuSVTr OnGgQ0+LMvwTzlMLFkKNBaEhQ1A3wElyzJTWfI9w7OT8W0Kg9F29nWdyUeG5l4yg4RWof3zJZM okkime4ONUOazwNHT42foQflEz2QYxXtDp4q6IroQuIGHP2MWD0bX9lRONqJG39LKDNg+BIh2n bSU= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v8 08/14] repository: Add a sanity test to check missing sources Date: Wed, 25 Nov 2020 19:14:08 +0530 Message-ID: <20201125134414.26061-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201125134414.26061-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201125134236.25878-5-Vijaikumar_Kanagarajan@mentor.com> <20201125134414.26061-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: uxejWWZ071P7 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