From: Uladzimir Bely <ubely@ilbers.de>
To: srinuvasan.a@siemens.com, isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, cedric.hombourger@siemens.com
Subject: Re: [PATCH v2] classes/repository: use the proper filename to find the packages under repo
Date: Wed, 20 Nov 2024 09:05:46 +0300 [thread overview]
Message-ID: <47c5e76990ba95e85e07df4542d3aa74e6e002f3.camel@ilbers.de> (raw)
In-Reply-To: <20241117154515.906833-1-srinuvasan.a@siemens.com>
On Sun, 2024-11-17 at 21:15 +0530, srinuvasan.a via isar-users wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
>
> This patch fixes the issue in repo_contians_package function, here we
> are adding a few packages to repo again even though the repo already
> contains those
> packages, ideally we should skip those
>
> reproduce the issue:
>
> 1. Create the base-apt
> 2. Again retrigger the base-apt (assume that there is no changes in
> the previously built base-apt)
>
> here we observed few packages getting added again to the APT, even
> those
> packages already available in the repo.
>
> Basically few packages having the epoch version (automake, git-man,
> ssh) in the download folder,
> but the same packages are cached in the repo without the epoch
> version, due to this
> mismatch, it tries to add the packages again into the repo, to fix
> this issue,
> just find the package name in the repo without the epoch version.
>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
> 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')
Not sure if epoch versions more than 9 exist for some packages, but I
would add '\+' here to consider big epoch numbers:
```
$ echo git-man_1%3a2.39.5-0+deb12u1_all.deb | sed 's/[0-9]%3a//g'
git-man_2.39.5-0+deb12u1_all.deb
$ echo git-man_10%3a2.39.5-0+deb12u1_all.deb | sed 's/[0-9]%3a//g'
git-man_12.39.5-0+deb12u1_all.deb
$ echo git-man_10%3a2.39.5-0+deb12u1_all.deb | sed 's/[0-9]\+%3a//g'
git-man_2.39.5-0+deb12u1_all.deb
```
> + package=$(find ${dir} -name ${file_name})
> if [ -n "$package" ]; then
> # yes
> cmp --silent "$package" "$file" && return 0
> --
> 2.34.1
>
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/47c5e76990ba95e85e07df4542d3aa74e6e002f3.camel%40ilbers.de.
next prev parent reply other threads:[~2024-11-20 6:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 17:28 [PATCH] " srinuvasan.a via isar-users
2024-11-16 17:38 ` 'cedric.hombourger@siemens.com' via isar-users
2024-11-16 23:54 ` 'cedric.hombourger@siemens.com' via isar-users
2024-11-17 7:10 ` 'Arjunan, Srinu' via isar-users
2024-11-17 15:45 ` [PATCH v2] " srinuvasan.a via isar-users
2024-11-20 6:05 ` Uladzimir Bely [this message]
2024-11-20 9:32 ` [PATCH v3] " srinuvasan.a via isar-users
2024-11-27 7:25 ` Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47c5e76990ba95e85e07df4542d3aa74e6e002f3.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=cedric.hombourger@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=srinuvasan.a@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox