parent
fd8a22da7b
commit
a5798964ca
@ -0,0 +1,29 @@
|
||||
# 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="Console client for WSDL Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-core-3.2.0_alpha4"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-console-3.2.0_alpha4-r1.patch"
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
diff --git console/application/function.py console/application/function.py
|
||||
index 0e6f548..77968b5 100644
|
||||
--- console/application/function.py
|
||||
+++ console/application/function.py
|
||||
@@ -21,10 +21,12 @@ import termios
|
||||
import subprocess
|
||||
from OpenSSL import crypto
|
||||
import shlex
|
||||
+from calculate.core.server.func import shortTraceback
|
||||
from calculate.lib.utils.colortext import get_terminal_print
|
||||
from sudsds import MethodNotFound
|
||||
from calculate.core.server.cert_cmd import getHwAddr, getIpLocal
|
||||
-from calculate.core.server.replace_class import printTable,Methods
|
||||
+from calculate.core.server.replace_class import (printTable, Methods,
|
||||
+ print_brief_group)
|
||||
|
||||
from calculate.core.client.progressbar import Bar,Percentage,ETA,ProgressBar
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
@@ -97,133 +99,6 @@ def get_ip_mac_type(client_type = None):
|
||||
results.append ('console')
|
||||
return results
|
||||
|
||||
-def print_brief_group(Fields, group_name):
|
||||
- print_group_flag = False
|
||||
-# if group_name:
|
||||
-# _print ('\b'+group_name)
|
||||
- uncompatible_count = 0
|
||||
- for field in Fields:
|
||||
- if field.uncompatible:
|
||||
- uncompatible_count += 1
|
||||
- continue
|
||||
- if field.element in ['input', 'openfile']:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- _print ('\b'+group_name)
|
||||
- print_group_flag = True
|
||||
- colorPrint._printSUCCESS('%s: %s' %(field.label, value))
|
||||
-
|
||||
- elif field.element in ['combo', 'comboEdit', 'radio', 'file']:
|
||||
- if hasattr (field.comments, 'string') and field.value in \
|
||||
- field.choice.string:
|
||||
- value = map(lambda x: field.comments.string[x] \
|
||||
- if len(field.comments.string) > x \
|
||||
- else field.choice.string[x],
|
||||
- map(lambda x: field.choice.string.index(x), \
|
||||
- [field.value]))
|
||||
- value = ', '.join(value)
|
||||
- else:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- _print ('\b'+group_name)
|
||||
- print_group_flag = True
|
||||
- colorPrint._printSUCCESS('%s: %s' %(field.label, value))
|
||||
-
|
||||
- elif field.element in ['multichoice', 'multichoice_add',\
|
||||
- 'selecttable', 'selecttable_add']:
|
||||
- if hasattr (field.comments, 'string') and \
|
||||
- hasattr (field.listvalue, 'string'):
|
||||
- value = map(lambda x: field.comments.string[x] \
|
||||
- if len(field.comments.string) > x \
|
||||
- else field.choice.string[x],
|
||||
- map(lambda x: field.choice.string.index(x), \
|
||||
- field.listvalue.string))
|
||||
- value = ', '.join(value)
|
||||
- elif hasattr (field.listvalue, 'string'):
|
||||
- value = ', '.join(field.listvalue.string)
|
||||
- else:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- _print ('\b'+group_name)
|
||||
- print_group_flag = True
|
||||
- colorPrint._printSUCCESS('%s: %s' %(field.label, value))
|
||||
-
|
||||
-# elif field.element == 'label':
|
||||
-# print field.label
|
||||
-
|
||||
- elif field.element == 'error':
|
||||
- if not print_group_flag:
|
||||
- _print ('\b'+group_name)
|
||||
- print_group_flag = True
|
||||
- colorPrint.printERROR(field.label)
|
||||
-
|
||||
- elif field.element in ['check', 'check_tristate']:
|
||||
- if field.value == 'on':
|
||||
- value = _('yes')
|
||||
- elif field.value == 'off':
|
||||
- value = _('no')
|
||||
- elif field.value == 'auto':
|
||||
- value = _('auto')
|
||||
- else:
|
||||
- value = field.value
|
||||
- if not print_group_flag:
|
||||
- _print ('\b'+group_name)
|
||||
- print_group_flag = True
|
||||
- colorPrint._printSUCCESS('%s: %s' %(field.label, value))
|
||||
-
|
||||
- elif field.element == 'table' and field.type != 'steps':
|
||||
- if hasattr (field.tablevalue.head, 'string'):
|
||||
- head = field.tablevalue.head.string
|
||||
- else: head = None
|
||||
-
|
||||
- body = []
|
||||
- if hasattr (field.tablevalue.body, 'stringArray'):
|
||||
- for row in field.tablevalue.body.stringArray:
|
||||
- if hasattr(row, 'string'):
|
||||
- body.append(row.string)
|
||||
- else: body = [[]]
|
||||
-
|
||||
- # if empty table
|
||||
- if not filter (None, map(lambda x: x, body)):
|
||||
- body = [['']*len(head)]
|
||||
- res = printTable(body, head)
|
||||
- sys.stdout.flush()
|
||||
- sys.stdout.write(res)
|
||||
- continue
|
||||
-
|
||||
- ChoiceValue = field.tablevalue.values.ChoiceValue
|
||||
- for row in xrange(len(ChoiceValue)):
|
||||
- if ChoiceValue[row].typefield in ['check', 'check_tristate']:
|
||||
- for i in xrange(len(body)):
|
||||
- if body[i][row] == 'on':
|
||||
- body[i][row] = _('yes')
|
||||
- if body[i][row] == 'off':
|
||||
- body[i][row] = _('no')
|
||||
- if body[i][row] == 'auto':
|
||||
- body[i][row] = _('auto')
|
||||
- if ChoiceValue[row].typefield == 'password':
|
||||
- for i in xrange(len(body)):
|
||||
- if body[i][row]:
|
||||
- body[i][row] = '***'
|
||||
-
|
||||
- data = []
|
||||
- for body_row in body:
|
||||
- data.append(map(lambda x: x if x else '', body_row))
|
||||
-
|
||||
- if not print_group_flag:
|
||||
- _print ('\b'+group_name)
|
||||
- print_group_flag = True
|
||||
- colorPrint._printSUCCESS('%s: ' %(field.label))
|
||||
- res = printTable(data, head)
|
||||
- sys.stdout.write(res+"\n")
|
||||
- sys.stdout.flush()
|
||||
-
|
||||
- else:
|
||||
- uncompatible_count += 1
|
||||
-
|
||||
-# if uncompatible_count == len (Fields) and group_name:
|
||||
-# colorPrint._printSUCCESS(_('Not used'))
|
||||
-
|
||||
def print_brief(view, brief_label):
|
||||
for Group in view.groups.GroupField:
|
||||
if Group.name:
|
@ -0,0 +1,44 @@
|
||||
# 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 installation Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="pxe minimal"
|
||||
|
||||
DEPEND="~sys-apps/calculate-core-3.2.0_alpha4
|
||||
!<sys-apps/calculate-install-2.2.29
|
||||
app-portage/layman
|
||||
>=virtual/udev-197
|
||||
!app-misc/livecd-tools
|
||||
sys-apps/iproute2[-minimal]
|
||||
!minimal? ( sys-boot/grub
|
||||
sys-apps/gptfdisk
|
||||
>=sys-apps/util-linux-2.19.1
|
||||
sys-fs/dosfstools
|
||||
sys-fs/squashfs-tools
|
||||
sys-block/parted )
|
||||
pxe? ( sys-apps/calculate-server
|
||||
net-ftp/tftp-hpa
|
||||
net-misc/dhcp
|
||||
net-fs/nfs-utils )"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-install-3.2.0_alpha4-r1.patch"
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
diff --git install/variables/distr.py install/variables/distr.py
|
||||
index 5c23c17..001b5cd 100644
|
||||
--- install/variables/distr.py
|
||||
+++ install/variables/distr.py
|
||||
@@ -143,6 +143,7 @@ class DistroRepository(Linux):
|
||||
|
||||
def listdistr(pathname):
|
||||
if path.exists(path.join(pathname,'etc/make.profile')) or \
|
||||
+ path.exists(path.join(pathname,'etc/portage/make.profile')) or \
|
||||
path.exists(path.join(pathname,'livecd')) or \
|
||||
pathname.startswith('/dev/'):
|
||||
return [pathname]
|
@ -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_alpha4-r1
|
||||
=sys-apps/calculate-i18n-3.2.0_alpha4
|
||||
=sys-apps/calculate-lib-3.2.0_alpha4-r1
|
||||
=sys-apps/calculate-core-3.2.0_alpha4-r1
|
||||
=sys-apps/calculate-update-3.2.0_alpha4-r1
|
||||
cl_client? ( =sys-apps/calculate-client-3.2.0_alpha4 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.2.0_alpha4 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.2.0_alpha4 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.2.0_alpha4-r1 )
|
||||
"
|
Loading…
Reference in new issue