parent
f6f3d78396
commit
bedb7f8590
@ -0,0 +1,49 @@
|
||||
# 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 WSDL core for Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="minimal"
|
||||
|
||||
DEPEND="~sys-apps/calculate-lib-3.1.1_beta2
|
||||
>=dev-python/soaplib-1.0
|
||||
!minimal? ( dev-python/sudsds
|
||||
net-libs/dslib
|
||||
dev-python/pyopenssl
|
||||
dev-libs/openssl
|
||||
dev-python/m2crypto
|
||||
dev-python/cherrypy )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_preinst() {
|
||||
dosym /usr/sbin/cl-core /usr/sbin/cl-core-setup
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "For autoconfigure calculate-core for adminuser perform:"
|
||||
einfo " cl-core --bootstrap <username>"
|
||||
einfo "For run calculate-core perform:"
|
||||
einfo " /etc/init.d/calculate-core start"
|
||||
einfo "Add calcualte core to autorun:"
|
||||
einfo " rc-update add calculate-core boot"
|
||||
}
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-core-3.1.1_beta2-r3.patch"
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
diff --git core/server/replace_class.py core/server/replace_class.py
|
||||
index d476d06..392e29c 100644
|
||||
--- core/server/replace_class.py
|
||||
+++ core/server/replace_class.py
|
||||
@@ -29,6 +29,7 @@ from methods_func import getErrorOnParam
|
||||
from func import shortTraceback
|
||||
from fcntl import ioctl
|
||||
from array import array
|
||||
+import threading
|
||||
from calculate.lib.cl_print import color_print
|
||||
from calculate.lib.datavars import VariableError
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
@@ -40,6 +41,9 @@ class replaceClass():
|
||||
def startprocess (self, sid, target=None, method=None, method_name=None, \
|
||||
auto_delete=False, args_proc = {}):
|
||||
""" start process """
|
||||
+ if "LANG" in os.environ:
|
||||
+ curThread = threading.currentThread()
|
||||
+ curThread.lang = os.environ["LANG"]
|
||||
com = target(self.no_progress,self.gui_progress,self.gui_warning)
|
||||
if hasattr (com.__class__.__bases__[1], '__init__'):
|
||||
com.__class__.__bases__[1].__init__(com)
|
||||
diff --git core/server/setup_package.py core/server/setup_package.py
|
||||
index cb9838e..6b48b73 100644
|
||||
--- core/server/setup_package.py
|
||||
+++ core/server/setup_package.py
|
||||
@@ -177,10 +177,7 @@ class updateUserConfigs(shareUpdateConfigs):
|
||||
dictPakkages = {}
|
||||
listIndex = []
|
||||
mergeProgram = "calculate-utilities"
|
||||
- self.startTask(_("Users configuring the {nameProgram} package by "
|
||||
- "Calculate utilities").format(
|
||||
- nameProgram=nameProgram),
|
||||
- progress=True)
|
||||
+ firstValue = True
|
||||
for userName in xUsers:
|
||||
clVars.Set("cl_root_path", '/', True)
|
||||
clVars.Set("ur_login", userName, True)
|
||||
@@ -199,7 +196,15 @@ class updateUserConfigs(shareUpdateConfigs):
|
||||
self.setProgress,
|
||||
clVars, cltObj = False,
|
||||
printWarning=False)
|
||||
+ clTempl.onFirstValue = lambda *args: \
|
||||
+ self.startTask(
|
||||
+ _("User configuring the {nameProgram} package by "
|
||||
+ "Calculate Utilities").format(
|
||||
+ nameProgram=nameProgram),
|
||||
+ progress=True)
|
||||
+ clTempl.firstValue = firstValue
|
||||
dirsFiles = clTempl.applyTemplates()
|
||||
+ firstValue = clTempl.firstValue
|
||||
if dirsFiles is False:
|
||||
self.printERROR(\
|
||||
_("Error using templates for the user %s")\
|
||||
@@ -218,7 +223,7 @@ class updateUserConfigs(shareUpdateConfigs):
|
||||
self.endTask()
|
||||
if dictPakkages:
|
||||
for calcPkg in listIndex:
|
||||
- self.printSUCCESS(_("Calculate utilities have changed files")\
|
||||
+ self.printSUCCESS(_("Calculate Utilities have changed files")\
|
||||
+":")
|
||||
for userName, configFiles in dictPakkages[calcPkg]:
|
||||
self.printSUCCESS(" "*2 + _("User %s")%userName + ":")
|
||||
@@ -346,16 +351,16 @@ class updateSystemConfigs(shareUpdateConfigs):
|
||||
clTempl = False
|
||||
#for mergeProgram in filter(None,mergePrograms):
|
||||
mergeProgram = "calculate-utilities"
|
||||
- if variables.Get('cl_ebuild_phase') == "preinst":
|
||||
- self.startTask(_("Package configuring the {nameProgram} package by "
|
||||
- "Calculate utilities").format(
|
||||
- nameProgram=nameProgram),
|
||||
- progress=True)
|
||||
- else:
|
||||
- self.startTask(_("System configuring for {nameProgram} package by "
|
||||
- "Calculate utilities").format(
|
||||
- nameProgram=nameProgram),
|
||||
- progress=True)
|
||||
+ #if variables.Get('cl_ebuild_phase') == "preinst":
|
||||
+ # self.startTask(_("Package configuring the {nameProgram} package by "
|
||||
+ # "Calculate Utilities").format(
|
||||
+ # nameProgram=nameProgram),
|
||||
+ # progress=True)
|
||||
+ #else:
|
||||
+ # self.startTask(_("System configuring for {nameProgram} package by "
|
||||
+ # "Calculate Utilities").format(
|
||||
+ # nameProgram=nameProgram),
|
||||
+ # progress=True)
|
||||
clVars.Set("cl_root_path", configPath, True)
|
||||
if variables.Get('cl_core_pkg_root_set') == 'on':
|
||||
clVars.Set("cl_root_path_next", '/', True)
|
||||
@@ -390,6 +395,11 @@ class updateSystemConfigs(shareUpdateConfigs):
|
||||
printERROR=self.printERROR,
|
||||
printWARNING=self.printWARNING,
|
||||
printWarning=False)
|
||||
+ clTempl.onFirstValue = lambda *args: \
|
||||
+ self.startTask(_("System configuring for {nameProgram} package by "
|
||||
+ "Calculate Utilities").format(
|
||||
+ nameProgram=nameProgram),
|
||||
+ progress=True)
|
||||
dirsFiles = clTempl.applyTemplates()
|
||||
# fix CONTENTS pkg file
|
||||
cfgs = getCfgFiles()
|
||||
@@ -454,7 +464,7 @@ class updateSystemConfigs(shareUpdateConfigs):
|
||||
if dictPakkages:
|
||||
reGrey = re.compile(r"\._cfg\d{4}_")
|
||||
for calcPkg in listIndex:
|
||||
- self.SUCCESS(_("Calculate utilities have changed files")+":")
|
||||
+ self.SUCCESS(_("Calculate Utilities have changed files")+":")
|
||||
for nameF in dictPakkages[calcPkg]:
|
||||
nameFile = nameF.partition(configPath)[2]
|
||||
if nameFile:
|
@ -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-r1.patch"
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||
index 55527cd..1da632a 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
|
||||
@@ -4399,6 +4407,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
|
||||
@@ -5693,6 +5702,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 +6119,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 +6132,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
|
@ -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-r4
|
||||
=sys-apps/calculate-i18n-3.1.1_beta2
|
||||
=sys-apps/calculate-lib-3.1.1_beta2-r1
|
||||
=sys-apps/calculate-core-3.1.1_beta2-r3
|
||||
=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