Skip to content

Commit

Permalink
Packages (Linux): fix dpkg package number detection
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Sep 20, 2023
1 parent 5337e5c commit 30ae8a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Bugfixes:
* Fix zpool volumes detection (Disk, Linux)
* Fix external volumes detection (Disk, Linux)
* Fix snap package number detection on systems other than Ubuntu (Packages, Linux)
* Fix dpkg / apt package number detection (Packages, Linux)

Logo:
* Add Afterglow
Expand Down
2 changes: 1 addition & 1 deletion src/detection/packages/packages_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static uint32_t getRpmFromLibrpm(void)
static void getPackageCounts(FFstrbuf* baseDir, FFPackagesResult* packageCounts)
{
packageCounts->apk += getNumStrings(baseDir, "/lib/apk/db/installed", "C:Q");
packageCounts->dpkg += getNumStrings(baseDir, "/var/lib/dpkg/status", "Status: ");
packageCounts->dpkg += getNumStrings(baseDir, "/var/lib/dpkg/status", "Status: install ok installed");
packageCounts->emerge += countFilesRecursive(baseDir, "/var/db/pkg", "SIZE");
packageCounts->eopkg += getNumElements(baseDir, "/var/lib/eopkg/package", DT_DIR);
packageCounts->flatpakSystem += getFlatpak(baseDir, "/var/lib/flatpak");
Expand Down

0 comments on commit 30ae8a2

Please sign in to comment.