packages: Fix issues with pacman 5.1. Remove needless call to pkginfo on Linux.
This commit is contained in:
parent
15cd3b3e07
commit
9175a47a3c
6
neofetch
6
neofetch
|
@ -1239,7 +1239,7 @@ get_uptime() {
|
||||||
get_packages() {
|
get_packages() {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "BSD" | "iPhone OS" | "Solaris")
|
"Linux" | "BSD" | "iPhone OS" | "Solaris")
|
||||||
type -p paclog-pkglist >/dev/null && \
|
type -p pacman-key >/dev/null && \
|
||||||
packages="$(pacman -Qq --color never | wc -l)"
|
packages="$(pacman -Qq --color never | wc -l)"
|
||||||
|
|
||||||
type -p dpkg >/dev/null && \
|
type -p dpkg >/dev/null && \
|
||||||
|
@ -1254,7 +1254,7 @@ get_packages() {
|
||||||
type -p xbps-query >/dev/null && \
|
type -p xbps-query >/dev/null && \
|
||||||
((packages+=$(xbps-query -l | wc -l)))
|
((packages+=$(xbps-query -l | wc -l)))
|
||||||
|
|
||||||
type -p pkginfo >/dev/null && \
|
[[ "$os" != "Linux" ]] && type -p pkginfo >/dev/null && \
|
||||||
((packages+=$(pkginfo -i | wc -l)))
|
((packages+=$(pkginfo -i | wc -l)))
|
||||||
|
|
||||||
type -p emerge >/dev/null && \
|
type -p emerge >/dev/null && \
|
||||||
|
@ -3888,7 +3888,7 @@ info() {
|
||||||
unset -v prin
|
unset -v prin
|
||||||
|
|
||||||
# Call the function.
|
# Call the function.
|
||||||
"get_${2:-$1}"
|
get_${2:-$1}"
|
||||||
|
|
||||||
# If the get_func function called 'prin' directly, stop here.
|
# If the get_func function called 'prin' directly, stop here.
|
||||||
[[ "$prin" ]] && return
|
[[ "$prin" ]] && return
|
||||||
|
|
Reference in New Issue