Browse Source

pacman-5.0.2-2.hyperbola18: fix doas commands

emulatorman
André Silva 1 month ago
parent
commit
6534c4cd87
2 changed files with 7 additions and 7 deletions
  1. +2
    -2
      pacman/PKGBUILD
  2. +5
    -5
      pacman/doas.patch

+ 2
- 2
pacman/PKGBUILD View File

@@ -9,7 +9,7 @@

pkgname=pacman
pkgver=5.0.2
pkgrel=2.hyperbola17
pkgrel=2.hyperbola18
pkgdesc="A library-based package manager with dependency support, with doas, arch-keyring and hyperbola-keyring support and cron recommendation"
arch=('i686' 'x86_64')
url="http://www.archlinux.org/pacman/"
@@ -46,7 +46,7 @@ sha512sums=('94a8cce1a52d2365a993c72f16537f4dbea6100feb8f22e8782cc7d2c1ef8a525a6
'35992934aad525d50047e9ff7b9072310c1275fbdee4423c88c41ff38fb32d64746542cee35e9c4258e00a3ec14f8aadc769597fd9a148c852ad31e4e38a6534'
'547935e4ee7ec033ba40e0be26c10a4430747b1d217f45512838db24b76c206336257942d17c3b91d5996704eef4b0c7a3cc84aaa6884226461fc23f8e9e2c8c'
'd855d1d2c31fa5a7b47d0022ab92d6e3fb32e0bab469e53e5cfbca3e69d6fccecdbe45527beb0199208ac0eb6a40f098825686adcb3ed228efa1b230d1d3cf2e'
'09820e82ef13599bf7be2535cb2e968bb987c185119f3ffcc93cb5a0977af5586c288260370790f063463e781092a5aa812de8e3f75848432627f0d6aaa1f1c5'
'1095f2500f41ae3e204ccdc42c713b6706147506a6aef11521586c63b8956b22a04b2d5d9a932b165aa8d6c56acc6438378d22ff5b74c839e622b83701ef8ecf'
'f73557e20c694a09f6d972ac4509b2bb24b14fa6dd79241d630484330eea882eb1305600dfab640f2386fb57f3a38027450cd828304fd66e09691d473686a5d2')

prepare() {

+ 5
- 5
pacman/doas.patch View File

@@ -29,7 +29,7 @@ index 02fae52..3686c82 100644
else
"$@"
diff --git a/contrib/pacscripts.sh.in b/contrib/pacscripts.sh.in
index 4a1e0c5..fe9bb98 100644
index 4a1e0c5..2341399 100644
--- a/contrib/pacscripts.sh.in
+++ b/contrib/pacscripts.sh.in
@@ -5,6 +5,8 @@
@@ -51,7 +51,7 @@ index 4a1e0c5..fe9bb98 100644
- exit 1
- else
+ if type -p doas >/dev/null; then
+ doas -- pacman "$@"
+ doas pacman "$@"
+ elif type -p sudo >/dev/null; then
sudo pacman "$@"
+ else
@@ -62,7 +62,7 @@ index 4a1e0c5..fe9bb98 100644
fi
}
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 450473b..55a651b 100644
index 450473b..5e9925a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -10,6 +10,8 @@
@@ -80,7 +80,7 @@ index 450473b..55a651b 100644
if [[ $1 != -@(T|Qq|Q) ]]; then
- if type -p sudo >/dev/null; then
+ if type -p doas >/dev/null; then
+ cmd=(doas -- "${cmd[@]}")
+ cmd=(doas "${cmd[@]}")
+ elif type -p sudo >/dev/null; then
cmd=(sudo "${cmd[@]}")
else
@@ -94,7 +94,7 @@ index 450473b..55a651b 100644
if (( DEP_BIN || RMDEPS || INSTALL )); then
- if ! type -p sudo >/dev/null; then
- warning "$(gettext "Cannot find the %s binary. Will use %s to acquire root privileges.")" "sudo" "su"
+ if ! type -p doas >/dev/null || ! type -p sudo >/dev/null; then
+ if ! type -p doas >/dev/null && ! type -p sudo >/dev/null; then
+ warning "$(gettext "Cannot find the %s or %s binary. Will use %s to acquire root privileges.")" "doas" "sudo" "su"
fi
fi

Loading…
Cancel
Save