Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] update-check: download each url once
Date: Thu, 09 May 2019 10:09:42 +0200	[thread overview]
Message-ID: <20190509080942.rXUVoBEyRlQEg0zw59kINQ6rYCa_lhho2-G8MXaHkD0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-6395@inbox.vuxu.org>

[-- 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 |

  parent reply	other threads:[~2019-05-09  8:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2019-05-09  8:11 ` 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

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=20190509080942.rXUVoBEyRlQEg0zw59kINQ6rYCa_lhho2-G8MXaHkD0@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /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;
as well as URLs for NNTP newsgroup(s).