Github messages for voidlinux
 help / 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 ` voidlinux-github
  2019-05-09  8:11 ` voidlinux-github
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ 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

[-- Attachment #2: github-pr-update-check-fetch-once-6395.patch --]
[-- Type: application/text/x-diff, Size: 3179 bytes --]

^ permalink raw reply	[flat|nested] 8+ 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:11 ` voidlinux-github
  2019-06-01 18:58 ` voidlinux-github
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ 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

[-- Attachment #2: github-pr-update-check-fetch-once-6395.patch --]
[-- Type: application/text/x-diff, Size: 1781 bytes --]

^ permalink raw reply	[flat|nested] 8+ 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>
  2019-05-09  8:09 ` [PR PATCH] [Updated] update-check: download each url once voidlinux-github
  2019-05-09  8:11 ` voidlinux-github
@ 2019-06-01 18:58 ` voidlinux-github
  2019-06-01 18:59 ` voidlinux-github
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ 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] 8+ 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-06-01 18:58 ` voidlinux-github
@ 2019-06-01 18:59 ` voidlinux-github
  2019-06-01 19:01 ` voidlinux-github
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ 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] 8+ 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:59 ` voidlinux-github
@ 2019-06-01 19:01 ` voidlinux-github
  2019-06-11 20:11 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ 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] 8+ 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>
                   ` (4 preceding siblings ...)
  2019-06-01 19:01 ` 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
  7 siblings, 0 replies; 8+ 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

[-- Attachment #2: github-pr-update-check-fetch-once-6395.patch --]
[-- Type: application/text/x-diff, Size: 1624 bytes --]

^ permalink raw reply	[flat|nested] 8+ 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>
                   ` (5 preceding siblings ...)
  2019-06-11 20:11 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-06-11 20:15 ` voidlinux-github
  2019-06-12 16:06 ` [PR PATCH] [Merged]: " voidlinux-github
  7 siblings, 0 replies; 8+ 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] 8+ 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>
                   ` (6 preceding siblings ...)
  2019-06-11 20:15 ` voidlinux-github
@ 2019-06-12 16:06 ` " voidlinux-github
  7 siblings, 0 replies; 8+ 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] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ 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: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:15 ` voidlinux-github
2019-06-12 16:06 ` [PR PATCH] [Merged]: " voidlinux-github

Github messages for voidlinux

Archives are clonable: git clone --mirror http://inbox.vuxu.org/voidlinux-github

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox