Use guix directly to report package count instead of counting directories

This commit is contained in:
spacelike 2019-04-30 07:38:14 -06:00 committed by Muhammad Herdiansyah
parent 58d8bde7bd
commit 83925702fc

View file

@ -1331,7 +1331,6 @@ get_packages() {
{ {
has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/ has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/
has "nix-env" && dir ${br_prefix}/nix/store/*/ has "nix-env" && dir ${br_prefix}/nix/store/*/
has "guix" && dir ${br_prefix}/gnu/store/*/
has "Compile" && dir ${br_prefix}/Programs/*/ has "Compile" && dir ${br_prefix}/Programs/*/
has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/* has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/*
has "crew" && dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist has "crew" && dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist
@ -1342,6 +1341,7 @@ get_packages() {
# Other (Needs complex command) # Other (Needs complex command)
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)")) has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
has "guix" && ( manager="guix-system" && tot guix package -p /run/current-system/profile -I ; manager="guix-user" && tot guix package -I )
# pkginfo is also the name of a python package manager which is painfully slow. # pkginfo is also the name of a python package manager which is painfully slow.
# TODO: Fix this somehow. # TODO: Fix this somehow.