Browse Source

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

tags/3.2.3
Mike Khiretskiy 6 years ago
parent
commit
50f65057e3
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      pym/update/update.py

+ 9
- 1
pym/update/update.py View File

@@ -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