Отключено по умолчанию удаление пакетов при отключении образов

Mike Khiretskiy 9 years ago
parent de6dab908f
commit 75d6f33035

@ -838,6 +838,10 @@ class Builder(Update):
self.clVars.Get('cl_builder_pkgdir'))
dbPkg = pathJoin(chrootPath, 'var/db/pkg')
logfile = self._get_log_file()
logger = log("binary_cleanpkg.log", filename=logfile,
formatter="%(asctime)s - %(message)s")
try:
if not path.exists(dbPkg):
os.makedirs(dbPkg)
@ -860,9 +864,14 @@ class Builder(Update):
os.listdir(pkgDir)))),[])
# remove files which in binary and not in db/pkg
map(lambda x:os.unlink(x),
map(lambda x:pathJoin(pkgDir,x),
list(set(binList)-set(pkgList))))
removeList = list(set(binList) - set(pkgList))
if removeList:
removelist_str = ",".join(
path.basename(x) for x in removeList)
logger.info(removelist_str)
map(lambda x: os.unlink(x),
map(lambda x: pathJoin(pkgDir, x),
removeList))
# remove empty directories
map(lambda x:os.rmdir(x),

@ -486,7 +486,7 @@ class VariableClBuilderClearPkgSet(Variable):
Удалять бинарные пакеты при отключении сборки
"""
type = "bool"
value = "on"
value = "off"
opt = ["--clear-pkg"]
def init(self):

Loading…
Cancel
Save