ref: assume keg-only is always opt-linked

This commit is contained in:
relikd
2025-09-03 13:16:03 +02:00
parent 3be4fc56b6
commit 1a133fc45c

View File

@@ -1168,11 +1168,11 @@ class LocalPackage:
def cleanup(self, *, dryRun: bool = False, quiet: bool = False) -> int: def cleanup(self, *, dryRun: bool = False, quiet: bool = False) -> int:
''' Delete old, inactive versions and return size of savings ''' ''' Delete old, inactive versions and return size of savings '''
if self.pinned:
return 0
savings = 0 savings = 0
for ver in self.inactiveVersions: for ver in self.inactiveVersions:
vpkg = self.version(ver) vpkg = self.version(ver)
if vpkg.isKegOnly:
continue
savings += File.remove(vpkg.path, dryRun=dryRun, quiet=quiet) savings += File.remove(vpkg.path, dryRun=dryRun, quiet=quiet)
return savings return savings