parent
f44e6674cd
commit
f4aaaedd3d
@ -0,0 +1,34 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND=">=sys-kernel/calckernel-3.4.18
|
||||
~sys-apps/calculate-lib-2.2.30
|
||||
!<sys-apps/calculate-1.4.0_p20100921
|
||||
app-cdr/cdrkit
|
||||
sys-fs/squashfs-tools"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# add check on fully kernel sources, fix initrd run, fix using new themes
|
||||
epatch "${FILESDIR}/calculate-builder-2.2.30-r5.patch"
|
||||
}
|
@ -0,0 +1,170 @@
|
||||
diff --git pym/cl_builder.py pym/cl_builder.py
|
||||
index 2cc5334..180a0b3 100644
|
||||
--- pym/cl_builder.py
|
||||
+++ pym/cl_builder.py
|
||||
@@ -328,7 +328,7 @@ class cl_builder(color_print):
|
||||
createdDev = self.createUrandom(mp)
|
||||
self.dispatchConf(mp)
|
||||
self.updatePortage(mp)
|
||||
- self.clearPortage(mp)
|
||||
+ #self.clearPortage(mp)
|
||||
self.updateMan(mp)
|
||||
self.removeUrandom(mp,createdDev)
|
||||
|
||||
@@ -578,8 +578,12 @@ class cl_builder(color_print):
|
||||
"""Get list for portage exclude by 'cl_builder_tree'"""
|
||||
if self.clVars.Get('cl_builder_tree') == 'off':
|
||||
portagePath = pathJoin(sourceDirectory,"usr/portage")
|
||||
- return map(lambda x: path.join("usr/portage",x),
|
||||
- filter(lambda x: not x in ( "eclass", "licenses", "profiles"),
|
||||
+ overlayPath = pathJoin(sourceDirectory,"var/lib/layman/calculate")
|
||||
+ return map(lambda x: path.join("var/lib/layman/calculate",x),
|
||||
+ filter(lambda x: not x in ("distfiles", "eclass", ".git","profiles"),
|
||||
+ listDirectory(overlayPath))) + \
|
||||
+ map(lambda x: path.join("usr/portage",x),
|
||||
+ filter(lambda x: not x in ("distfiles", "eclass", ".git","profiles"),
|
||||
listDirectory(portagePath)))
|
||||
else:
|
||||
return []
|
||||
diff --git pym/cl_image_cmd.py pym/cl_image_cmd.py
|
||||
index f05ac27..9564bec 100644
|
||||
--- pym/cl_image_cmd.py
|
||||
+++ pym/cl_image_cmd.py
|
||||
@@ -70,6 +70,9 @@ CMD_OPTIONS = [{'shortOption':"p",
|
||||
'optVal':"TIMEZONE",
|
||||
'help':_("timezone by default")
|
||||
},
|
||||
+ {'longOption':'keep-tree',
|
||||
+ 'help':_("keep portage tree in image")
|
||||
+ },
|
||||
{'longOption':"set"},
|
||||
{'shortOption':"f",
|
||||
'longOption':"force",
|
||||
@@ -170,6 +173,9 @@ class image_cmd(share_cmd):
|
||||
if values.noisohybrid:
|
||||
self.logicObj.clVars.Set('cl_builder_isohybrid_set','off',True)
|
||||
|
||||
+ if values.keep_tree:
|
||||
+ self.logicObj.clVars.Set('cl_builder_tree','on',True)
|
||||
+
|
||||
if args and args[0] == "squash":
|
||||
self.logicObj.clVars.Set('cl_builder_iso_path','/mnt/flash',True)
|
||||
if values.timezone and not self.logicObj.setTimezone(values.timezone):
|
||||
diff --git pym/cl_kernel.py pym/cl_kernel.py
|
||||
index b6e3c35..456efad 100644
|
||||
--- pym/cl_kernel.py
|
||||
+++ pym/cl_kernel.py
|
||||
@@ -74,12 +74,23 @@ class cl_kernel(color_print):
|
||||
"""Test directory for kernel sources"""
|
||||
makefilepath = path.join(dirpath,'Makefile')
|
||||
kbuildpath = path.join(dirpath,'Kbuild')
|
||||
- if not path.exists(makefilepath) \
|
||||
- or not path.exists(kbuildpath) \
|
||||
- or not "Kbuild for top-level directory of the kernel" in \
|
||||
+ if path.exists(makefilepath) \
|
||||
+ and path.exists(kbuildpath) \
|
||||
+ and "Kbuild for top-level directory of the kernel" in \
|
||||
open(kbuildpath,'r').read():
|
||||
- return False
|
||||
- return True
|
||||
+ return True
|
||||
+ return False
|
||||
+
|
||||
+ def _testFullKernelDirectory(self,dirpath):
|
||||
+ """To check the directory for full kernel sources
|
||||
+
|
||||
+ Kernel may be installed with minimal (later vmlinuz) flag"""
|
||||
+ documentationPath = path.join(dirpath,'Documentation')
|
||||
+ driversPath = path.join(dirpath,'drivers')
|
||||
+ if path.exists(documentationPath) \
|
||||
+ and path.exists(driversPath):
|
||||
+ return True
|
||||
+ return False
|
||||
|
||||
def setNoColor(self):
|
||||
self.color = False
|
||||
@@ -95,19 +106,7 @@ class cl_kernel(color_print):
|
||||
mrproper=False,target="all"):
|
||||
"""Run kernel compilation"""
|
||||
clVars = self.clVars
|
||||
- for themePkg in ['media-gfx/cldx-themes',
|
||||
- 'media-gfx/cld-themes',
|
||||
- 'media-gfx/cldg-themes',
|
||||
- 'media-gfx/cls-themes',
|
||||
- 'media-gfx/cds-themes',
|
||||
- 'media-gfx/cmc-themes']:
|
||||
- installed = getPkgInstalled(themePkg,
|
||||
- prefix=self.clVars.Get('cl_chroot_path'))
|
||||
- if installed and installed[0]['PV'].startswith('12'):
|
||||
- themeName = "calculate"
|
||||
- break
|
||||
- else:
|
||||
- themeName = "tty1"
|
||||
+ themeName = "calculate"
|
||||
standardParams = ["--splash=%s"%themeName, "--unionfs",
|
||||
"--all-ramdisk-modules","--disklabel",
|
||||
"--no-save-config", "--firmware","--udev",
|
||||
diff --git pym/cl_kernel_cmd.py pym/cl_kernel_cmd.py
|
||||
index 3a85ada..54edbc0 100644
|
||||
--- pym/cl_kernel_cmd.py
|
||||
+++ pym/cl_kernel_cmd.py
|
||||
@@ -121,12 +121,30 @@ class kernel_cmd(share_cmd):
|
||||
self.checkIncompatibleParam("initrd")
|
||||
if values.symlink:
|
||||
self.checkIncompatibleParam("symlink")
|
||||
- if values.k:
|
||||
- if not self.logicObj._testKernelDirectory(values.k):
|
||||
- self.optobj.error("%s:'%s'"%
|
||||
- (_("wrong kernel source directory"),values.k))
|
||||
- else:
|
||||
- self.logicObj.clVars.Set('cl_kernel_src_path',values.k,True)
|
||||
+ if not values.v:
|
||||
+ if values.k:
|
||||
+ if not self.logicObj._testKernelDirectory(values.k):
|
||||
+ self.optobj.error("%s:'%s'"%
|
||||
+ (_("wrong kernel source directory"),values.k))
|
||||
+ elif not values.initrd and \
|
||||
+ 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"),
|
||||
+ values.k))+"\n"+
|
||||
+ _("Probably calculate-sources was "
|
||||
+ "compiled with USE 'minimal'"))
|
||||
+ else:
|
||||
+ self.logicObj.clVars.Set('cl_kernel_src_path',values.k,True)
|
||||
+ elif self.checkNotEbuildParam(values,"postinst"):
|
||||
+ if not values.initrd and \
|
||||
+ not self.logicObj._testFullKernelDirectory(
|
||||
+ self.logicObj.clVars.Get('cl_kernel_src_path')):
|
||||
+ self.optobj.error((_("in default directory of kernel "
|
||||
+ "source not enough needed files")+"\n"+
|
||||
+ _("Probably calculate-sources was "
|
||||
+ "compiled with USE 'minimal'")))
|
||||
if values.c and values.o:
|
||||
self.optobj.error("%s: %s"%(_("incompatible options"),
|
||||
self.getStringIncompatibleOptions(["c","o"])))
|
||||
@@ -161,6 +179,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
|
||||
diff --git pym/cl_vars_builder.py pym/cl_vars_builder.py
|
||||
index 44e4965..c1fd439 100644
|
||||
--- pym/cl_vars_builder.py
|
||||
+++ pym/cl_vars_builder.py
|
||||
@@ -98,7 +98,7 @@ class Data:
|
||||
cl_builder_kernel_suffix = {}
|
||||
|
||||
# include portage directory from image
|
||||
- cl_builder_tree = {'value':'on'}
|
||||
+ cl_builder_tree = {'value':'off'}
|
||||
|
||||
cl_builder_isohybrid_set = {'value':'on'}
|
||||
|
@ -0,0 +1,30 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=3
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="
|
||||
cl_assemble
|
||||
cl_builder
|
||||
cl_server
|
||||
"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
!sys-apps/calculate-templates
|
||||
!<sys-apps/calculate-install-3.0.0_alpha1
|
||||
=sys-apps/calculate-lib-2.2.30
|
||||
=sys-apps/calculate-i18n-2.2.30-r1
|
||||
|
||||
cl_assemble? ( =sys-apps/calculate-assemble-2.2.30-r1 )
|
||||
cl_builder? ( =sys-apps/calculate-builder-2.2.30-r5 )
|
||||
|
||||
cl_server? ( =sys-apps/calculate-server-2.1.16-r5 )
|
||||
"
|
Loading…
Reference in new issue