public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] [RFC] deb-dl-dir: Retry downloads 3 times for src files
@ 2022-01-19 12:55 Srinuvasan A
  2022-01-20 16:11 ` vijai kumar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Srinuvasan A @ 2022-01-19 12:55 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, Srinuvasan A

From: Srinuvasan A <srinuvasan_a@mentor.com>

Sometime the source packages are not downloaded successfully due to bad network,
hence the builds get fails with timeout issue

Added a retry mechanism to attempt multiple times before giving up.

Signed-off-by: Srinuvasan A <srinuvasan_a@mentor.com>
---
 meta/classes/deb-dl-dir.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index ffbff07..42542d7 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -57,7 +57,7 @@ debsrc_download() {
         [ -n "$dscfile" ] && continue
 
         sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \
-            sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"
+            sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y -o Acquire::Retries=3 --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"
     done
     ) 9>"${DEBSRCDIR}/${rootfs_distro}.lock"
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [RFC] deb-dl-dir: Retry downloads 3 times for src files
  2022-01-19 12:55 [PATCH] [RFC] deb-dl-dir: Retry downloads 3 times for src files Srinuvasan A
@ 2022-01-20 16:11 ` vijai kumar
  2022-01-21 15:36 ` Anton Mikanovich
  2022-01-27 15:02 ` Anton Mikanovich
  2 siblings, 0 replies; 4+ messages in thread
From: vijai kumar @ 2022-01-20 16:11 UTC (permalink / raw)
  To: Srinuvasan A; +Cc: isar-users, Jan Kiszka

On Wed, Jan 19, 2022 at 6:26 PM Srinuvasan A <Srinuvasan_A@mentor.com> wrote:
>
> From: Srinuvasan A <srinuvasan_a@mentor.com>
>
> Sometime the source packages are not downloaded successfully due to bad network,
> hence the builds get fails with timeout issue
>
> Added a retry mechanism to attempt multiple times before giving up.


If this is approved, we should probably include it for the upcoming
v0.8 release.

Thanks,
Vijai Kumar K

>
> Signed-off-by: Srinuvasan A <srinuvasan_a@mentor.com>
> ---
>  meta/classes/deb-dl-dir.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
> index ffbff07..42542d7 100644
> --- a/meta/classes/deb-dl-dir.bbclass
> +++ b/meta/classes/deb-dl-dir.bbclass
> @@ -57,7 +57,7 @@ debsrc_download() {
>          [ -n "$dscfile" ] && continue
>
>          sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \
> -            sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"
> +            sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y -o Acquire::Retries=3 --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"
>      done
>      ) 9>"${DEBSRCDIR}/${rootfs_distro}.lock"
>
> --
> 2.25.1
>
> --
> 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 on the web visit https://groups.google.com/d/msgid/isar-users/20220119125537.1734102-1-Srinuvasan_A%40mentor.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [RFC] deb-dl-dir: Retry downloads 3 times for src files
  2022-01-19 12:55 [PATCH] [RFC] deb-dl-dir: Retry downloads 3 times for src files Srinuvasan A
  2022-01-20 16:11 ` vijai kumar
@ 2022-01-21 15:36 ` Anton Mikanovich
  2022-01-27 15:02 ` Anton Mikanovich
  2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2022-01-21 15:36 UTC (permalink / raw)
  To: Srinuvasan A, isar-users; +Cc: jan.kiszka, vijaikumar....@gmail.com

19.01.2022 15:55, Srinuvasan A wrote:
> From: Srinuvasan A <srinuvasan_a@mentor.com>
>
> Sometime the source packages are not downloaded successfully due to bad network,
> hence the builds get fails with timeout issue
>
> Added a retry mechanism to attempt multiple times before giving up.
>
> Signed-off-by: Srinuvasan A <srinuvasan_a@mentor.com>
> ---
>   meta/classes/deb-dl-dir.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
> index ffbff07..42542d7 100644
> --- a/meta/classes/deb-dl-dir.bbclass
> +++ b/meta/classes/deb-dl-dir.bbclass
> @@ -57,7 +57,7 @@ debsrc_download() {
>           [ -n "$dscfile" ] && continue
>   
>           sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \
> -            sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"
> +            sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y -o Acquire::Retries=3 --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"
>       done
>       ) 9>"${DEBSRCDIR}/${rootfs_distro}.lock"
>   

Looks good, we can apply it next week even without resending as a 
[PATCH] if no objection.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [RFC] deb-dl-dir: Retry downloads 3 times for src files
  2022-01-19 12:55 [PATCH] [RFC] deb-dl-dir: Retry downloads 3 times for src files Srinuvasan A
  2022-01-20 16:11 ` vijai kumar
  2022-01-21 15:36 ` Anton Mikanovich
@ 2022-01-27 15:02 ` Anton Mikanovich
  2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2022-01-27 15:02 UTC (permalink / raw)
  To: Srinuvasan A, isar-users; +Cc: jan.kiszka

19.01.2022 15:55, Srinuvasan A wrote:
> From: Srinuvasan A <srinuvasan_a@mentor.com>
>
> Sometime the source packages are not downloaded successfully due to bad network,
> hence the builds get fails with timeout issue
>
> Added a retry mechanism to attempt multiple times before giving up.
>
> Signed-off-by: Srinuvasan A <srinuvasan_a@mentor.com>
> ---
>   meta/classes/deb-dl-dir.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
> index ffbff07..42542d7 100644
> --- a/meta/classes/deb-dl-dir.bbclass
> +++ b/meta/classes/deb-dl-dir.bbclass
> @@ -57,7 +57,7 @@ debsrc_download() {
>           [ -n "$dscfile" ] && continue
>   
>           sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \
> -            sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"
> +            sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y -o Acquire::Retries=3 --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}"
>       done
>       ) 9>"${DEBSRCDIR}/${rootfs_distro}.lock"
>   

Applied to next, thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-27 15:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19 12:55 [PATCH] [RFC] deb-dl-dir: Retry downloads 3 times for src files Srinuvasan A
2022-01-20 16:11 ` vijai kumar
2022-01-21 15:36 ` Anton Mikanovich
2022-01-27 15:02 ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox