From 05f6c805c473f9bf54e182f9a06bbf89dfbfb859 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 7 Feb 2024 09:56:06 +0200 Subject: [PATCH] [eos-rankmirrors] added support for config EOS_RANK_WHEN_MIRRORLIST_CHANGES --- eos-rankmirrors/PKGBUILD | 6 +++--- eos-rankmirrors/eos-rankmirrors-from-hook | 5 +++++ eos-rankmirrors/eos-rankmirrors.conf | 7 +++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/eos-rankmirrors/PKGBUILD b/eos-rankmirrors/PKGBUILD index 2000c37e..04a1d1e4 100644 --- a/eos-rankmirrors/PKGBUILD +++ b/eos-rankmirrors/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: EndeavourOS pkgname=eos-rankmirrors -pkgver=24 +pkgver=24.1 pkgrel=1 pkgdesc="EndeavourOS mirror ranking tool" arch=('any') @@ -24,9 +24,9 @@ source=( ) sha512sums=('0edc04542fa95c97c031555a8993dc1be291d4eae38ef19c8a634249870552cff4d62adca843580941ab2d4015f65216d34fa2172ed21fa35e38c1f09f6db550' 'ccfe87b9107618578042dd1379bc080f8df9da85b0a03c0a2b8ddfbd2c2a6a417964b3a83c74a949063aa5c145e8083a69e05bade59cfc938467ea08fb63d945' - '580511c676cf56b5b8580d6819e0d1a4c85a40a3cd10f4b4f04fb9c004b14025b56cf4c3048e0fe8f9eef48d924b32b97d1e9669fac39b96f4203e2d68e3bd07' + '8475d9697ad42de23c59eab7b7923af1b6759026e376b0d053ae867860e254d65b719e0f859268492fde5d7874e1e3cd6ae76c2f417438c8be689cfdb028f108' 'f01f6267f624992febfec29c76f2de1c503693086ade5783e2b9cbef359f5155bf6df520ff06299193c842aef2a05cac5078977ee0dabf55cff66f44aec6e44a' - 'a95c38c8d359b054a77a11dec6ea774e3e4c62dcb7f667eaf24e62a2066f12e98da43d2dbf622fd0b9efcce15e6a8c1655afd8dc753c0705b527891f74f8b479' + 'c03646fd5525ee4abe2b2e1e5c453fb366505b6bf470cc16ddfad22951eb1ecadf2ef1bb124d8ea3d39580c57013163b6f6a02e612451180f31f74845c9d7d3e' '06b77d1109fec45071dd2a3c1be07c225a5735961bd2818d0ccea608fef6e85bf4ae71d821427aa766d5b1934195282c1964965df7bd49602316b3bab6bf9824') package() { diff --git a/eos-rankmirrors/eos-rankmirrors-from-hook b/eos-rankmirrors/eos-rankmirrors-from-hook index 28bda6e6..f2b928a3 100755 --- a/eos-rankmirrors/eos-rankmirrors-from-hook +++ b/eos-rankmirrors/eos-rankmirrors-from-hook @@ -4,6 +4,11 @@ Main() { local conf=/etc/eos-rankmirrors.conf source $conf || return + case "$EOS_RANK_WHEN_MIRRORLIST_CHANGES" in + yes | "") ;; + no | *) return ;; + esac + local timeout="$EOS_AUTORANK_TIMEOUT" [ -n "$timeout" ] || timeout=30 diff --git a/eos-rankmirrors/eos-rankmirrors.conf b/eos-rankmirrors/eos-rankmirrors.conf index 36f582e0..45458e42 100644 --- a/eos-rankmirrors/eos-rankmirrors.conf +++ b/eos-rankmirrors/eos-rankmirrors.conf @@ -53,3 +53,10 @@ EOS_IGNORED_MIRRORS=() # EOS_RANKMIRRORS_EXIT_CODE_VERBOSITY=show +# EOS_RANK_WHEN_MIRRORLIST_CHANGES specifies whether to automatically run eos-rankmirrors +# when package 'endeavouos-mirrorlist' gets an update. +# Supported values: +# yes (default for backwards compatibility) +# no +# +EOS_RANK_WHEN_MIRRORLIST_CHANGES=yes