[eos-pkgbuild-setup] small corner-case fixes

This commit is contained in:
manuel
2025-11-05 12:12:25 +02:00
parent 30018234c3
commit bd9f4641c4
3 changed files with 26 additions and 12 deletions
+21 -9
View File
@@ -492,12 +492,6 @@ _kalu_hook_fix_files() {
-e 's|chown 0:102|chown root:polkitd|' \
-e 's|^\(pkgrel=[0-9]*\)$|\1.1|'
}
_yad_hook_add_gspell() {
# add gspell to 'depends', and modify 'pkgrel'
sed -i "$PKGBUILD_ROOTDIR"/yad/PKGBUILD \
-e 's|^depends=(\([^\)]*\))$|depends=(\1 gspell)|' \
-e 's|^\(pkgrel=[0-9]*\)$|\1.1|'
}
@@ -544,8 +538,19 @@ _helper_eos_branding_and_marking() {
updpkgsums PKGBUILD >& /dev/null
}
_yad_hook() {
local -r url=https://gitlab.archlinux.org/archlinux/packaging/packages
local -r delay=1
if wget --timeout $delay -qO /dev/null $url ; then
return 0
else
WARN "cannot fetch yad PKGBUILD!"
return 1
fi
}
_yad_hook__old() {
return # 2023-Mar-08: currently not used!
@@ -578,6 +583,13 @@ _yad_hook() {
popd >/dev/null
}
_yad_hook_add_gspell() {
# add gspell to 'depends', and modify 'pkgrel'
sed -i "$PKGBUILD_ROOTDIR"/yad/PKGBUILD \
-e 's|^depends=(\([^\)]*\))$|depends=(\1 gspell)|' \
-e 's|^\(pkgrel=[0-9]*\)$|\1.1|'
}
_diff_file_and_data() {
local file="$1"
local data="$2"
@@ -659,11 +671,12 @@ ASSET_FAST_UPDATE_CHECKS=(
declare -A ASSET_PACKAGE_HOOKS=(
assets_mirrors _assets_download_break # special hook
dracut _dracut_hook # Inform if the Arch version if not older than the EndeavourOS version
yad _yad_hook
# bashdb _bashdb_hook # no more needed
# budgie-control-center _budgie-control-center_hook
# downgrade _downgrade_hook_check_latest
dracut _dracut_hook # Inform if the Arch version if not older than the EndeavourOS version
# eos-lightdm-gtk-theme _eos-lightdm-gtk-theme_hook # Clone package source of eos-lightdm-gtk-theme from EndeavourOS ARM
# inxi _inxi_hook_check_latest
# kalu _kalu_hook_fix_files
@@ -671,6 +684,5 @@ declare -A ASSET_PACKAGE_HOOKS=(
# paper-icon-theme-git _paper-icon-theme-git_hook
# paru _paru_hook
# rate-mirrors _rate-mirrors_hook
# yad _yad_hook_add_gspell
# yay _yay_hook_check_latest
)
+4 -2
View File
@@ -522,6 +522,7 @@ ListNameToPkgName()
local run_hook="$2"
local Pkgname
local hook
local hookretval=0
hookout=""
@@ -543,8 +544,8 @@ ListNameToPkgName()
hook="${ASSET_PACKAGE_HOOKS[$Pkgname]}"
if [ -n "$hook" ] ; then
if [ "$run_hook" = "yes" ] ; then
hookout=$($hook)
case $? in
hookout=$($hook) || hookretval=$?
case $hookretval in
0) HookIndicator "$hook_yes" ;; # OK
11) HookIndicator "$hook_pkgver" ;; # pkgver was updated by hook
1) HookIndicator "?" ;; # failed
@@ -556,6 +557,7 @@ ListNameToPkgName()
fi
pkgdirname="$Pkgname"
return $hookretval
}
Compare() {
+1 -1
View File
@@ -29,7 +29,7 @@ Main() {
DoIt() {
echo "$sec_now" > "$epochfile"
if wget --timeout 10 -qO /dev/null https://aur.archlinux.org/packages ; then
if wget --timeout $delay -qO /dev/null https://aur.archlinux.org/packages ; then
echo "0" > "$status_prev_file"
return 0
else