From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6878157486786871296 X-Received: by 2002:a19:cb96:: with SMTP id b144mr337695lfg.143.1601446072739; Tue, 29 Sep 2020 23:07:52 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:7e02:: with SMTP id z2ls121103ljc.2.gmail; Tue, 29 Sep 2020 23:07:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWYwgVo5lysxwit5bORTXZILNoSjULjvbnJhHbUkJGIl2BLsgaidIN/JbV+C6MiluJnO86 X-Received: by 2002:a2e:9b51:: with SMTP id o17mr405333ljj.141.1601446071638; Tue, 29 Sep 2020 23:07:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601446071; cv=none; d=google.com; s=arc-20160816; b=cV749Gz42S3Ao7Zs7iuB5hOi5SY/vFqYsEQ16/nn7mXEzPJGmAvsTKqcoDTIPU8U2H skDjnEm7OWBUY9rM7WaXgWt4MTMl7ggRpOVEeQAKIvTJGPJkIIV+V6mWSiQAbdI1YQY/ ymtQUPEvA+4x0StNkODdZotojHUbC8GdrRpmazYifOo3cRpmyqnOb36f/sKedvMgcXcl 1r9LHDyE+dqWgAVt53cGnfsLOe66cscIa9MLWlpzXehBpU+hZwwuNYSX31c6HPn9pemo hrTz6P2MR1MDus+AjOi38SJ+/UDU1BKCK/NccLHw9q7uFOr8FFpJUaZGUb/Om34p9jKW Hc1g== 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=Op4eGTAu7Mtlu2vR1fwkBY3kLJ9bVb7gD/0f/WVW67oe7LPZGrTO+iwOyBkql5sJ8H WmmCtvq3jS+nPbG8C3vE53/KbAryxGpFSiu+kvTlwlIeXRvdIFAKPdRj7vq7lGfE4lzW 48WhQ/UBHIqML7qbdEygP+84boaRUsfzvTXNciY5yu6LLcQRDbFc06rFZk67HtmvQYWV Zxy57xNdocI7Lml8W6jppsL/g0PIStl+UiVxwUO3TIYvGbbLKWeQpu7OpuViBe3ZfVlu dRzLRiPtx7l3gwdSYTU3JcxUpg94wLr9+rsPdizV3xRiqgId/Ha53zNAeoEJgJslXGB1 MsTw== 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 q20si14430lji.2.2020.09.29.23.07.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2020 23:07:51 -0700 (PDT) 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: oVxLdTbpstq6EwPofuAosMgzSmK/LxGxjOYVqOJO2jtfhl7QrwfBvw/LPofwNI/fC4/9axgqK9 PL6ZC1LMvYR6A1zeXcLQHgCRTXJ0gaEb0ozChbAhXa2wgz5HPF/rv6wDcifAoKkEpuo/a7yWRL uqafm9bYVpOvtSEj2AfEukGnJLD86IXH0kQ7JKehyFWIz/UWxbpxA4ZPkxnVsV+9Cf6F1XRrXZ NR/SI6UmFjiThoxl3UM4GaeLC0wPBnWEWG50xyseCUnZqyVjajr9gW8q8kIRJcqgJBmzii051P NVs= X-IronPort-AV: E=Sophos;i="5.77,321,1596528000"; d="scan'208";a="53547886" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 29 Sep 2020 22:07:50 -0800 IronPort-SDR: Fr4g5AW1GG/B+sqQBbCCQqZLIO3nYb+MpE8LUOLvyO35c5+OtLmx4/UXNTs8+xlUpSlfSYNcqX 0dfbPsD4At07ioXfnTsTiguuD4oROt3TJ0Y+kfKHM44R+G40oq8J4hvXJDcqIeT80we1jgkau6 vkQ4f/j1rAqlipZp0/xUv7/Ms5wDoDbfceocoMWbZs/pRCakAcq2hktrsWsWSDpst43R71erCc buorqN4Kf+2YGSYC/uh/OtPJP7K+CR4Uljjblf8dF0Q3bb1jRR7xKLF9JxT1WT95EncknnOSSH j7k= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v6 08/13] repository: Add a sanity test to check missing sources Date: Wed, 30 Sep 2020 11:37:02 +0530 Message-ID: <20200930060707.12785-5-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200930060707.12785-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200930060259.12422-4-Vijaikumar_Kanagarajan@mentor.com> <20200930060707.12785-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: SpjgPB+Yx4JB 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