Packages (Linux): support porg

This commit is contained in:
yabobay
2026-06-19 22:25:33 +03:00
committed by Carter Li
parent 7c39b64fb4
commit 3aa43212ff
4 changed files with 11 additions and 0 deletions
+1
View File
@@ -40,6 +40,7 @@ typedef struct FFPackagesResult {
uint32_t pkg;
uint32_t pkgsrc;
uint32_t pkgtool;
uint32_t porg;
uint32_t rpm;
uint32_t scoopGlobal;
uint32_t scoopUser;
+3
View File
@@ -493,6 +493,9 @@ static void getPackageCounts(FFstrbuf* baseDir, FFPackagesResult* packageCounts,
if (FF_PACKAGES_IS_ENABLED(options, PKGTOOL)) {
packageCounts->pkgtool += getNumElements(baseDir, "/var/log/packages", false);
}
if (FF_PACKAGES_IS_ENABLED(options, PORG)) {
packageCounts->porg += getNumElements(baseDir, "/var/log/porg", false);
}
if (FF_PACKAGES_IS_ENABLED(options, RPM)) {
// `Sigmd5` is the only table that doesn't contain the virtual `gpg-pubkey` package
packageCounts->rpm += getSQLite3Int(baseDir, "/var/lib/rpm/rpmdb.sqlite", "SELECT count(*) FROM Sigmd5", "rpm");