parent
23600118f6
commit
5a459f8b30
@ -0,0 +1,35 @@
|
||||
# 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/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The library for Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="x86 amd64"
|
||||
IUSE="minimal"
|
||||
DEPEND="!minimal? ( dev-python/py-smbpasswd )
|
||||
>=dev-python/pyxml-0.8
|
||||
sys-apps/iproute2
|
||||
sys-apps/pciutils
|
||||
sys-fs/lvm2
|
||||
sys-fs/mdadm
|
||||
dev-python/pyinotify
|
||||
sys-apps/file[python]"
|
||||
RDEPEND="${DEPEND}"
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-lib-3.1.1_beta2-r6.patch"
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||
index 55527cd..6662c25 100644
|
||||
--- calculate/lib/cl_template.py
|
||||
+++ calculate/lib/cl_template.py
|
||||
@@ -4039,6 +4039,12 @@ gettext -d cl_template "$*"
|
||||
"""
|
||||
return True
|
||||
|
||||
+ def templateModify(self,filesApl):
|
||||
+ """
|
||||
+ Files which created by apping templates
|
||||
+ """
|
||||
+ return True
|
||||
+
|
||||
def fixNameFileConfig(self,origfilename):
|
||||
"""Support ._cfg0000 files for postinst"""
|
||||
if self.objVar.Get('cl_ebuild_phase') != 'postinst':
|
||||
@@ -4229,6 +4235,8 @@ gettext -d cl_template "$*"
|
||||
self.cltObj.numberProcessTempl = self.allTemplates
|
||||
# метод показывающий номер clt шаблона
|
||||
self.cltObj.numberProcessTemplates = self.numberProcessTemplates
|
||||
+ # метод показывающий номер clt шаблона
|
||||
+ self.cltObj.templateModify = self.templateModify
|
||||
# общее количество шаблонов
|
||||
self.allTemplates += self.cltObj.allTemplates
|
||||
self.cltObj.allTemplates = self.allTemplates
|
||||
@@ -4273,13 +4281,15 @@ gettext -d cl_template "$*"
|
||||
self.cltObj.filterApplyTemplates[filename].append(pkg)
|
||||
if not self.cltObj.applyTemplates():
|
||||
return False
|
||||
- if self.objVar.Get('cl_merge_pkg') and \
|
||||
+ if (self.objVar.Get('cl_merge_pkg') or \
|
||||
+ self.objVar.Get('cl_action') == "sync") and \
|
||||
self.objVar.Get('cl_merge_pkg_new'):
|
||||
self.objVar.Set('cl_root_path',
|
||||
self.objVar.Get('cl_root_path_next'),force=True)
|
||||
self.recalculateBaseDir()
|
||||
self.objVar.Set('cl_merge_pkg_pass',list(
|
||||
set(self.objVar.Get('cl_merge_pkg_pass'))|
|
||||
+ set(self.objVar.Get('cl_merge_pkg'))|
|
||||
set(self.objVar.Get('cl_merge_pkg_new'))),force=True)
|
||||
self.objVar.Set('cl_merge_pkg',
|
||||
self.objVar.Get('cl_merge_pkg_new'),force=True)
|
||||
@@ -4399,6 +4409,7 @@ gettext -d cl_template "$*"
|
||||
nameEnvFile = os.path.basename(nameFileConfig)
|
||||
self.functObj.timeConfigsIni[nameEnvFile] = float(time.time())
|
||||
self.filesApply += filesApl
|
||||
+ self.templateModify(filesApl)
|
||||
if filesApl:
|
||||
self._addFile(filesApl)
|
||||
return True
|
||||
@@ -4537,7 +4548,8 @@ gettext -d cl_template "$*"
|
||||
wrongPkg + ": " + nameFileTemplate)
|
||||
for pkg in mergePkgs:
|
||||
if not pkg in self.objVar.Get('cl_merge_pkg_new') and \
|
||||
- not pkg in self.objVar.Get('cl_merge_pkg_pass'):
|
||||
+ not pkg in self.objVar.Get('cl_merge_pkg_pass') and \
|
||||
+ not pkg in self.objVar.Get('cl_merge_pkg'):
|
||||
self.objVar.Get('cl_merge_pkg_new').append(pkg)
|
||||
|
||||
# Пропускаем директорию
|
||||
@@ -4824,7 +4836,8 @@ gettext -d cl_template "$*"
|
||||
wrongPkg + ": " + nameFileTemplate)
|
||||
for pkg in mergePkgs:
|
||||
if not pkg in self.objVar.Get('cl_merge_pkg_new') and \
|
||||
- not pkg in self.objVar.Get('cl_merge_pkg_pass'):
|
||||
+ not pkg in self.objVar.Get('cl_merge_pkg_pass') and \
|
||||
+ not pkg in self.objVar.Get('cl_merge_pkg'):
|
||||
self.objVar.Get('cl_merge_pkg_new').append(pkg)
|
||||
|
||||
# Родительская директория
|
||||
@@ -5693,6 +5706,7 @@ class templateClt(scanDirectoryClt, Template):
|
||||
nameEnvFile = os.path.basename(nameFileConfig)
|
||||
self.functObj.timeConfigsIni[nameEnvFile] = float(time.time())
|
||||
self.filesApply += filesApl
|
||||
+ self.templateModify(filesApl)
|
||||
return nameFileConfig
|
||||
else:
|
||||
return True
|
||||
@@ -6109,6 +6123,7 @@ class ProgressTemplate(Template):
|
||||
Template.__init__(self, *args, **kwargs)
|
||||
self.setValueCallback = setValueCallback
|
||||
self.value = None
|
||||
+ self.firstValue = True
|
||||
|
||||
def numberAllTemplates(self, number):
|
||||
self.maximum = number
|
||||
@@ -6121,3 +6136,8 @@ class ProgressTemplate(Template):
|
||||
self.setValueCallback(min(100,max(0,value)))
|
||||
self.value = value
|
||||
return True
|
||||
+
|
||||
+ def templateModify(self,filesApl):
|
||||
+ if self.firstValue and hasattr(self,"onFirstValue"):
|
||||
+ self.onFirstValue()
|
||||
+ self.firstValue = False
|
||||
diff --git calculate/lib/utils/device.py calculate/lib/utils/device.py
|
||||
index 50351bc..1ae7a07 100644
|
||||
--- calculate/lib/utils/device.py
|
||||
+++ calculate/lib/utils/device.py
|
||||
@@ -385,9 +385,11 @@ def refreshLVM():
|
||||
|
||||
if vgscan and vgchange and lvchange:
|
||||
process(vgscan).success()
|
||||
- process(vgchange,'-ay','--refresh').success()
|
||||
+ process(vgchange,'-ay').success()
|
||||
+ process(vgchange,'--refresh').success()
|
||||
for group in getLvmGroups():
|
||||
- process(lvchange,'-ay','--refresh',group).success()
|
||||
+ process(lvchange,'-ay',group).success()
|
||||
+ process(lvchange,'--refresh',group).success()
|
||||
|
||||
def refreshUdev():
|
||||
"""Run command which refresh information about device in udev"""
|
||||
diff --git calculate/lib/variables/hardware.py calculate/lib/variables/hardware.py
|
||||
index d2f4111..8305014 100644
|
||||
--- calculate/lib/variables/hardware.py
|
||||
+++ calculate/lib/variables/hardware.py
|
||||
@@ -71,14 +71,17 @@ class VariableHrVirtual(ReadonlyVariable):
|
||||
"""
|
||||
|
||||
def get(self):
|
||||
- # TODO: need test in virtual machine
|
||||
virtSysDict = {'VirtualBox':'virtualbox',
|
||||
'VMware':'vmware',
|
||||
'Qumranet':'qemu'}
|
||||
reVirtInfo = re.compile("|".join(virtSysDict.keys()))
|
||||
devices = lspci(reVirtInfo.search)
|
||||
for device in devices.values():
|
||||
- return virtSysDict[reVirtInfo.search(device['name']).group()]
|
||||
+ nameRes = reVirtInfo.search(device['name'])
|
||||
+ if not nameRes:
|
||||
+ nameRes = reVirtInfo.search(device['vendor'])
|
||||
+ if nameRes:
|
||||
+ return virtSysDict[nameRes.group()]
|
||||
return ""
|
||||
|
||||
class VariableHrLaptop(ReadonlyVariable):
|
||||
@@ -94,7 +97,8 @@ class VariableHrLaptop(ReadonlyVariable):
|
||||
boardVendor = '/sys/class/dmi/id/board_vendor'
|
||||
notebookChassis = ['1','8','10']
|
||||
if readFile(chassisType).strip() in notebookChassis:
|
||||
- return readFile(boardVendor).strip().split(" ")[0] or "unknown"
|
||||
+ return (readFile(boardVendor).strip().split(" ")[0]).lower() or \
|
||||
+ "unknown"
|
||||
return ""
|
||||
|
||||
class VariableHrLaptopModel(ReadonlyVariable):
|
||||
diff --git calculate/lib/variables/user.py calculate/lib/variables/user.py
|
||||
index 835a780..d53cdd7 100644
|
||||
--- calculate/lib/variables/user.py
|
||||
+++ calculate/lib/variables/user.py
|
||||
@@ -84,7 +84,8 @@ class VariableUrLogin(Variable,LdapHelper):
|
||||
self.label = _("User name")
|
||||
|
||||
def choice(self):
|
||||
- return [""]+list(set(self.getLdapUserlist()+getPasswdUsers()))
|
||||
+ return [""]+sorted(list(set(
|
||||
+ self.getLdapUserlist()+getPasswdUsers())))
|
||||
|
||||
def check(self,value):
|
||||
"""Does user exist"""
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="cl_consolegui cl_client cl_desktop cl_console"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-3.1.1_beta2-r9
|
||||
=sys-apps/calculate-i18n-3.1.1_beta2-r2
|
||||
=sys-apps/calculate-lib-3.1.1_beta2-r6
|
||||
=sys-apps/calculate-core-3.1.1_beta2-r7
|
||||
=sys-apps/calculate-update-3.1.1_beta2
|
||||
cl_client? ( =sys-apps/calculate-client-3.1.1_beta2 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.1.1_beta2 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.1_beta2 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.1.1_beta2 )
|
||||
"
|
Loading…
Reference in new issue