Skip to content

Commit bb9ca73

Browse files
authored
Packages (Linux): fixes Linglong detection on Debian (#1899)
Fixes #1898
1 parent 81bac8b commit bb9ca73

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/detection/packages/packages_linux.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,12 @@ static void getPackageCounts(FFstrbuf* baseDir, FFPackagesResult* packageCounts,
446446
{
447447
packageCounts->guixSystem += getGuixPackages(baseDir, "/run/current-system/profile");
448448
}
449-
if (!(options->disabled & FF_PACKAGES_FLAG_LINGLONG_BIT)) packageCounts->linglong += getNumElements(baseDir, "/var/lib/linglong/repo/refs/heads/main", true);
449+
if (!(options->disabled & FF_PACKAGES_FLAG_LINGLONG_BIT))
450+
{
451+
packageCounts->linglong += getNumElements(baseDir, "/var/lib/linglong/repo/refs/heads/main", true);
452+
if (packageCounts->linglong == 0)
453+
packageCounts->linglong += getNumElements(baseDir, "/var/lib/linglong/repo/refs/remotes/stable/main", true);
454+
}
450455
if (!(options->disabled & FF_PACKAGES_FLAG_PACSTALL_BIT)) packageCounts->pacstall += getNumElements(baseDir, "/var/lib/pacstall/metadata", false);
451456
if (!(options->disabled & FF_PACKAGES_FLAG_PISI_BIT)) packageCounts->pisi += getNumElements(baseDir, "/var/lib/pisi/package", true);
452457
if (!(options->disabled & FF_PACKAGES_FLAG_PKGSRC_BIT)) packageCounts->pkgsrc += getNumElements(baseDir, "/usr/pkg/pkgdb", DT_DIR);

0 commit comments

Comments
 (0)