Skip to content

Commit

Permalink
[eos-rankmirrors] added EOS_KEEP_UNRANKED_LIST_BY_HOOK into /etc/eos-…
Browse files Browse the repository at this point in the history
…rankmirrors.conf
  • Loading branch information
manuel-192 committed Sep 25, 2024
1 parent ea4a65c commit e563733
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
6 changes: 3 additions & 3 deletions eos-rankmirrors/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: EndeavourOS <[email protected]>

pkgname=eos-rankmirrors
pkgver=24.7
pkgver=24.9
pkgrel=1
pkgdesc="EndeavourOS mirror ranking tool"
arch=('any')
Expand All @@ -24,9 +24,9 @@ source=(
)
sha512sums=('f0b3481ca2757f42f616b992c6043bd48eada488cfb4363ef7b2f186799328c4b1480959c65112335ba4e10d25a3e9e78e0e056e0296cffea298b5f4ce5267f6'
'e945c073d46abf35d9cf9042c7906bf9a1bad73760e0f06fb42c59227cf0ef1e3ea9ceeb9dc3b2185b0a37711e7b698dd28565be62e21a7bddb5f3b4a2daeee4'
'8475d9697ad42de23c59eab7b7923af1b6759026e376b0d053ae867860e254d65b719e0f859268492fde5d7874e1e3cd6ae76c2f417438c8be689cfdb028f108'
'fc3113a20559ec58ffff2cacae8069ce5c83ad826f0054488315d024cb874a92ae9240fe4630bd9da647ee2cbf0e93dd22259190c703f26d21bf0b8481686a4c'
'f01f6267f624992febfec29c76f2de1c503693086ade5783e2b9cbef359f5155bf6df520ff06299193c842aef2a05cac5078977ee0dabf55cff66f44aec6e44a'
'cd94be5f06014e85fd6e357635129a4d3215bdc6b6386476acd75e4de5ead72bc5e6a63dc39f8c222bbf4ad0848d4a7086da7d02bc8fffa847e2e8c4fb25cd5b'
'ffe0e2f832d513bf0ea3cd36eb6e78305fb181b6e6d261a592a51c4f0a51c807d98b78d789a22df5963045834dbf23a5725178be5526b285f43e7223e42f4e59'
'06b77d1109fec45071dd2a3c1be07c225a5735961bd2818d0ccea608fef6e85bf4ae71d821427aa766d5b1934195282c1964965df7bd49602316b3bab6bf9824')

package() {
Expand Down
20 changes: 18 additions & 2 deletions eos-rankmirrors/eos-rankmirrors-from-hook
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,25 @@ Main() {
local conf=/etc/eos-rankmirrors.conf
source $conf || return

local pacnew=/etc/pacman.d/endeavouros-mirrorlist.pacnew

case "$EOS_RANK_WHEN_MIRRORLIST_CHANGES" in
yes | "") ;;
no | *) return ;;
yes | "")
echo " -> configuration set to rank mirrors" >&2
;;
no | *)
echo " -> configuration set to not rank mirrors" >&2
case "$EOS_KEEP_UNRANKED_LIST_BY_HOOK" in
yes) ;;
no | *)
if [ -e $pacnew ] ; then
echo " -> deleting $pacnew" >&2
rm -f $pacnew
fi
;;
esac
return
;;
esac

local timeout="$EOS_AUTORANK_TIMEOUT"
Expand Down
13 changes: 13 additions & 0 deletions eos-rankmirrors/eos-rankmirrors.conf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ EOS_RANKMIRRORS_EXIT_CODE_VERBOSITY=show
#
EOS_RANK_WHEN_MIRRORLIST_CHANGES=yes

# EOS_KEEP_UNRANKED_LIST_BY_HOOK is used when the following two conditions hold:
# - package endeavouros-mirrorlist is just installed or updated
# - if EOS_RANK_WHEN_MIRRORLIST_CHANGES is set to "no"
# File /etc/pacman.d/endeavouros-mirrorlist.pacnew will be deleted if
# EOS_KEEP_UNRANKED_LIST_BY_HOOK is set to 'no'
# (since it has not been ranked and likely is not optimal for the user).
# Supported values:
# yes
# no (default)
#
EOS_KEEP_UNRANKED_LIST_BY_HOOK=no

# CMD_OPTIONS can contain your default command line options.
# If the list is empty (i.e. no options), the app defaults will be used.
#
Expand All @@ -69,3 +81,4 @@ CMD_OPTIONS=(
# --ignore=''
# --timeout=30
)

0 comments on commit e563733

Please sign in to comment.