index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Levente Polyak <anthraxx@archlinux.org> | 2024-02-06 21:59:11 +0100 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2024-02-08 00:52:20 +0100 |
commit | 3ecba314fc3a7508d80c5450aaae4b5fc507d62b (patch) | |
tree | b49d8fb9233d9f821b1769a7c8520d22d51b38a8 /src/lib/util/pacman.sh | |
parent | 5042dcaeb4916e199b30ecf21048a4234da43499 (diff) |
-rw-r--r-- | src/lib/util/pacman.sh | 7 |
diff --git a/src/lib/util/pacman.sh b/src/lib/util/pacman.sh index 82a227b..620e1a8 100644 --- a/src/lib/util/pacman.sh +++ b/src/lib/util/pacman.sh @@ -38,6 +38,11 @@ get_pacman_repo_from_pkgbuild() { return fi + # update the pacman repo cache if it doesn't exist yet + if [[ ! -d "${_DEVTOOLS_PACMAN_CACHE_DIR}" ]]; then + update_pacman_repo_cache + fi + slock 10 "${_DEVTOOLS_PACMAN_CACHE_DIR}.lock" "Locking pacman database cache" # query repo of passed pkgname, specify --nodeps twice to skip all dependency checks mapfile -t repos < <(pacman --config "${_DEVTOOLS_PACMAN_CONF_DIR}/multilib.conf" \ @@ -47,7 +52,7 @@ get_pacman_repo_from_pkgbuild() { --nodeps \ --print \ --print-format '%n %r' \ - "${pkgnames[0]}" | awk '$1=="'"${pkgnames[0]}"'"{print $2}' + "${pkgnames[0]}" 2>/dev/null | awk '$1=="'"${pkgnames[0]}"'"{print $2}' ) lock_close 10 |