Исправлено прерывание сборки

Mike Khiretskiy 9 years ago
parent 6f416bb325
commit cef75b3bf8

@ -26,7 +26,7 @@ from calculate.lib.utils.files import (
pathJoin, PercentProgress, getProgPath, process, STDOUT, removeDir,
makeDirectory, writeFile, readLinesFile, chmod, chown, FilePermission,
find, FindFileType, removeFileWithEmptyDirectory,
copyWithPath, countFiles, listDirectory, getRunCommands)
copyWithPath, countFiles, listDirectory, getRunCommands, isMount)
from calculate.lib.utils.git import Git
from calculate.lib.utils.portage import Layman, EmergeLog, EmergeLogNamedTask, \
InstalledPackageInfo, EbuildInfoError, EbuildInfo, ChrootEix, \
@ -94,11 +94,12 @@ class Builder(Update):
@type build:Build
"""
if build:
build.close_distributive()
if isMount(self.clVars.Get('cl_builder_path')):
build.close_distributive()
build.remove()
if clear:
build.distributive.post_clear()
pkgdir = self.clVars.Get('cl_builder_pkgdir')
pkgdir = self.clVars.Get('cl_builder_pkgdir')
if clear_pkg:
if '/remote/' in pkgdir:
if path.exists(pkgdir):

@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from itertools import chain
import sys
from os import path
@ -249,7 +250,7 @@ class VariableClBuilderDiskDev(Variable):
base_name = self.Get('cl_builder_id_path')
if self.Get('os_root_type') != "livecd":
default_path = self.Get('cl_builder_prepare_path')
for i in range(2, 9999):
for i in chain((0,), range(2, 9999)):
if i:
dn = "%s.%02d" % (base_name, i)
else:

Loading…
Cancel
Save