From patchwork Sat Nov 16 17:28:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "srinuvasan.a" X-Patchwork-Id: 3945 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sat, 16 Nov 2024 18:21:35 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-yb1-f189.google.com (mail-yb1-f189.google.com [209.85.219.189]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AGHLYIb016141 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 16 Nov 2024 18:21:34 +0100 Received: by mail-yb1-f189.google.com with SMTP id 3f1490d57ef6-e388c4bd92bsf223835276.1 for ; Sat, 16 Nov 2024 09:21:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731777688; cv=pass; d=google.com; s=arc-20240605; b=UeItabj2AQpm3XmRtpCWJ09TPYm1aFDUTzY/9sCO6DtaB9T7IuM7tvcy47GQGafI7R jiGoMcMbsZ92e+w3+2WOzFoWOAtcNMxCtXuek6rd9PzZKa98SXF08mB2/G5uDXe66CpV AqhxafI2ZNE8/+Dla60ZXHxCwPWJK5DOvAQ6yVE/kMtfzJsJbnfUBu5A5lXjX7jJo6Hn cwEq4kZBfwudNpPJq7T9TDFNWOHacLW7+d1n33Hc1Rs1k1cKY/PvsjkfJoA2+JzGxGfV Bu2CvycZcHuxJy0czyWVJ4eB0qBq/esmqbM6aNIX7MFVlA4j9mtx5yElKdNnKnnDtK1+ 2Uvw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=f1ne3lFK2qIAGz59Zp7yL8dS/ZGxbiKa8CWGX0xOgsg=; fh=PJi4zFfHkQcluuDr6lmr/bQsSYaZ7FHMUVpk72hRM64=; b=hUSwODxrbVKJaoMcKcejsYCOa4uYRDaVJ1w3xMozqIS3hQSc5Zi3GKRl7kIlEmqcvR 3KDiskIUV1wjWH4PIpc/OPChiZhItJ8ZgFCN/r3tzkdOfo9iLAU5g6MKDj6XE1Phz+t9 FaaJE12PUUYAtDsLsTo02fRUMgzxfoBsbUPqxfTf4t4UObMU8P6JUTcs6T0p5/j7v+R1 PzA22axK5c06DIRGr6p9LAaU30/j4d4NrzR2nJRIbYbhWM2ND6AUrifJBr/TYDI5HTNS nGb7gvfUdFq0w2G0cuP3BS5UZ1Wmys7PTP8BIA+0dZPPkink3ZLQ5sry1zK/pPJQcBqQ Fikw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=YQo3M9Ng; spf=pass (google.com: domain of fm-1324425-20241116172125676f3c8ce600d8d026-otbtqn@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1324425-20241116172125676f3c8ce600d8d026-OTbtqn@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=1731777688; x=1732382488; 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:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=f1ne3lFK2qIAGz59Zp7yL8dS/ZGxbiKa8CWGX0xOgsg=; b=aHWufjJhc0EkqKbbgLLQL8DfNvhuR/9qjP4/J2uA/tQP093O/YnVkyQnlRX9+c8Pt8 5S6sifItIwEb1FVbsyB1/dqpeTTtTH+buq9bzwydzwAPyDXVbXFzOSGdMP8XXJmVYcoG fEdqcQ4fmoyTpOPX4fMZcdsaADT4plyTxcqtpa+M4G8i4/b0nXKa/W1OJ1UuNeffL0rn z50PZtaIf95dnC3KbZKk5LYrOV+/QlcWNZFLYvLpanZdfoFlqCcf+wkbkuJgFoW4/8nB 2yFv3y6+MEKAtcRoaGmLSbGEIllv78pJKFdC4sGXgmQWXhuxMWY7PQZctQN5uFR2v476 9LNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731777688; x=1732382488; 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:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f1ne3lFK2qIAGz59Zp7yL8dS/ZGxbiKa8CWGX0xOgsg=; b=lMi+YaTCsuzjBgMPjHHqECu3Hb8Y3i58dYMHU5vD29qtQCa4KRzJK4iejJMFlyLi/0 WXfd7mQWMlwvv61nNi0RnxKqHdpqFdIrOuHxEgzJMpO169eXN4v4B6sBwWRBSeYZNCm2 dhFxBD0zTImWQDzLLqZN0IRPi1CPPESBKix6mRS2TlBAkY4NpO5RytacIcwsc9YWjgxu PrpHKCJbcOxWOjkb8DvJ+3HzXrbIQcf8cWBOD1IvUFAxITRdeXd7Ax68MoOKzFTmel1w E9PFoHsUHpLGkjv4VD5Q+BgUseYYKC4gFVK4xARdpBg6HNYfnkPeXozXKR3C7uw8iyUP iUtQ== X-Forwarded-Encrypted: i=2; AJvYcCV9SBz0BUnNDBz0DQx4VVKbqAqevx6xys007H3EycgAbweS/9JOs1uGumWk4LCA3UsTK7+jJg0=@isar-build.org X-Gm-Message-State: AOJu0Yw5xIHRA7qQWlIT8KH1y7kijTifzjn8wrfmP3bDOwbTzWFI5C8f 8OXs4neFTJ3Hh9q8mVWaKmHD99ib9qBJcQ8l3mpoGLzUOPuYwtMv X-Google-Smtp-Source: AGHT+IGKfeXiVbsLY5FRu8buYl1KYoV/iC1nXxOb4e/X5WFYGMp5euPlLgSk1kngJMTx3r6GDLohow== X-Received: by 2002:a05:6902:1b90:b0:e29:2ce1:6eb with SMTP id 3f1490d57ef6-e382612cf05mr5230458276.21.1731777688415; Sat, 16 Nov 2024 09:21:28 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5b:c4a:0:b0:e35:de95:59d5 with SMTP id 3f1490d57ef6-e387e8423c9ls790440276.1.-pod-prod-05-us; Sat, 16 Nov 2024 09:21:27 -0800 (PST) X-Received: by 2002:a05:690c:46c4:b0:6ea:ebba:3059 with SMTP id 00721157ae682-6ee558d9384mr73924537b3.0.1731777687274; Sat, 16 Nov 2024 09:21:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731777687; cv=none; d=google.com; s=arc-20240605; b=PV4dtyEpCckeiGDybAM9YAxguzZcoX9tbSdYJn7HKI2ZFyHHn3B7tPIy3XhRHa1+G0 4T6wmn4BMO2oNng6NdANPITmq7cnPx1n8sNkTWyOBXALffHMQPsgqLZiLZAuH8B4q9Db q+aZU7OrSfXsrsxtxClZzUn9sSrTP/EfF1hTK0T+4Y3T1rAxNAUpbTgAq06WKRztQFXx 4gRF2SdsxPXgIZsP/uTCmsOMegofxKyQJUqi5tZ3ymDI7DtJxQGujwhgItuSi+p49q/9 ER1bvQKLgDLVZZ12AQyD2+Ly2Pb8VgNdB1iiUfydPpCCr6tCO+QL0ywwC1ZhaiMZ4IC1 H1RQ== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=9qI80crVGIS5a1SoQd19n1v5aTXBU5YIcAP5DocOGbY=; fh=igWmETGOvedG5K4n7Hi/ZweMTE14AVmQQZ15AkDCNIA=; b=hNMYsl9fRaKdOIrYe8uS0iADO8yiSG2Kd6WptMpwy2N4vnBQ4JkBrNyiqWvR83BtRA njv+gvIL7q+87MrO3kI/fo8jtjGNihSfL9Jos4eES07uXapL+OQqHNPB9JzN7Awb6iop t6sx+nAbTla+HDsec+j7YPP+yEC+Qdqf5/cD3QSP0memakztX7eTeGlF12pXKomaZ3xJ YbAZixDyaqKg7xbksY9NU4cjI5Hzxj8BA+WN1lbaxdSyRcBUAaob24LsxhOKhZXmckjZ sjQawJKPk0a9chUPfoTNk1FgS+67+EmzzxR9TUYDCLCkoATREOpiDvnRRfQ14Q8tD0dS 3NNg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=YQo3M9Ng; spf=pass (google.com: domain of fm-1324425-20241116172125676f3c8ce600d8d026-otbtqn@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1324425-20241116172125676f3c8ce600d8d026-OTbtqn@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 00721157ae682-6ee7133c0f3si1414127b3.2.2024.11.16.09.21.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2024 09:21:27 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1324425-20241116172125676f3c8ce600d8d026-otbtqn@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 20241116172125676f3c8ce600d8d026 for ; Sat, 16 Nov 2024 18:21:25 +0100 X-Patchwork-Original-From: "srinuvasan.a via isar-users" From: "srinuvasan.a" To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, cedric.hombourger@siemens.com, srinuvasan Subject: [PATCH] classes/repository: use the proper filename to find the packages under repo Date: Sat, 16 Nov 2024 22:58:59 +0530 Message-Id: <20241116172900.897898-1-srinuvasan.a@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1324425:519-21489:flowmailer X-Original-Sender: srinuvasan.a@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=YQo3M9Ng; spf=pass (google.com: domain of fm-1324425-20241116172125676f3c8ce600d8d026-otbtqn@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1324425-20241116172125676f3c8ce600d8d026-OTbtqn@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: srinuvasan.a@siemens.com Reply-To: srinuvasan.a@siemens.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-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?= From: srinuvasan The very first time when we generate the base-apt the REPO_BASE_DIR is empty, it doesn't contain any packages, hence repo_contains_package function returns 2, based on the return value (2), we are adding all the packages to the empty repo by calling the repo_add_packages function. After clearing the temporary and cache files, when we retrigger the base-apt we should skip the repo_add_packages function for all the packages (assume that repo packages are not contaminated), but we observed repo_contains_function says some of the packages not available in the existing repo, but really those packages available in the repo. Here the issue is, reprepro caching all the packages by skipping the epoch version if any packages have, and all the packages contain only the -. But in the download folder , few packages contain the epoch version, f.e: automake, git-man, ssh, now we try to find the packages with epoch version in APT repo, but APT repos skip the epoch version during repo generation. With that wrong finding again we are calling the repo_add_package function for few packages, even those packages already available in the repo. Skip the epoch version during finding the packages in the repo, with that we can eliminate unnecessarily adding the packages to repo. Signed-off-by: srinuvasan --- meta/classes/repository.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass index 28e712fd..7379658d 100644 --- a/meta/classes/repository.bbclass +++ b/meta/classes/repository.bbclass @@ -99,7 +99,8 @@ repo_contains_package() { local file="$2" local package - package=$(find ${dir} -name ${file##*/}) + file_name=$(echo "${file##*/}" | sed 's/[0-9]%3a//g') + package=$(find ${dir} -name ${file_name}) if [ -n "$package" ]; then # yes cmp --silent "$package" "$file" && return 0