parent
2d2f54b3bb
commit
18e7139519
@ -0,0 +1,51 @@
|
||||
# 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.2.0_alpha5
|
||||
>=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
|
||||
dosym /usr/sbin/cl-core /usr/sbin/cl-core-patch
|
||||
}
|
||||
|
||||
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.2.0_alpha5-r1.patch"
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
diff --git core/server/clean.py core/server/clean.py
|
||||
index 25cb323..44f7406 100644
|
||||
--- core/server/clean.py
|
||||
+++ core/server/clean.py
|
||||
@@ -21,23 +21,19 @@ from calculate.core.datavars import DataVarsCore
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
setLocalTranslate('cl_core3',sys.modules[__name__])
|
||||
|
||||
-# clear server files after restart
|
||||
-def clean (SID_FILE, PID_FILE, SID_PID, SIDS_DIR, PIDS_DIR):
|
||||
- if os.path.exists(SID_FILE):
|
||||
- os.unlink(SID_FILE)
|
||||
- if os.path.exists(PID_FILE):
|
||||
- os.unlink(PID_FILE)
|
||||
- if os.path.exists(SID_PID):
|
||||
- os.unlink(SID_PID)
|
||||
|
||||
- if os.path.isdir(SIDS_DIR):
|
||||
- for filename in glob.glob(os.path.join(SIDS_DIR, "*.sid")):
|
||||
- os.unlink (filename)
|
||||
- if os.path.exists(filename):
|
||||
- print 'Not deleted file %s!!!' %filename
|
||||
- if os.path.isdir(PIDS_DIR):
|
||||
- for filename in glob.glob(os.path.join(PIDS_DIR, "*.pid")):
|
||||
- os.unlink (filename)
|
||||
+def clean(sid_file, pid_file, sid_pid, sids_dir, pids_dir):
|
||||
+ """
|
||||
+ Удалить все файлы сервера после перезапуска
|
||||
+ """
|
||||
+ for fn in (sid_file, pid_file, sid_pid):
|
||||
+ if os.path.exists(fn):
|
||||
+ os.unlink(fn)
|
||||
+
|
||||
+ for dn in (sids_dir, pids_dir):
|
||||
+ if os.path.isdir(dn):
|
||||
+ for filename in glob.glob(os.path.join(dn, "*.sid")):
|
||||
+ os.unlink(filename)
|
||||
|
||||
class CoreWsdl:
|
||||
# watch for process
|
||||
diff --git core/server/func.py core/server/func.py
|
||||
index 9fdee9b..c167af8 100644
|
||||
--- core/server/func.py
|
||||
+++ core/server/func.py
|
||||
@@ -17,6 +17,7 @@
|
||||
import pickle, random
|
||||
import threading
|
||||
import sys, os, re
|
||||
+from os import path
|
||||
import traceback
|
||||
from traceback import print_exc
|
||||
from api_types import ReturnProgress,ViewParams,Integer,ViewInfo
|
||||
diff --git core/server/replace_class.py core/server/replace_class.py
|
||||
index aa83294..6e0da47 100644
|
||||
--- core/server/replace_class.py
|
||||
+++ core/server/replace_class.py
|
||||
@@ -352,7 +352,7 @@ class replaceClass():
|
||||
|
||||
def _printOK(self):
|
||||
self.terminal_print('\r')
|
||||
- self.terminal_print.right(self.color_print.getconsolewidth()-7)
|
||||
+ self.terminal_print.right(self.color_print.getconsolewidth()-6)
|
||||
self.terminal_print.bold.foreground(TextState.Colors.BLUE)("[ ")
|
||||
self.terminal_print.bold.foreground(TextState.Colors.GREEN)("ok")
|
||||
self.terminal_print.bold.foreground(TextState.Colors.BLUE)(" ]")
|
||||
@@ -360,7 +360,7 @@ class replaceClass():
|
||||
|
||||
def _printBAD(self):
|
||||
self.terminal_print('\r')
|
||||
- self.terminal_print.right(self.color_print.getconsolewidth()-7)
|
||||
+ self.terminal_print.right(self.color_print.getconsolewidth()-6)
|
||||
self.terminal_print.bold.foreground(TextState.Colors.BLUE)("[ ")
|
||||
self.terminal_print.bold.foreground(TextState.Colors.RED)("!!")
|
||||
self.terminal_print.bold.foreground(TextState.Colors.BLUE)(" ]")
|
||||
@@ -368,7 +368,7 @@ class replaceClass():
|
||||
|
||||
def _printSkip(self):
|
||||
self.terminal_print('\r')
|
||||
- self.terminal_print.right(self.color_print.getconsolewidth()-9)
|
||||
+ self.terminal_print.right(self.color_print.getconsolewidth()-8)
|
||||
self.terminal_print.bold.foreground(TextState.Colors.BLUE)("[ ")
|
||||
self.terminal_print.bold.foreground(TextState.Colors.YELLOW)("skip")
|
||||
self.terminal_print.bold.foreground(TextState.Colors.BLUE)(" ]")
|
||||
@@ -379,13 +379,12 @@ class replaceClass():
|
||||
self.spinner.stop()
|
||||
self.spinner = None
|
||||
self.setProgress(100, progress_message)
|
||||
- if self.progressbar and self.progressbar.finished:
|
||||
- self.terminal_print.up(1).clear_line("")
|
||||
- self.terminal_print.up(1)("")
|
||||
- self.progressbar = None
|
||||
-
|
||||
- # если result - сообщение
|
||||
if self.currentTaskMessage:
|
||||
+ if self.progressbar and self.progressbar.finished:
|
||||
+ self.terminal_print.up(1).clear_line("")
|
||||
+ self.terminal_print.up(1)("")
|
||||
+ self.progressbar = None
|
||||
+
|
||||
self.displayResult(result)
|
||||
self.currentTaskMessage = ""
|
||||
|
@ -0,0 +1,33 @@
|
||||
# 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 program of update Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="~sys-apps/calculate-core-3.2.0_alpha5
|
||||
~sys-apps/calculate-install-3.2.0_alpha5
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_alpha5-r2.patch"
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
diff --git update/emerge_parser.py update/emerge_parser.py
|
||||
index 597ba55..204e758 100644
|
||||
--- update/emerge_parser.py
|
||||
+++ update/emerge_parser.py
|
||||
@@ -57,7 +57,8 @@ class CommandExecutor(object):
|
||||
|
||||
def __init__(self, cmd, params, env=None, cwd=None, logfile=None):
|
||||
self.cwd = cwd
|
||||
- self.env = env
|
||||
+ self.env = env or dict(os.environ)
|
||||
+ self.env.update({'EINFO_QUIET':'NO'})
|
||||
self.cmd = cmd
|
||||
self.params = params
|
||||
self.child = None
|
||||
diff --git update/update.py update/update.py
|
||||
index ce66dd7..f9b1628 100644
|
||||
--- update/update.py
|
||||
+++ update/update.py
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
+import os
|
||||
|
||||
from calculate.lib.utils.tools import AddonError
|
||||
from calculate.lib.utils.colortext.palette import TextState
|
||||
@@ -124,15 +125,21 @@ class Update:
|
||||
if e.addon:
|
||||
self.printWARNING(str(e.addon))
|
||||
self.printWARNING(str(e))
|
||||
- self.printWARNING(_("Re-fetch {name} repository"
|
||||
- ).format(name=repname))
|
||||
+ self.printWARNING(
|
||||
+ _("Re-fetch {name} repository").format(name=repname))
|
||||
try:
|
||||
+ rpath_new = "%s_new" % rpath
|
||||
+ self._syncRepository(repname, url, rpath_new, revision,
|
||||
+ branch)
|
||||
removeDir(rpath)
|
||||
- except OSError as e:
|
||||
+ os.rename(rpath_new, rpath)
|
||||
+ except OSError:
|
||||
raise UpdateError(_("Permission denied to change "
|
||||
"{repname} repository").format(
|
||||
repname=repname))
|
||||
- self._syncRepository(repname, url, rpath, revision, branch)
|
||||
+ else:
|
||||
+ if not self._syncRepository(repname, url, rpath, revision, branch):
|
||||
+ return "skip"
|
||||
return True
|
||||
|
||||
def syncLaymanRepository(self, repname):
|
||||
diff --git update/utils/cl_update.py update/utils/cl_update.py
|
||||
index 033a3bd..82d9247 100644
|
||||
--- update/utils/cl_update.py
|
||||
+++ update/utils/cl_update.py
|
||||
@@ -133,8 +133,7 @@ class ClUpdateAction(Action):
|
||||
'group': __("Updating Calculate Utilities"),
|
||||
'tasks': [
|
||||
{'name': 'update:update_calculate_pkgs',
|
||||
- 'message': __("Updating {0}").format(
|
||||
- pkg_color("sys-apps/calculate-utilities")),
|
||||
+ 'message': __("Calculating dependencies"),
|
||||
'method': 'Update.emerge("-u","sys-apps/calculate-utilities")',
|
||||
'condition': need_upgrade('sys-apps/calculate-utilities$')
|
||||
},
|
@ -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.2.0_alpha5
|
||||
=sys-apps/calculate-i18n-3.2.0_alpha5
|
||||
=sys-apps/calculate-lib-3.2.0_alpha5
|
||||
=sys-apps/calculate-core-3.2.0_alpha5-r1
|
||||
=sys-apps/calculate-update-3.2.0_alpha5-r2
|
||||
cl_client? ( =sys-apps/calculate-client-3.2.0_alpha5-r2 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.2.0_alpha5 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.2.0_alpha5-r1 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.2.0_alpha5 )
|
||||
"
|
Loading…
Reference in new issue