Closed polluks closed 5 months ago
Seems to work fine for me on this mostly fresh install. Is pkg_info not installed on your system or in your PATH? My understanding is that it's installed by default on every NetBSD system, the original pfetch didn't have a check for it either, though it wouldn't have caused as much of an issue since they handled package counting differently. I can add a check for pkg_info existing and that might fix the issue. Also /usr/pkg/db/pkg doesn't seem to exist on my install, there is /usr/pkg/pkgdb that seems like it might be the same thing, but pkg_info seems fast enough that I don't think it would be worth it to have checks for certain common directories to use instead of just running pkg_info.
Try the latest commit and see if that fixes it.
What about non-root users? Thank you so far.
$ bash pfetch -d
\\`-______,----__ polluks@sdf
\\ __,---`_ os NetBSD 10.0
\\ `.____ host Supermicro X7DBT
\\-______,----`- uptime 8d 1h 4m
\\ memory 13379M / 16382M
\\
\\
$ sh pfetch -d
\\`-______,----__ polluks@sdf
\\ __,---`_ os NetBSD 10.0
\\ `.____ host Supermicro X7DBT
\\-______,----`- uptime 8d 1h 4m
pfetch: arith: syntax error: "total_pkgs + count"
seems /usr/sbin is in PATH on my install even for non-root. pfetch still works fine.
damn you github
try latest commit
hmm, the same syntax error
$ echo $PATH
/bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:/usr/pkg/games:/usr/pkg/X11R7/bin
I have only pkg-config
whats the output of which pkg_info
(as root)
Does adding /sbin, /usr/sbin, and the like to your PATH fix the issue?
Oh wait I think I might have found the problem, try latest commit now
almost right
$ ./pfetch -d
\\`-______,----__ polluks@sdf
\\ __,---`_ os NetBSD 10.0
\\ `.____ host Supermicro X7DBT
\\-______,----`- uptime 8d 3h 5m
\\ pkgs **1**
\\ memory 13800M / 16382M
\\
what is the output of pkg_info
and which pkg_info
?
$ ls -l /usr/sbin/pkg_info
-r-xr-xr-x 1 root wheel 108064 Aug 4 2022 /usr/sbin/pkg_info
$ /usr/sbin/pkg_info
$ pkg_info
zsh: command not found: pkg_info
What is the output of PF_SOURCE= PF_PACKAGE_MANAGERS=on pfetch -d
\\`-______,----__ polluks@sdf
\\ __,---`_ os NetBSD 10.0
\\ `.____ host Supermicro X7DBT
\\-______,----`- uptime 8d 14h 27m
\\ pkgs 1 (cargo)
\\ memory 14190M / 16382M
\\
looks like the 1 extra package is coming from cargo, not pkgsrc, you can disable cargo packages being counted with the PF_DISABLED_PACKAGE_MANAGERS
environment variable
By the way