From patchwork Tue Nov 24 22:02:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 198 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp150649oou; Wed, 25 Nov 2020 00:03:52 -0800 (PST) X-Received: by 2002:a05:6902:6a7:: with SMTP id j7mr2342791ybt.462.1606291431886; Wed, 25 Nov 2020 00:03:51 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606291431; cv=pass; d=google.com; s=arc-20160816; b=uhfVVrXfh/gcQkxJNSiZiimwGbrPyMbPcM4AKvtEQqWgiTlwlW7FCW6FPoo4Nw5TBW 023Q/wSP5l0kIUm+kyf4q5Tjt9xVSDPwM3bpeZiiI3uJZlu4+/4kWz5Kie8SCuJaFX1n VZQYu5pN9ymK16QkN/PEOaZ1jm7f+Fr6nIao0wyVIO8eCJXqX1GvjWJFwyj0I6GpVw3R JTf5H8ti5LS7xmWtnpiFA4SwxtkT/y4ODjD1VaTij9J+wXnse4WtEIHRtsaXrnXvdWlv dd45WKq6gxzA3yIbHh7u+xRbDfUV6Zk3qB+ZBJI2hSWJCyjNY0fBt7nUv3S/Kg+jITYG pjBg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=n27FdTC3NIvpAzCqyt+r+xJtpU4/zk4aC3vbTgXp6po=; b=Jo1ICtgPKP0wBIXsFk+etNtIDuWZUeCj5SUE4hNdFtIkyQiDgYHFCMZAdFjp1zi6Vf QNFPYBsxfon7OSL6VHMB34ndsjkVJ8oyUTezrstcULQeD3u0V1Rg3aOJbaVUYWuQsTA2 8D9aAJdyhzkvgbJ0vC/6Q7COYOoz4Rs5V+sI74vXCKusHksKmOSOWwpdS8inUu7pGLoU 5QawdDFmEBV8VYzp8T7H3Zxj9MFKH75QbclTd0XcXrFGPfp6l8Ix6R04d/TlSohWeFzp SRUWq0os++alIKAZW+71/dzVSAz1OCFBzCBeNLSVcuP5aRDtKdJ4KV3DI8lqiStLM1/Y gCSQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=Y2bA5VRo; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbz477d6qkgqelwnusqi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZ477D6QKGQELWNUSQI@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id d6sor411210ybj.166.2020.11.25.00.03.51 (Google Transport Security); Wed, 25 Nov 2020 00:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbz477d6qkgqelwnusqi@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=Y2bA5VRo; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbz477d6qkgqelwnusqi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZ477D6QKGQELWNUSQI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606291431; cv=pass; d=google.com; s=arc-20160816; b=HmBiAmOIYj/mcNcpFvdywlXLQowC7WIi9mtQWpFnhjGkpvWcPZUeYKPsQyTV3Sgy49 Tmvu0Jv3X/9Xp0v8OBszM4rEaldyyGVwXO40rx27lxWn9PIsWHL3LzO1ljIdSiVysQjA W82iJsiflHin+Lw8hezZN0gKBrXFqeCl2ZzowuBGbz9JDmbT1nvZdjyVG8sbJlv9bFKc uN534d/kZve1eFhD7UrZmGd7Nz7Ubn2mqPZVmBRp1RAlGcpBPFdtkbAX+VobqfkELd/P WOpE+2jen/kWIIUmlqosi6uSWfVbmDgsaH0BwrWEXOS2qytoepKfkoZNWYlNSkN2DVFs 1QYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=n27FdTC3NIvpAzCqyt+r+xJtpU4/zk4aC3vbTgXp6po=; b=F8ceGFyV9nl2SKWJIMS1xjsPfx4bpGt1NCwWx1+UP7bENRmQs8+Ozp8yemaIiDKjvr v82gWmJtEsoj8yIBK3j1HS/cPpPIYtQSiAMmryYxAVf/sCrsvqf3mCkgqRoWwC4+ZU4s hg7kbWmTGjaa2hamVo3MULvgLnGGX/dk1jguVzWt3bETA5BkuBXQ7G4PiikH0ZbZ5KIX pTpQ/ySbX8FXmGu1o2+UeOIzhn3QnjvagGVjsu9wgVq44L2JRErcGnacNog3Kn7ecr0l wQ8yQPAQ3MAo7PLglmSMsHtXmfk3+uZcfgtMr44f7V5VUDFDg5L02bld9jC84lQ5tFx/ zSCg== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=n27FdTC3NIvpAzCqyt+r+xJtpU4/zk4aC3vbTgXp6po=; b=Y2bA5VRoAoJWj3jtAwkB0BNIf0dUzAunkZ8Mm/G547RsHNlWcosXhpIPgFTmU0D+v7 J/f1+tpPHh6y51/VHKgaIigo7uhWcPLnqZW6+JQq2SYbhfZsE85p6b8Ab7Sb6mY4HgV6 W/MG8740a/YT+PB6UpVvj6PF7dHUygmIgaYM4GK7+YM4wOr9C7hgPdjq12GgFRIFAV8r +fEWVqEcYjM25ETbVxCVwo7RVODBcZQEEiMTjVGHsoIJSBunB/LIgyolIhn1fD0JrMy+ 80+9svBjUZKGyQjQzAkv7H4W1wn89oUgjmwX5fAruydP5I3qflJ07QJPzQegL/tADDo5 FVDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=n27FdTC3NIvpAzCqyt+r+xJtpU4/zk4aC3vbTgXp6po=; b=ImbSdOBLNui1UOXpGIWDH+dBy5xkeDHzDSDO4hY9nz2GoO+jwWDwBPlg4aGyrh2kYm FkwlKJw59ruE1m6b9j805CPYlbx3+LlDlAz0EvXCkyqEK31EIWWpZE1mWzF3L2W5nTht pt338To5W5k0GD5aESDNWV/3pIzqBvCH99xK2dL00pjCfNnAMFka9ZJl44zpbhAAWMSA q1uutb5zs4O7lA6cV7sajDjleBndMucSuNfKgWBNbl56hkJakzvPRealG4842ClA9ZEr Nw0N/2kdhRG+g4Q8ZzN4y3TNuI6aYDpbpP0/BmYkJqRKMpfZWGmg9H/IhSBHGQcKXuBG UrYQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531lS+BtFq4GQRtUIalF5bmNsWtB5wursWcURxyeq3K34t6njZMx P9Iu/pHp8FYERUu8J5DOcx0= X-Google-Smtp-Source: ABdhPJxSG+c1lqWO9+0gLaLSLSG2XtV970IK+ubrvPEEttu4nFz++bIJnKqgylp+myztsDHSaUpa/w== X-Received: by 2002:a25:2cd4:: with SMTP id s203mr2446993ybs.336.1606291431541; 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-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 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; 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 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-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-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 Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684318644375135802?= X-GMAIL-MSGID: =?utf-8?q?1684318644375135802?= 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() {