Skip to content

Commit

Permalink
neofetch: Speed-up rpm total package count
Browse files Browse the repository at this point in the history
Skipping package digest and signature verification yields a significant
speed-up when counting total packages.

Idea taken from rpm's bash-completion script.
  • Loading branch information
bertronika committed Nov 30, 2024
1 parent bb26089 commit df71b01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -2199,7 +2199,7 @@ get_packages() {
if has dnf && type -p sqlite3 >/dev/null && [[ -f /var/cache/dnf/packages.db ]]; then
pac "$(sqlite3 /var/cache/dnf/packages.db "SELECT count(pkg) FROM installed")"
else
has rpm && tot rpm -qa
has rpm && tot rpm -qa --nodigest --nosignature
fi

# 'mine' conflicts with minesweeper games.
Expand Down Expand Up @@ -2360,7 +2360,7 @@ get_packages() {

AIX|FreeMiNT)
has lslpp && ((packages+=$(lslpp -J -l -q | grep -cv '^#')))
has rpm && tot rpm -qa
has rpm && tot rpm -qa --nodigest --nosignature
;;

Windows)
Expand Down

0 comments on commit df71b01

Please sign in to comment.