Browse Source

Исправлено удаление устаревших бинарных пакетов

master3.3 3.2.3
Mike Khiretskiy 7 years ago
parent
commit
50f65057e3
  1. 10
      pym/update/update.py

10
pym/update/update.py

@ -44,7 +44,7 @@ from calculate.lib.utils.portage import (Git, Layman, EmergeLog, GitError,
Colors = TextState.Colors
from calculate.lib.utils.files import (getProgPath, STDOUT, removeDir,
PercentProgress, process, getRunCommands,
readFile)
readFile, listDirectory)
import emerge_parser
import logging
from emerge_parser import EmergeParser, EmergeCommand, EmergeError, EmergeCache
@ -1018,4 +1018,12 @@ class Update(object):
removelist_str = ",".join(removelist)
if removelist_str:
logger.info(removelist_str, extra={'clean': cleantype})
if cleantype == "packages":
try:
os.system('/usr/sbin/emaint binhost -f &>/dev/null')
for dn in listDirectory(pkgdir, fullPath=True):
if path.isdir(dn) and not listDirectory(dn):
os.rmdir(dn)
except OSError:
pass
return True
Loading…
Cancel
Save