From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6878157486786871296 X-Received: by 2002:a25:4445:: with SMTP id r66mr2041518yba.189.1606291431588; Wed, 25 Nov 2020 00:03:51 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:5f42:: with SMTP id h2ls788850ybm.11.gmail; Wed, 25 Nov 2020 00:03:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaTyBnjxy5JEN4sQLl/ZARLxaWqH0LiKOzUMbbsAp9SxZotxakPrC+z0mQdAvDDy3+s/dC X-Received: by 2002:a25:4444:: with SMTP id r65mr3099820yba.86.1606291431084; Wed, 25 Nov 2020 00:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606291431; cv=none; d=google.com; s=arc-20160816; b=oYxoo3vyg9Zwon/7MmWLTzOCGYJyWHouAUfJTNV1Nxhr6+b6LEOLYYKQonacsgXCyu EhS9fVDvEIytOVR02Gm24dj2aZ+va9fs3x/vd6WjUDMqcH9RAMz5tEwVw9XtpvWoAoZs cCgSOvQ7B7Ygdim5ZP2hL9AhRxC7efIjY5Qg750E97P7Bmv4dABDq3DcY5n+8IPFjQfK 5rMel4bVjwcxoeIKRMo15KUcSS6RdDhf3WLLjPgQXMn4F0qKjlqDpUsktSaR0O4OcTIm 1yB8cjUzfBu3zrR2EY0K+oe3nwAzNwUPH5nAy+QyWr25tIflHgtJYcqLIuuqGtnmqEit QvLA== 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=bvr9XhzLhbhyfg2UdkNV6eQlM2qqEzC4v4+qqqX9CxFxcpgZpXRnj8Nak7GT2RqKhY 5cUw0YxDRSDDmrJ6xw2jHvEKAwI9ZBahFjplshYyuDYsxSecxBix80Ugsdws1mEO8pbq NIHPQTfYrMs5mIVAzQdRVYxVMt/coURsVUPm2J59E6M76f/7scM3MVhVvl3bjkmikRV5 5spiOXN4Utjpup0Wr7EBRmmNb2ikQvm7RYTlDPe2sgHt5yMdeS7nfHmmpPa9RxR2T0hJ 39JDOJmQKPyoK0GUv6NaJ5doqdK7JxVMrZkiLKPhvUX6hZ7pxhrykRVnWqKy5cyQLlAy 2DSQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id 199si77218ybd.5.2020.11.25.00.03.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 00:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com IronPort-SDR: Qe7DFyKMiVj7dLtfY0bgoWKm5LJXK9NWHYHGoVE+IKUUlTFqSui89ZDLxOnrlu9NjPD2KODVTc wfxO+MJHw39OBJQl7Ov391raedH6gAG567wE8yK6ZxALQMon8NTnDjNGqQQadEIHUqPlIV/oRT QH5MNEYC4TYBW6OsFhirPIsnh5YmBR9M9kA+T0FXai+06YVzuS7dxXpDO4Jy+4UVxme3/lEVaw 4s/LvuVz9yvuBQeRKbFaGQ8zDv15XPl8HY2i3TRvYC2FfYIhh578xOlPuKjBKzzQgw27vGR0sF wpU= X-IronPort-AV: E=Sophos;i="5.78,368,1599552000"; d="scan'208";a="57762487" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 25 Nov 2020 00:03:50 -0800 IronPort-SDR: 90C/9Krl6qGafgyNbODZmS3XBUqpC9ktnZ2154v5T9Be3Ylxqd8n8BZm+Rjyu9h/feq4M4pI2I j5tgZ5fsvkvxlaZDsmaeUi0slatNdIwl7cscKQyRZsw2OrJcaMUzQYUt+2iUodzjitBJjM3dT7 d4SHklRj3XVGbTbQ3LyXfb/lnJWTOGM2xD0fFRbeYZINeK91D7hk/DC92M+fx89F/2qxvzZ+ua pGuenrdpYEITLIs16zkny9wJtreO2Qk8dUrwlm/Z13k/IwK1RXvn90aIurUd+La2Rk2UqHihh/ Lng= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v7 08/14] repository: Add a sanity test to check missing sources Date: Wed, 25 Nov 2020 13:32:55 +0530 Message-ID: <20201125080301.15818-9-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201125080301.15818-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201125080301.15818-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: hG4oqlk7lY/4 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