Fix check minimal param

master
Mike Hiretsky 12 years ago
parent 2de8449ea6
commit edc5ac2ff5

@ -126,7 +126,8 @@ class kernel_cmd(share_cmd):
if not self.logicObj._testKernelDirectory(values.k):
self.optobj.error("%s:'%s'"%
(_("wrong kernel source directory"),values.k))
elif not self.logicObj._testFullKernelDirectory(values.k):
elif not self.logicObj._testFullKernelDirectory(values.k) \
and self.checkNotEbuildParam(values,"postinst"):
self.optobj.error(("%s:'%s'"%
(_("in directory of kernel source not "
"enough needed files"),
@ -135,7 +136,7 @@ class kernel_cmd(share_cmd):
"compiled with USE 'minimal'"))
else:
self.logicObj.clVars.Set('cl_kernel_src_path',values.k,True)
else:
elif self.checkNotEbuildParam(values,"postinst"):
if not self.logicObj._testFullKernelDirectory(
self.logicObj.clVars.Get('cl_kernel_src_path')):
self.optobj.error((_("in default directory of kernel "
@ -176,6 +177,9 @@ class kernel_cmd(share_cmd):
def checkEbuildParam(self,options,phase):
return not options.ebuild or os.environ["EBUILD_PHASE"] == phase
def checkNotEbuildParam(self,options,phase):
return not options.ebuild or os.environ["EBUILD_PHASE"] != phase
def makeKernel(self,options):
"""Run kernel compilation, installation, optimization"""
# if set ebuild param check cur EBUILD_PHASE, run kernel compilation

Loading…
Cancel
Save