ref: assume keg-only is always opt-linked
This commit is contained in:
4
brew.py
4
brew.py
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user