Skip to content

Commit b662db4

Browse files
committed
Packages (Linux): add pkgsrc detection
We will not add pkgsrc detection for macOS unless someone can verify it. Ref: https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/fastfetch/patches/patch-src_detection_packages_packages__linux.c?rev=1.1;content-type=text%2Fplain
1 parent 0d2ccb5 commit b662db4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Features:
1111
* Support default route detection on OpenBSD & DragonFly BSD (LocalIP, OpenBSD / DragonFly)
1212
* Improve bash completion script
1313
* Improve performance of networking (PublicIP / Weather)
14+
* Support pkgsrc package manager detection on Linux (Packages, Linux)
1415

1516
Logo:
1617
* Add Common Torizon OS

src/detection/packages/packages_linux.c

+1
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ static void getPackageCounts(FFstrbuf* baseDir, FFPackagesResult* packageCounts,
574574
if (!(options->disabled & FF_PACKAGES_FLAG_PACSTALL_BIT)) packageCounts->pacstall += getNumElements(baseDir, "/var/lib/pacstall/metadata", false);
575575
if (!(options->disabled & FF_PACKAGES_FLAG_QI_BIT)) packageCounts->qi += getNumStrings(baseDir, "/var/qi/installed_packages.list", "\n", "qi");
576576
if (!(options->disabled & FF_PACKAGES_FLAG_PISI_BIT)) packageCounts->pisi += getNumElements(baseDir, "/var/lib/pisi/package", true);
577+
if (!(options->disabled & FF_PACKAGES_FLAG_PKGSRC_BIT)) packageCounts->pkgsrc += getNumElements(baseDir, "/usr/pkg/pkgdb", DT_DIR);
577578
}
578579

579580
static void getPackageCountsRegular(FFstrbuf* baseDir, FFPackagesResult* packageCounts, FFPackagesOptions* options)

0 commit comments

Comments
 (0)