Github messages for voidlinux
 help / color / mirror / Atom feed
* Re: [PR PATCH] [Updated] update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
  2019-05-09  8:09 ` [PR PATCH] [Updated] update-check: download each url once voidlinux-github
@ 2019-05-09  8:09 ` voidlinux-github
  2019-05-09  8:11 ` voidlinux-github
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-05-09  8:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

There is an updated pull request by Chocimier against master on the void-packages repository

https://github.com/Chocimier/void-packages-org update-check-fetch-once
https://github.com/void-linux/void-packages/pull/6395

update-check: download each url once
Speed up for packages with multiple downloads from same location or having homepage and distfiles at gitlab or github.

A patch file from https://github.com/void-linux/void-packages/pull/6395.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update-check-fetch-once-6395.patch --]
[-- Type: application/text/x-diff, Size: 3179 bytes --]

From 484e149902b1a7a2c6994e344000f989f796fdc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Ey=C3=9Fer?= <daniel.eysser@gmail.com>
Date: Tue, 7 May 2019 22:34:47 +0200
Subject: [PATCH 1/2] bash-completion: update to 2.9.

---
 srcpkgs/bash-completion/template | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/bash-completion/template b/srcpkgs/bash-completion/template
index 170f231408f..01ecdd0a726 100644
--- a/srcpkgs/bash-completion/template
+++ b/srcpkgs/bash-completion/template
@@ -1,6 +1,6 @@
 # Template file for 'bash-completion'
 pkgname=bash-completion
-version=2.8
+version=2.9
 revision=1
 archs=noarch
 build_style=gnu-configure
@@ -11,10 +11,5 @@ short_desc="Programmable completion for the GNU Bash shell"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/scop/bash-completion"
-distfiles="${homepage}/releases/download/${version}/bash-completion-${version}.tar.xz"
-checksum=c01f5570f5698a0dda8dc9cfb2a83744daa1ec54758373a6e349bd903375f54d
-
-post_install() {
-	# remove completions provided by util-linux.
-	rm -f ${DESTDIR}/usr/share/bash-completion/completions/{{u,}mount*,rfkill}
-}
+distfiles="https://github.com/scop/bash-completion/releases/download/${version}/bash-completion-${version}.tar.xz"
+checksum=d48fe378e731062f479c5f8802ffa9d3c40a275a19e6e0f6f6cc4b90fa12b2f5

From 732b66d858e25ae8cf1c09c7d4b470110a98249d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Mon, 31 Dec 2018 12:34:10 +0100
Subject: [PATCH 2/2] update-check: download each url once

---
 common/xbps-src/shutils/update_check.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index ef88bd5f4a4..61caedd053a 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -4,7 +4,7 @@ update_check() {
     local i p url sfname lpname bbname githubname rx found_version consider
     local update_override=$XBPS_SRCPKGDIR/$XBPS_TARGET_PKG/update
     local original_pkgname=$pkgname
-    local urlpfx urlsfx
+    local urlpfx urlsfx fetchedurls
 
     if [ -r $update_override ]; then
         . $update_override
@@ -103,11 +103,19 @@ update_check() {
         rx=${pattern:-$rx}
         rx=${rx:-'(?<!-)\b\Q'"$pkgname"'\E[-_]?((src|source)[-_])?\K([^-/_\s]*?\d[^-/_\s]*?)(?=(?:[-_.](?:src|source|orig))?\.(?:[jt]ar|shar|t[bglx]z|tbz2|zip))\b'}
 
+        if printf '%s' "$fetchedurls" | grep -qFx "$url"; then
+            if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
+                echo "already fetched $url" 1>&2
+            fi
+            continue
+        fi
+
         if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
             echo "fetching $url" 1>&2
         fi
         curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
             grep -Po -i "$rx"
+        fetchedurls="$(printf '%s\n%s' "$fetchedurls" "$url")"
     done |
     tr _ . |
     sort -Vu |

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

* Re: [PR PATCH] [Updated] update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
@ 2019-05-09  8:09 ` voidlinux-github
  2019-05-09  8:09 ` voidlinux-github
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-05-09  8:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

There is an updated pull request by Chocimier against master on the void-packages repository

https://github.com/Chocimier/void-packages-org update-check-fetch-once
https://github.com/void-linux/void-packages/pull/6395

update-check: download each url once
Speed up for packages with multiple downloads from same location or having homepage and distfiles at gitlab or github.

A patch file from https://github.com/void-linux/void-packages/pull/6395.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update-check-fetch-once-6395.patch --]
[-- Type: application/text/x-diff, Size: 3179 bytes --]

From 484e149902b1a7a2c6994e344000f989f796fdc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Ey=C3=9Fer?= <daniel.eysser@gmail.com>
Date: Tue, 7 May 2019 22:34:47 +0200
Subject: [PATCH 1/2] bash-completion: update to 2.9.

---
 srcpkgs/bash-completion/template | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/bash-completion/template b/srcpkgs/bash-completion/template
index 170f231408f..01ecdd0a726 100644
--- a/srcpkgs/bash-completion/template
+++ b/srcpkgs/bash-completion/template
@@ -1,6 +1,6 @@
 # Template file for 'bash-completion'
 pkgname=bash-completion
-version=2.8
+version=2.9
 revision=1
 archs=noarch
 build_style=gnu-configure
@@ -11,10 +11,5 @@ short_desc="Programmable completion for the GNU Bash shell"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/scop/bash-completion"
-distfiles="${homepage}/releases/download/${version}/bash-completion-${version}.tar.xz"
-checksum=c01f5570f5698a0dda8dc9cfb2a83744daa1ec54758373a6e349bd903375f54d
-
-post_install() {
-	# remove completions provided by util-linux.
-	rm -f ${DESTDIR}/usr/share/bash-completion/completions/{{u,}mount*,rfkill}
-}
+distfiles="https://github.com/scop/bash-completion/releases/download/${version}/bash-completion-${version}.tar.xz"
+checksum=d48fe378e731062f479c5f8802ffa9d3c40a275a19e6e0f6f6cc4b90fa12b2f5

From 732b66d858e25ae8cf1c09c7d4b470110a98249d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Mon, 31 Dec 2018 12:34:10 +0100
Subject: [PATCH 2/2] update-check: download each url once

---
 common/xbps-src/shutils/update_check.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index ef88bd5f4a4..61caedd053a 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -4,7 +4,7 @@ update_check() {
     local i p url sfname lpname bbname githubname rx found_version consider
     local update_override=$XBPS_SRCPKGDIR/$XBPS_TARGET_PKG/update
     local original_pkgname=$pkgname
-    local urlpfx urlsfx
+    local urlpfx urlsfx fetchedurls
 
     if [ -r $update_override ]; then
         . $update_override
@@ -103,11 +103,19 @@ update_check() {
         rx=${pattern:-$rx}
         rx=${rx:-'(?<!-)\b\Q'"$pkgname"'\E[-_]?((src|source)[-_])?\K([^-/_\s]*?\d[^-/_\s]*?)(?=(?:[-_.](?:src|source|orig))?\.(?:[jt]ar|shar|t[bglx]z|tbz2|zip))\b'}
 
+        if printf '%s' "$fetchedurls" | grep -qFx "$url"; then
+            if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
+                echo "already fetched $url" 1>&2
+            fi
+            continue
+        fi
+
         if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
             echo "fetching $url" 1>&2
         fi
         curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
             grep -Po -i "$rx"
+        fetchedurls="$(printf '%s\n%s' "$fetchedurls" "$url")"
     done |
     tr _ . |
     sort -Vu |

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

* Re: [PR PATCH] [Updated] update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
  2019-05-09  8:09 ` [PR PATCH] [Updated] update-check: download each url once voidlinux-github
  2019-05-09  8:09 ` voidlinux-github
@ 2019-05-09  8:11 ` voidlinux-github
  2019-06-01 18:58 ` voidlinux-github
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-05-09  8:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

There is an updated pull request by Chocimier against master on the void-packages repository

https://github.com/Chocimier/void-packages-org update-check-fetch-once
https://github.com/void-linux/void-packages/pull/6395

update-check: download each url once
Speed up for packages with multiple downloads from same location or having homepage and distfiles at gitlab or github.

A patch file from https://github.com/void-linux/void-packages/pull/6395.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update-check-fetch-once-6395.patch --]
[-- Type: application/text/x-diff, Size: 1781 bytes --]

From ea8112b11c686b5d1b7beb46c86298ad323e0af3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Mon, 31 Dec 2018 12:34:10 +0100
Subject: [PATCH] update-check: download each url once

---
 common/xbps-src/shutils/update_check.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index ef88bd5f4a4..61caedd053a 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -4,7 +4,7 @@ update_check() {
     local i p url sfname lpname bbname githubname rx found_version consider
     local update_override=$XBPS_SRCPKGDIR/$XBPS_TARGET_PKG/update
     local original_pkgname=$pkgname
-    local urlpfx urlsfx
+    local urlpfx urlsfx fetchedurls
 
     if [ -r $update_override ]; then
         . $update_override
@@ -103,11 +103,19 @@ update_check() {
         rx=${pattern:-$rx}
         rx=${rx:-'(?<!-)\b\Q'"$pkgname"'\E[-_]?((src|source)[-_])?\K([^-/_\s]*?\d[^-/_\s]*?)(?=(?:[-_.](?:src|source|orig))?\.(?:[jt]ar|shar|t[bglx]z|tbz2|zip))\b'}
 
+        if printf '%s' "$fetchedurls" | grep -qFx "$url"; then
+            if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
+                echo "already fetched $url" 1>&2
+            fi
+            continue
+        fi
+
         if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
             echo "fetching $url" 1>&2
         fi
         curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
             grep -Po -i "$rx"
+        fetchedurls="$(printf '%s\n%s' "$fetchedurls" "$url")"
     done |
     tr _ . |
     sort -Vu |

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

* Re: update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
                   ` (2 preceding siblings ...)
  2019-05-09  8:11 ` voidlinux-github
@ 2019-06-01 18:58 ` voidlinux-github
  2019-06-01 18:59 ` voidlinux-github
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-06-01 18:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/6395#issuecomment-497969538
Comment:
I just now stumbled across this PR. Since `xbps-src` expects `bash` I think you could simplify the code by using an associative array of URLs. Something along the lines:
```
local -A fetchedurls
…
        if [ "${fechedurls[$url]}" = "ok" ]; then
            if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
                echo "already fetched $url" 1>&2
            fi
            continue
        fi
        …
        fetchedurls[$url]="ok"
```

You could this way even store an error state and report that on a second try for the same `$url`.

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

* Re: update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
                   ` (3 preceding siblings ...)
  2019-06-01 18:58 ` voidlinux-github
@ 2019-06-01 18:59 ` voidlinux-github
  2019-06-01 19:01 ` voidlinux-github
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-06-01 18:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 740 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/6395#issuecomment-497969538
Comment:
I just now stumbled across this PR. Since `xbps-src` expects `bash` I think you could simplify the code by using an associative array of URLs. Something along the lines:
```
local -A fetchedurls
…
        if [ "${fechedurls[$url]}" = "ok" ]; then
            if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
                echo "already fetched $url" 1>&2
            fi
            continue
        fi
        …
        fetchedurls[$url]="ok"
```

You could this way even store an error state (e.g. wrong or missing checksum) and report that on a second try for the same `$url`.

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

* Re: update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
                   ` (4 preceding siblings ...)
  2019-06-01 18:59 ` voidlinux-github
@ 2019-06-01 19:01 ` voidlinux-github
  2019-06-11 20:11 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-06-01 19:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/6395#issuecomment-497969538
Comment:
I just now stumbled across this PR. Since `xbps-src` expects `bash` I think you could simplify the code by using an associative array of URLs. Something along the lines:
```
local -A fetchedurls
…
        if [ "${fechedurls[$url]}" = "ok" ]; then
            if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
                echo "already fetched $url" 1>&2
            fi
            continue
        fi
        …
        fetchedurls[$url]="ok"
```

You could this way even store an error state (e.g. bad domain name, non-transient resolver error) and report that on a second try for the same `$url`.

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

* Re: [PR PATCH] [Updated] update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
                   ` (5 preceding siblings ...)
  2019-06-01 19:01 ` voidlinux-github
@ 2019-06-11 20:11 ` voidlinux-github
  2019-06-11 20:11 ` voidlinux-github
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-06-11 20:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

There is an updated pull request by Chocimier against master on the void-packages repository

https://github.com/Chocimier/void-packages-org update-check-fetch-once
https://github.com/void-linux/void-packages/pull/6395

update-check: download each url once
Speed up for packages with multiple downloads from same location or having homepage and distfiles at gitlab or github.

A patch file from https://github.com/void-linux/void-packages/pull/6395.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update-check-fetch-once-6395.patch --]
[-- Type: application/text/x-diff, Size: 1624 bytes --]

From f6dc1f0a5bcbaa426419263819592db2d03386bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Mon, 31 Dec 2018 12:34:10 +0100
Subject: [PATCH] update-check: download each url once

---
 common/xbps-src/shutils/update_check.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index e2cdee3d0fc..445600a2fe9 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -5,6 +5,7 @@ update_check() {
     local update_override=$XBPS_SRCPKGDIR/$XBPS_TARGET_PKG/update
     local original_pkgname=$pkgname
     local urlpfx urlsfx
+    local -A fetchedurls
 
     if [ -r $update_override ]; then
         . $update_override
@@ -138,11 +139,19 @@ update_check() {
         rx=${pattern:-$rx}
         rx=${rx:-'(?<!-)\b\Q'"$pkgname"'\E[-_]?((src|source)[-_])?\K([^-/_\s]*?\d[^-/_\s]*?)(?=(?:[-_.](?:src|source|orig))?\.(?:[jt]ar|shar|t[bglx]z|tbz2|zip))\b'}
 
+        if [ "${fetchedurls[$url]}" ]; then
+            if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
+                echo "already fetched $url" 1>&2
+            fi
+            continue
+        fi
+
         if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
             echo "fetching $url" 1>&2
         fi
         curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
             grep -Po -i "$rx"
+        fetchedurls[$url]=yes
     done |
     tr _ . |
     sort -Vu |

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

* Re: [PR PATCH] [Updated] update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
                   ` (6 preceding siblings ...)
  2019-06-11 20:11 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 20:11 ` voidlinux-github
  2019-06-11 20:15 ` voidlinux-github
  2019-06-12 16:06 ` [PR PATCH] [Merged]: " voidlinux-github
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-06-11 20:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

There is an updated pull request by Chocimier against master on the void-packages repository

https://github.com/Chocimier/void-packages-org update-check-fetch-once
https://github.com/void-linux/void-packages/pull/6395

update-check: download each url once
Speed up for packages with multiple downloads from same location or having homepage and distfiles at gitlab or github.

A patch file from https://github.com/void-linux/void-packages/pull/6395.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update-check-fetch-once-6395.patch --]
[-- Type: application/text/x-diff, Size: 1624 bytes --]

From f6dc1f0a5bcbaa426419263819592db2d03386bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Mon, 31 Dec 2018 12:34:10 +0100
Subject: [PATCH] update-check: download each url once

---
 common/xbps-src/shutils/update_check.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index e2cdee3d0fc..445600a2fe9 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -5,6 +5,7 @@ update_check() {
     local update_override=$XBPS_SRCPKGDIR/$XBPS_TARGET_PKG/update
     local original_pkgname=$pkgname
     local urlpfx urlsfx
+    local -A fetchedurls
 
     if [ -r $update_override ]; then
         . $update_override
@@ -138,11 +139,19 @@ update_check() {
         rx=${pattern:-$rx}
         rx=${rx:-'(?<!-)\b\Q'"$pkgname"'\E[-_]?((src|source)[-_])?\K([^-/_\s]*?\d[^-/_\s]*?)(?=(?:[-_.](?:src|source|orig))?\.(?:[jt]ar|shar|t[bglx]z|tbz2|zip))\b'}
 
+        if [ "${fetchedurls[$url]}" ]; then
+            if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
+                echo "already fetched $url" 1>&2
+            fi
+            continue
+        fi
+
         if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
             echo "fetching $url" 1>&2
         fi
         curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
             grep -Po -i "$rx"
+        fetchedurls[$url]=yes
     done |
     tr _ . |
     sort -Vu |

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

* Re: update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
                   ` (7 preceding siblings ...)
  2019-06-11 20:11 ` voidlinux-github
@ 2019-06-11 20:15 ` voidlinux-github
  2019-06-12 16:06 ` [PR PATCH] [Merged]: " voidlinux-github
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-06-11 20:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 273 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/6395#issuecomment-501005337
Comment:
Agreed, associative array is good idea here. However as errors aren't printed on first try, printing on second try would be strange.

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

* Re: [PR PATCH] [Merged]: update-check: download each url once
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
                   ` (8 preceding siblings ...)
  2019-06-11 20:15 ` voidlinux-github
@ 2019-06-12 16:06 ` voidlinux-github
  9 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-06-12 16:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

There's a merged pull request on the void-packages repository

update-check: download each url once
https://github.com/void-linux/void-packages/pull/6395
Description: Speed up for packages with multiple downloads from same location or having homepage and distfiles at gitlab or github.

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

end of thread, other threads:[~2019-06-12 16:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>
2019-05-09  8:09 ` [PR PATCH] [Updated] update-check: download each url once voidlinux-github
2019-05-09  8:09 ` voidlinux-github
2019-05-09  8:11 ` voidlinux-github
2019-06-01 18:58 ` voidlinux-github
2019-06-01 18:59 ` voidlinux-github
2019-06-01 19:01 ` voidlinux-github
2019-06-11 20:11 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-11 20:11 ` voidlinux-github
2019-06-11 20:15 ` voidlinux-github
2019-06-12 16:06 ` [PR PATCH] [Merged]: " voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).