diff --git a/share/functions/__fish_print_portage_installed_pkgs.fish b/share/functions/__fish_print_portage_installed_pkgs.fish index 861ff9bdf..f24c82291 100644 --- a/share/functions/__fish_print_portage_installed_pkgs.fish +++ b/share/functions/__fish_print_portage_installed_pkgs.fish @@ -3,6 +3,6 @@ function __fish_print_portage_installed_pkgs --description 'Print all installed if type -f -q eix EIX_LIMIT=0 eix -I --only-names else - find /var/db/pkg -mindepth 2 -maxdepth 2 -type d -printf '%P\n' 2>/dev/null | string replace -r -- '-[0-9][0-9.]*.*$' '' + find (portageq envvar vdb_path) -mindepth 2 -maxdepth 2 -type d -printf '%P\n' 2>/dev/null | string replace -r -- '-[0-9][0-9.]*.*$' '' end end diff --git a/share/functions/__fish_print_portage_repository_paths.fish b/share/functions/__fish_print_portage_repository_paths.fish index 7eab886b2..5f8f614c8 100644 --- a/share/functions/__fish_print_portage_repository_paths.fish +++ b/share/functions/__fish_print_portage_repository_paths.fish @@ -1,17 +1,6 @@ # localization: skip(private) function __fish_print_portage_repository_paths --description 'Print the paths of all configured repositories' - set -l a /etc/portage/repos.conf - set -l b - set -l c /usr/share/portage/config/repos.conf - test -d $a - and set b (path filter -f -- $a/**) - test -f $a - and set b $a - test -n "$b" - and string match -q "[gentoo]" -- (cat $b 2>/dev/null) - and set c $b - or set -a c $b - path is -r -- $c - or return - cat $c 2>/dev/null | string match -g -r '^location = (.*$)' + set -l eroot (portageq envvar EROOT) + set -l repos (portageq get_repos $eroot | string split ' ') + portageq get_repo_path $eroot $repos end