From patchwork Fri Nov 22 05:48:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "cedric.hombourger@siemens.com" X-Patchwork-Id: 3960 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 22 Nov 2024 06:48:46 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-oo1-f58.google.com (mail-oo1-f58.google.com [209.85.161.58]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AM5mjZP016366 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Nov 2024 06:48:46 +0100 Received: by mail-oo1-f58.google.com with SMTP id 006d021491bc7-5ebb6b362f2sf1409607eaf.1 for ; Thu, 21 Nov 2024 21:48:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732254519; cv=pass; d=google.com; s=arc-20240605; b=QbdhXRR7cs85l9soxMid9gofHM7paiol07Nj6M5tfnEcIBLFgEFktb0grf4wdKMz3A zF/qVRdREoHs5b3hTmvpPv6QYvjqfs9cTAGB+YQ/cKX3MdpUFFf6cYOOeDRiK6u2ldDj Hnz7smdVTigESVuS+ztBrHQ0Ub7e+xqq/6gknYEBO61vw9q93S82cG041Xl4c5bt7a3y hmvfcAtVtQobEfugXxCn41KCPXgkP3QjzpF4ekcI8p+IQZXPCavkw8xSYILpKDLzXmBP DhNxPt6mrkl/dyq05FUUhIq4OTgPidD70UMnMpEGHjSOYUjG+6KnYno1vwFhFlXPaftx vySw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QDyTnU6VmntFv5ztnLq3OvdAMpriD1trDFNN+femCkA=; fh=2fXgXLdjrJx1iEDAZSEok+1Z82Wrlwyz/SguYEaRTEs=; b=HQ7Q6SByos2yELYWeNPrNxZdMez5e4mhBN4GHqjZSKwg7InMaR94zsnggViC+sMfBj q04Qnm5lV9cH4DpdFN8uxdd938gnaPY0uhnxfcJG6f7+lg3r4s2O5ZYdksdil/tF2TBY 1u9EVQo/eTprdtyP7g0B0PotQBzeGJhCShXSHZZOIEcRU4AaayUT3OUMhxGt6n7eafFd rZbjFImcKYYQv8oVvQMKHopTxWLm4XKVhbwgfChTrGQYp292VEOiFizXb91ekyA4BaYf DrD8pDAIPEAxPjs8Sec1KtzupkbFoH5hQZzm7xDRdbg3jBEpi3xYHN12Q08ewgjXvMdz knwQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=bOjkH21T; spf=pass (google.com: domain of fm-1212295-202411220548359597f02eaa2d13481a-gsuvo5@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1212295-202411220548359597f02eaa2d13481a-GSuVo5@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1732254519; x=1732859319; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=QDyTnU6VmntFv5ztnLq3OvdAMpriD1trDFNN+femCkA=; b=kpcTUaJF6nQpAbbtvJWUMZ3QntI7oZUkhjlGG81QJksCj5zUJw5cvLkN1xQyU0VU/W KMIwhCUwpG576IDNFD1b04LEwOu97RJNhS777NkQbyLcUjmmmdKcdzLg0aei7v0nsHGf Qh8JHSvi5zThniGVGxSAEhItpqDbtwbNCsPSi/5aI8dNJRVApKpsdZi1/rxTQD3scV4W DlO27i8BevvOUvUx18CxmWqYEaWOrOtv4sD52hyKmWDruHKokzmKsPBHSVhMvucdnZ+8 57k3PQ01q44Emg+p3tOfGt7OL7rzSn14aQo6Au6sYIp/3CCK3slYh4NUeMX30L40zhhS PrqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732254519; x=1732859319; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QDyTnU6VmntFv5ztnLq3OvdAMpriD1trDFNN+femCkA=; b=rOYT4wVqxkbwj3BJO1ePSf6hiMAj3zRp6zm27gRC/sB+BgH2ZMXHYMFAEUioKkPa3V aAmAQpGGE0BwUCcGbE38sgad2GFhrq/ypqGQxbCk9h2uA4na4rGWjmGlSn82pzIt9/37 Pgh7u27vk8R5OMGnYLWtnkrfGreusjigoOC1HCm+EhWlhRIDfF5PjczutYgDYpvyziel mmuAQntaX8aomU1OsNA/hfu1yuUoCoG9/amlpCzRRI+DiEnnFTZKXoi9fk1gN9m4Ik2U 6LOmKmktiaD6iGH92NOvMeEj1PpA+7s2B2DPaELbGJXbNBIKRQ1ckezhGwY8zGK0mYiR xJQA== X-Forwarded-Encrypted: i=2; AJvYcCXxdwfgJSCAREp9v9rW8In8UfouLvCxqDRUOLpb/x4cbcmLAXkiGmCEbqu2b9MEQrCMvbGE8Yo=@isar-build.org X-Gm-Message-State: AOJu0YywPjjwrhtoTO6pXh1c40aITCh4xt2GTxln8Bmu7qRC8eU+WTUU fybK1ba1CETxZZtJOWpkHEMfPOVsqgvWNA3lGCMwSylXDghOBzht X-Google-Smtp-Source: AGHT+IHtlY3cG75rwPIXISqMH8PTIn6uezTzW0N3QBv1qWvAdWxKLqzvfvMT7QFkxuGtMCBh0nsSUg== X-Received: by 2002:a05:6820:1ac9:b0:5ee:db2e:9f76 with SMTP id 006d021491bc7-5f06a6f23cfmr1638771eaf.0.1732254518646; Thu, 21 Nov 2024 21:48:38 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6820:228d:b0:5ee:dd2e:8d38 with SMTP id 006d021491bc7-5ef3c4c4b18ls1523566eaf.1.-pod-prod-01-us; Thu, 21 Nov 2024 21:48:37 -0800 (PST) X-Received: by 2002:a05:6808:19aa:b0:3e7:5af6:af0f with SMTP id 5614622812f47-3e915aeb004mr1703309b6e.39.1732254517817; Thu, 21 Nov 2024 21:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732254517; cv=none; d=google.com; s=arc-20240605; b=bLzacj5wx74Qsmk8gGEXfQOEqp6/p5d8+0/UtPIRR8j/uv+RTBZmSGKYFOShE8I8h8 97VN9MD0PL4+qLs7z+Ul7QZFwmib8RFWPgyAw98/uorg4zt27VBEHcjz4mPJq4O+QDTg AV9v8zT/r1y5RGDNNUyDkF/ZOHKo4CYu/7EV51MYsu7xArYg5MqDrpjc9FYGi/nuMXzj L8TJnyUxT3T9/EB4Uhxw+Pi1imFBijZxw6bjzh8iwiGziUarIe8R+R9S4tQow6wDrJFs DqfZHcl+yj37ZLzQlv4Yw9/dXUjRlUM9W57vuvQFJmXAQxpcRhrZonElge8XHA8BtOFt xiWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=hT3srfDVfDIVkVI1OYvFmvsgCM1Gz8s6+R/yE4y17RE=; fh=1z37pEVhqwMLlkT4FDzOga7XBsM6Rzv6sXOq0pipxqo=; b=GHElbPg5zu6YNd5KDU/ESNAIgj8WGvVaiHjlfW9y1EUEZnnjQ18GflE8zpIOg9Ftr8 6FVwyVRnGWiuEiMdPDQukxPwKxG2+x0G2WLSXxZQpq1hPbdJpzOcFouqXdgyINnEctHy tTeQ1Hy0aExk/1QUvFi+RJFOJvAy/0ktFBOgmNT9uXws0ehKJEdne1YJbs4vaHAIu/0+ k8u7JQRo4uQ1FvhrEJYKJ4jQEoLPxPXhgSH3LCvpo8wn8/Dj5nEODeukDaKyhvC4yO+t iPeuTIy5jC0+1YhGFPPNt6X/awFRwfvdcLgVWbylOXXqqpdTFF1eKIwa3m40pevjtrR1 xTXA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=bOjkH21T; spf=pass (google.com: domain of fm-1212295-202411220548359597f02eaa2d13481a-gsuvo5@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1212295-202411220548359597f02eaa2d13481a-GSuVo5@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id d2e1a72fcca58-724de5bb130si36336b3a.6.2024.11.21.21.48.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2024 21:48:37 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1212295-202411220548359597f02eaa2d13481a-gsuvo5@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 202411220548359597f02eaa2d13481a for ; Fri, 22 Nov 2024 06:48:35 +0100 X-Patchwork-Original-From: "'Cedric Hombourger' via isar-users" From: "cedric.hombourger@siemens.com" To: isar-users@googlegroups.com Cc: Cedric Hombourger Subject: [PATCH 1/3] repository: repo_del_package should not remove source packages Date: Fri, 22 Nov 2024 06:48:14 +0100 Message-Id: <20241122054816.3371334-2-cedric.hombourger@siemens.com> In-Reply-To: <20241122054816.3371334-1-cedric.hombourger@siemens.com> References: <20241122054816.3371334-1-cedric.hombourger@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1212295:519-21489:flowmailer X-Original-Sender: cedric.hombourger@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=bOjkH21T; spf=pass (google.com: domain of fm-1212295-202411220548359597f02eaa2d13481a-gsuvo5@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1212295-202411220548359597f02eaa2d13481a-GSuVo5@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Cedric Hombourger Reply-To: Cedric Hombourger 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-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= When the architecture of the binary package is "all", repo_del_package would remove the architecture filter to remove binary for any packages. This unfortunately causes reprepro to also remove the source package. Modify this function to use "reprepro removefilter" where we can make sure that only .deb packages are removed. Signed-off-by: Cedric Hombourger --- meta/classes/repository.bbclass | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass index 28e712fd..42d15823 100644 --- a/meta/classes/repository.bbclass +++ b/meta/classes/repository.bbclass @@ -84,14 +84,11 @@ repo_del_package() { if [ -n "${GNUPGHOME}" ]; then export GNUPGHOME="${GNUPGHOME}" fi - local p=$( dpkg-deb --show --showformat '${Package}' "${file}" ) - local a=$( dpkg-deb --show --showformat '${Architecture}' "${file}" ) - # removing "all" means no arch - local aarg="-A ${a}" - [ "${a}" = "all" ] && aarg="" - reprepro -b "${dir}" --dbdir "${dbdir}" -C main ${aarg} \ - remove "${codename}" \ - "${p}" + set -- $( dpkg-deb --show --showformat '${Package} ${Architecture}' "${file}" ) + local p="${1}" a="${2}" + reprepro -b "${dir}" --dbdir "${dbdir}" -C main \ + removefilter "${codename}" \ + 'Package (= '${p}'), Architecture (= '${a}'), $PackageType (= deb)' } repo_contains_package() { From patchwork Fri Nov 22 05:48:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "cedric.hombourger@siemens.com" X-Patchwork-Id: 3959 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 22 Nov 2024 06:48:45 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f189.google.com (mail-il1-f189.google.com [209.85.166.189]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AM5migO016346 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Nov 2024 06:48:44 +0100 Received: by mail-il1-f189.google.com with SMTP id e9e14a558f8ab-3a77085a3d7sf16535035ab.1 for ; Thu, 21 Nov 2024 21:48:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732254518; cv=pass; d=google.com; s=arc-20240605; b=XF45sIr+APaEiXUqzy7f+PKqTlK0cFJhakNxW9oyEGxRloW086NCht87iNHAOyd8Hs 4tXP68pUs7Qw8oesZG7fCnqV/qMooZJKossJJJdvXrmkkV2sCG33y5hJgYBoya/QW5pv fF0qq9sQf5Qqpy1+xg7BgJZgXQvLTe0D9Xr5lP+yug5e/0ObykPigsRtqS+M+19i6rth dcEZXRiNN/23TyS3Jpa//sJDm6DqOF882JIgzymFuAhfwy5Y/0FasE6hiI2zz08iRw+N Sk5tQJtBgZKuZN3SqDg9DaPEzYvNGA3DlOfcEW4f+Sr6pXpMFFPSHvAjdOPplXlDrr6w ibnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rOjDycM7I3H3s1qCJFWVIjMB0G7Swf2PA44grXmX/UQ=; fh=6JcprsfdV1UdfMvztuTMy2rFIDUtC0ROlPV1DU6WCrY=; b=F6JS2gebjgveoPTNFWeu61J0Z0oHimlFyLykwYrdJTP7cF3xpSkXE0IHVTyla7QLGL MlT6x+elA1omP/7rNapnObFq3WcLEz6iIsRP0uR7yO4+PRkwq70mfNNm8uJMwRR5GVcw 04WpfbUCTKTyEL4ABEf8qlD3oMw38X0q/doto/hwbSYL8pvftL1nl/TrVZ8FynIPPZLv OovFxiN4T88ZtLb1QSPwcMgBHW+vIAQPZhQA2vb6HAYFVUd9CgQtxrmmoGeFAnhmFs9e EcnV9SDhFVri+/413ZaudL+hivOAsBMGVPTNQemux3lLcgYG0W9qpS2whrLFCrA88YTZ GpHw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b="jsxMI/ic"; spf=pass (google.com: domain of fm-1212295-20241122054835d1e3b3a57eadb635f2-pqw2_2@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1212295-20241122054835d1e3b3a57eadb635f2-PQW2_2@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1732254518; x=1732859318; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=rOjDycM7I3H3s1qCJFWVIjMB0G7Swf2PA44grXmX/UQ=; b=kp5mHXLlaQKlkBzEmHzg5VsIcDAsWTxaIBITiqb29N9DCqV8gZy+3AMfJYV/7LNZMN HFkbJ9SYKuFaQV0cGg8Bb8WsG3s5rTgCElHjFSH36zuVXWqDc92YfLaDmNUaBaw2IVNg Ro5u1/cXIMdDu65QW+RBtlOu/SM9Rc7+PHvlp6WTPmwo5ez+r7w1n4ey2XSJe0he/j51 jHJNmAhIbqx8X7svxYnctmr3VcFB01YQc7bQVi9ipFOHKDFcSKNjHj5QXz06ZmpQS2Nh k6U40XojrkAORznXO8Jiuew+RzVC+e4rbn5eCPA86yD5ZftHnc80k/2I+BrYrjFx/bFJ 4swQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732254518; x=1732859318; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rOjDycM7I3H3s1qCJFWVIjMB0G7Swf2PA44grXmX/UQ=; b=FYrPO9wfpEVRFKHh1bdQCH4rvqrs8HOohctltMps1hlIA39XSWiFIVUz0uvNYE+9Au J74dx+EfFH5mxML/kLdDFNoPaHcT8qPFykWC/mkIY7wmGwIEfKgvh5lPUXsTYexlee3j valFHQj1orpzlVZHzWatDh01LMIilvsQYsHQ8zAbMx7AyMrrUW3DrEeIWkHjftkQHQ9F yJFvtiylzCp5I/SwxxR5th0MhDv7g33+GxFHTkrpG91JoMzGCYq81v8F7M4jZ0PEeDRn sbiyUEHzCJuoJPzKTZzjuNqwM8Tk6UT3aFhk/l33VDl0LZyshGvM8/KWFO+AEyEStKTV XoFA== X-Forwarded-Encrypted: i=2; AJvYcCVdNpP4NbASotQSma5CCCQvCzXnDMSIWdF2DnOBnlLkIcl2m3F+E0GiB3vFvR5k7ClSJJXZPUQ=@isar-build.org X-Gm-Message-State: AOJu0YzJ/Q0AkZim/2WQmJ8pvtiQNY+bwgx7bPZCGRMWBhwgtFVrpl6s tX9c7jAMxCT7XQFGdHDePqEf2qctqnDOP25Ozj4zCEJatxN7Rs5v X-Google-Smtp-Source: AGHT+IGdg+dtY6jE54jvqFGdyLTEUSLEW8YZvxjZ/A0RxTLQIZs5+b4X6M7K9rSA2SBQwq/2qq7uoQ== X-Received: by 2002:a92:ca4f:0:b0:3a7:9fff:1353 with SMTP id e9e14a558f8ab-3a79fff1550mr5939625ab.0.1732254518335; Thu, 21 Nov 2024 21:48:38 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:1a6a:b0:3a7:90e5:fb73 with SMTP id e9e14a558f8ab-3a790e5fd12ls9099465ab.1.-pod-prod-00-us; Thu, 21 Nov 2024 21:48:37 -0800 (PST) X-Received: by 2002:a05:6602:6405:b0:83b:5306:d24d with SMTP id ca18e2360f4ac-83ecd16c889mr207171839f.6.1732254517370; Thu, 21 Nov 2024 21:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732254517; cv=none; d=google.com; s=arc-20240605; b=LKSZcMDm99tFD1a4h2tSiNZgVhmEdYngGwVYWTkELa9o22Pt8OTMtN8dYyujsiRDwR GPQAumj4QL6eSPVyeuqlAXovwE0L30QjMGLZOrCGXLPy3lOvs2/8U7snEDtH8CFNRmHT 55g4ugbeucjxipCUQMNQiPF0HeK1rDEUffpjTnaH3i1+IQ54ptNcqV2qoBLZLobJ0Um1 H442SydfV5dqaKbbB//mX9iiaY1xyYFK0+guKnrC/e39snd2hnL6wsZt3hfmZrgNjOJ9 swKhnwX43OC6lDp/JNPCNU1o0Jpmts4rH6sjgJ5RTCadd10LQIUO4EVhXP+l1B+gGLYW Hy2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=MvZTZO6ymXu/XgtNeRIYIPW8N+zVQWmfxmSIAJ9LbD8=; fh=1z37pEVhqwMLlkT4FDzOga7XBsM6Rzv6sXOq0pipxqo=; b=OLA4ENnaMU8hbRMlYVnxle6a0fCLlT6832iw16iDLyqmrLjpj5YYohRrZRTlGhs4IL IFGiGccXUJleiXbW39eF+Xfuz2NOYmWEecNBLhNpAqyGXG2ckOFvHTpY485Ysue1FmrS +p6nUKaJ/oCr3KgZLuItK78rEop4GXTgMc6wBGzml0Ne9nadoxo8DS1KYYTCSwlXVLNk InuYu4xlbIgNlwwLum8+cnaH76TrB1CdOCkrptQLaom+ogdHeawtjlVPbdXcTyuVZGCe 6SllBK/HNZZ8VRQsiZp0C8OZ/+MLvYeXc9if05giQFv8+QebIsz5fdjXwSnIr/G2ByKV mV4w==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b="jsxMI/ic"; spf=pass (google.com: domain of fm-1212295-20241122054835d1e3b3a57eadb635f2-pqw2_2@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1212295-20241122054835d1e3b3a57eadb635f2-PQW2_2@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net. [185.136.65.225]) by gmr-mx.google.com with ESMTPS id ca18e2360f4ac-83eccf851b3si4150439f.0.2024.11.21.21.48.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2024 21:48:37 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1212295-20241122054835d1e3b3a57eadb635f2-pqw2_2@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) client-ip=185.136.65.225; Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 20241122054835d1e3b3a57eadb635f2 for ; Fri, 22 Nov 2024 06:48:35 +0100 X-Patchwork-Original-From: "'Cedric Hombourger' via isar-users" From: "cedric.hombourger@siemens.com" To: isar-users@googlegroups.com Cc: Cedric Hombourger Subject: [PATCH 2/3] repository: align repo_contains_package signature with other repo functions Date: Fri, 22 Nov 2024 06:48:15 +0100 Message-Id: <20241122054816.3371334-3-cedric.hombourger@siemens.com> In-Reply-To: <20241122054816.3371334-1-cedric.hombourger@siemens.com> References: <20241122054816.3371334-1-cedric.hombourger@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1212295:519-21489:flowmailer X-Original-Sender: cedric.hombourger@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b="jsxMI/ic"; spf=pass (google.com: domain of fm-1212295-20241122054835d1e3b3a57eadb635f2-pqw2_2@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1212295-20241122054835d1e3b3a57eadb635f2-PQW2_2@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Cedric Hombourger Reply-To: Cedric Hombourger 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-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= All repository functions take four arguments: - path to the repository - path to the database used by the repository management tool - codename - file/package repo_contains_package was the only function deviating from this scheme and its current implementation only takes a repository path and a file. Since the repositoty class was introduced to hide implementation details (so we could move away from reprepro if we wanted to), align that function with others. The only caller found in the repository (base-apt) was changed to use the new (standard) API. Signed-off-by: Cedric Hombourger --- meta/classes/repository.bbclass | 4 +++- meta/recipes-devtools/base-apt/base-apt.bb | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass index 42d15823..b20ec091 100644 --- a/meta/classes/repository.bbclass +++ b/meta/classes/repository.bbclass @@ -93,7 +93,9 @@ repo_del_package() { repo_contains_package() { local dir="$1" - local file="$2" + local dbdir="$2" + local codename="$3" + local file="$4" local package package=$(find ${dir} -name ${file##*/}) diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb index 2766bc71..4fad76c5 100644 --- a/meta/recipes-devtools/base-apt/base-apt.bb +++ b/meta/recipes-devtools/base-apt/base-apt.bb @@ -24,7 +24,10 @@ populate_base_apt() { # Check if this package is already in base-apt ret=0 - repo_contains_package "${REPO_BASE_DIR}/${base_distro}" "${package}" || + repo_contains_package "${REPO_BASE_DIR}/${base_distro}" \ + "${REPO_BASE_DB_DIR}"/"${base_distro}" \ + "${BASE_DISTRO_CODENAME}" \ + "${package}" || ret=$? [ "${ret}" = "0" ] && continue if [ "${ret}" = "1" ]; then From patchwork Fri Nov 22 05:48:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "cedric.hombourger@siemens.com" X-Patchwork-Id: 3961 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 22 Nov 2024 06:48:47 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f58.google.com (mail-pj1-f58.google.com [209.85.216.58]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AM5mj6v016376 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Nov 2024 06:48:46 +0100 Received: by mail-pj1-f58.google.com with SMTP id 98e67ed59e1d1-2ea050e557dsf2067147a91.1 for ; Thu, 21 Nov 2024 21:48:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732254519; cv=pass; d=google.com; s=arc-20240605; b=OzJ0fBsl2UrRFObBG8NTRBkFTGzZu/dufirbLN/SeJZ8lqHqL9rIYOWfHwmS93zTtV qItaOYehpoVUTLsR6LvAQ/ckiPIj24ikB98v4XxFasWJ7kw3n1abmxvVskWX32b6arHO 2iQWh74KUKcw3cfOF7rBZbJ3eYQkgMx0vUk1KC68WB81JdE9AWtvP1YwtE8LeJEBAH0y oaK8U7rtPjx+m+CfJs7Lu3T/JMe9+nUna8Gvqw2rIl8KLDQOBPE2r0mjeRztpDKHCPB3 xQRxzbGMwaUn82p9X1Mqp58gm7yy4NxvzTgBacNTzdUbGrlg4k7I4GRxZHazSUnObSbM rR1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=B86dtcdM78NLgnQ8ggNDD/IGsOD5jRewG0olTFWXHj8=; fh=XqL4o4vj+V5Wh0ApTM3Us4H+U3slMTY4C8LqBztB/Ag=; b=XlatjLDldPRv4aC6HIReYq/KGxFDqO7YMLYnxZgBwGY/ZwLgkFpNemAw/Ml5XgbZwI dwflyPmoNr6BJ2LDqqByBt2f4bVQFHisefkBNCa5UE6oLpf5TQeAvseAAQnN91ANbQuC zlRzWerfhlVfGORu2MXq2s5x7h6Fs5Cb3wFEL1l/QgxKc8By0r4cmjXI1haAgKW/M+YD Vfj/2eDdYdsSjj/TdlG/jjGw1bNCwPscbqb98717toopBGnvxHzgPOXMWM2M9oFXf+tw HCN5yj4VXMzfBkHJbBXa7IJZR9MZHk5ZcfmxqAWePdRx+JGHymgOx4fL9Gl87WcU7804 a/YQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=X+Y05Y7f; spf=pass (google.com: domain of fm-1212295-202411220548353e145e0537c4339d70-vwqxhf@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-202411220548353e145e0537c4339d70-VWqXhf@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1732254519; x=1732859319; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=B86dtcdM78NLgnQ8ggNDD/IGsOD5jRewG0olTFWXHj8=; b=J3cq+ocof5BDJetAhyaix8mi7FpsMBlmdkHDoCJvj/IptqZY07kB1/Pbu8jrxiCelG dqUt+oGk/JMm0ApLEKkrJ+Ogl2jCbs0G92a3XiYnnkapFUGJMJF1qHWzHB0NzqrFoq6u Qw4GdkWk+ZpXdO7NIdKcl0KAbNNAFQLP8eoSRZtHwpwUjglvDO5lFJwt0XsV7X0hpNy6 vI+W0LdVdZdALggpXIRYA6v8fmohj9vdcXp0wg7dVq7ud6qPpYTaEIiVYlxoV1HAZZuO Uw7U8yV3YxCxUw59qIGf0BaTBmrayXcBRgSLYAhWtyvYumaWMPWqgZ3X8QuPqCGaFLVq fP2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732254519; x=1732859319; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=B86dtcdM78NLgnQ8ggNDD/IGsOD5jRewG0olTFWXHj8=; b=D3H2vwlzXgDWOjlWdZeiOZX3KYL532DViAlApo+P2+TFO3V4Q791Hi/fRApF1Kv9BZ phyqym5s2hO3WBbZ649WQP8cpLYgBzP6x+FAGXVVBvqbUC8U1r59GdGvaU7mxYx7PDVc 3L4QUnoxKTWCtuSUkBZI5F0K9JAbu2wsiHzvoAin25/+hSOTT2vzrLNlaTAtcSMU66oC Fg3FVhBSZYiFl2WJVuht8WoD4MsVUEy2OAkdBvpkOvJBYXb3C6R/dPfEfOmkhYdvjDO1 1h0DEWVFAiwXlSFar6j8yFpSeZl7C98h0wfaVMafxuKDKY7rYM/etm3Aq9Gr9wEeM+3E lRWg== X-Forwarded-Encrypted: i=2; AJvYcCWkiuqjWlPkxqyHgGcxSld9fveIeFZTH0pYSa0RTZffdpbOD1jhzRtITHjjrTe2oF4vXwi9dMw=@isar-build.org X-Gm-Message-State: AOJu0YykVoZF6oZ0178f9n/AHOJ23Jp8WQRpGwvTcy9ORwnAKA49rmvL /2VHbE3HK9QH6xDAMlhHcCa2gHFG55KohpwqBE15LwsVP9oqL1Od X-Google-Smtp-Source: AGHT+IFasmD2+I+AVhuXpIY4p2f/1LfZA5Qvmno+zR6BULfSNKra1cJlxTKau50oKsB1OVfwEN2FwQ== X-Received: by 2002:a17:90b:380e:b0:2ea:bea2:dff3 with SMTP id 98e67ed59e1d1-2eb0e23243amr1767096a91.13.1732254519523; Thu, 21 Nov 2024 21:48:39 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90b:380d:b0:2ea:377d:5c8e with SMTP id 98e67ed59e1d1-2eaebc20711ls1450474a91.1.-pod-prod-08-us; Thu, 21 Nov 2024 21:48:38 -0800 (PST) X-Received: by 2002:a17:90b:4b4f:b0:2ea:4a6b:79d1 with SMTP id 98e67ed59e1d1-2eb0e2303efmr1895357a91.11.1732254518260; Thu, 21 Nov 2024 21:48:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732254518; cv=none; d=google.com; s=arc-20240605; b=Tn58s1PgSTIQTTcY+QW62zDVKYZy2VrPLivTGkocWPEq79nxzLKUXxF8fu/1GUXJmE qMgt2i1ejvP2NeJUdDQ7BTgCDp8am7eRxG0TwRhZE1iexb8ecyAwNetTSsdhCUvZdnB4 5p4ixRinCmYvAgS6gd4hu6J+EzUwJXijqXQZYm+U86xNYvG4Gl0mPfULgXRm+Jv+GqdX webYkOl+Jx+2L2ZnsB64pupeBPhSxTRwWhTegOpTs/CLfB0nZZ2+QqiXhNHfO6JSNu86 fYrKj4EM8RHvom+++jN+ChMF/gWTIw628iIF8ANj/oKlLtkvXSiJ1qeFfD2QDHTfcRvd 01FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=ZGzOY78SUuXcDSG7C02WWV0H8xbKp08xJLavXwJxxD4=; fh=1z37pEVhqwMLlkT4FDzOga7XBsM6Rzv6sXOq0pipxqo=; b=flWq8i4t4/fNQbQGVGmWmyZjYUfL0ArNbkslpsyC1I5uxK6SiEnySCAwuowYhxmGhe X9N0NrsxYdC1B/5XK6kfTCowmzfBjV/nbow18PLjAMwhx4fF8F7zlK0JYbYqB0izOBV2 pYMkAouI1afluk4N4j/+l859PBxwCO7wFq0QAqmW2oSIlzFVz435JdNelv2R9VW4TNOJ gAad4F49/tBw6bHFXFLC7egIr2jQsf3YZjkUbq8E2VIxCWUEDaVRG2zIWimRWuy1947K LrNJ8QbOHg+FPqeoMTEdckUAn9deUyzMWGAqFx6CrUSTqKmtq56fcuAwdq7kWv2WfEMM dAHg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=X+Y05Y7f; spf=pass (google.com: domain of fm-1212295-202411220548353e145e0537c4339d70-vwqxhf@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-202411220548353e145e0537c4339d70-VWqXhf@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net. [185.136.65.227]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-2eaca706015si559539a91.1.2024.11.21.21.48.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2024 21:48:38 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1212295-202411220548353e145e0537c4339d70-vwqxhf@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) client-ip=185.136.65.227; Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 202411220548353e145e0537c4339d70 for ; Fri, 22 Nov 2024 06:48:36 +0100 X-Patchwork-Original-From: "'Cedric Hombourger' via isar-users" From: "cedric.hombourger@siemens.com" To: isar-users@googlegroups.com Cc: Cedric Hombourger Subject: [PATCH 3/3] repository: make repo_contains_package query the package database Date: Fri, 22 Nov 2024 06:48:16 +0100 Message-Id: <20241122054816.3371334-4-cedric.hombourger@siemens.com> In-Reply-To: <20241122054816.3371334-1-cedric.hombourger@siemens.com> References: <20241122054816.3371334-1-cedric.hombourger@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1212295:519-21489:flowmailer X-Original-Sender: cedric.hombourger@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=X+Y05Y7f; spf=pass (google.com: domain of fm-1212295-202411220548353e145e0537c4339d70-vwqxhf@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-202411220548353e145e0537c4339d70-VWqXhf@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Cedric Hombourger Reply-To: Cedric Hombourger 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-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Debian package repositories (created/updated with dak) and reprepro repositories do not have the same file naming convention (e.g. the latter does not use Epoch). A full directory scan may also be expensive for large repositories: use reprepro listfilter to check for matching packages in the database. Signed-off-by: Cedric Hombourger --- meta/classes/repository.bbclass | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass index b20ec091..bc5852a5 100644 --- a/meta/classes/repository.bbclass +++ b/meta/classes/repository.bbclass @@ -98,7 +98,28 @@ repo_contains_package() { local file="$4" local package - package=$(find ${dir} -name ${file##*/}) + # Extract meta-data from the provided .deb file + package=$(dpkg-deb -f ${file} Package Version Architecture) + + # Output for each field is "Field: Value" + # odd indexes hold field names, even indexes hold values + set -- ${package} + + # lookup ${file} in the database for the current suite + package=$(reprepro -b ${dir} --dbdir ${dbdir} \ + --list-format '${$fullfilename}\n' \ + listfilter ${codename} ' + Package (= '${2}'), + Version (= '${4}'), + Architecture (= '${6}'), + $PackageType (= deb)') + + # we only need the first match (should there be more). Use shell builtins to avoid + # spawning an additional process (e.g. "head") + set -- ${package} + package="${1}" + + # package found in the database? if [ -n "$package" ]; then # yes cmp --silent "$package" "$file" && return 0