parent
648fcc2785
commit
6de6a3df59
@ -1,32 +0,0 @@
|
||||
# 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 setting and storing the user account in the domain"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-desktop-3.2.0_alpha1
|
||||
!<sys-apps/calculate-client-3.1.0
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
>=sys-apps/keyexec-0.1.2
|
||||
dev-qt/qtdbus
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,32 +0,0 @@
|
||||
# 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 setting and storing the user account in the domain"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-desktop-3.2.0_alpha2
|
||||
!<sys-apps/calculate-client-3.1.0
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
>=sys-apps/keyexec-0.1.2
|
||||
dev-qt/qtdbus
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,32 +0,0 @@
|
||||
# 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 setting and storing the user account in the domain"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-desktop-3.2.0_alpha3
|
||||
!<sys-apps/calculate-client-3.1.0
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
>=sys-apps/keyexec-0.1.2
|
||||
dev-qt/qtdbus
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,32 +0,0 @@
|
||||
# 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 setting and storing the user account in the domain"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-desktop-3.2.0_alpha4
|
||||
!<sys-apps/calculate-client-3.1.0
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
>=sys-apps/keyexec-0.1.2
|
||||
dev-qt/qtdbus
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,40 +0,0 @@
|
||||
# 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 setting and storing the user account in the domain"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-desktop-3.2.0_alpha5
|
||||
!<sys-apps/calculate-client-3.1.0
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
>=sys-apps/keyexec-0.1.2
|
||||
dev-qt/qtdbus
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-client-3.2.0_alpha5-r1.patch"
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
# 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 setting and storing the user account in the domain"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-desktop-3.2.0_alpha5
|
||||
!<sys-apps/calculate-client-3.1.0
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
>=sys-apps/keyexec-0.1.2
|
||||
dev-qt/qtdbus
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-client-3.2.0_alpha5-r2.patch"
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
# 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 setting and storing the user account in the domain"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-desktop-3.2.0_alpha5
|
||||
!<sys-apps/calculate-client-3.1.0
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
>=sys-apps/keyexec-0.1.2
|
||||
dev-qt/qtdbus
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,21 +0,0 @@
|
||||
diff --git setup.py setup.py
|
||||
index 1209a33..f873cdf 100755
|
||||
--- setup.py
|
||||
+++ setup.py
|
||||
@@ -24,10 +24,16 @@ from distutils.core import setup, Extension
|
||||
from calculate.install_data import install_data
|
||||
|
||||
data_files = [('/etc/init.d', [('data/client',0755)]),
|
||||
+ ('/usr/sbin', [('data/logout', 0755)]),
|
||||
+ ('/usr/sbin', [('data/cl-client-resume-remount', 0755)]),
|
||||
('/usr/share/calculate/xdm/login.d',
|
||||
['data/login.d/10client']),
|
||||
+ ('/usr/share/calculate/xdm/login.d',
|
||||
+ ['data/login.d/15resume_remount']),
|
||||
('/usr/share/calculate/xdm/logout.d',
|
||||
['data/logout.d/10client']),
|
||||
+ ('/usr/share/calculate/xdm/logout.d',
|
||||
+ ['data/login.d/15resume_remount']),
|
||||
('/usr/share/calculate/xdm/',[('data/wait_domain',0755)])]
|
||||
|
||||
setup(
|
@ -1,19 +1,5 @@
|
||||
AUX calculate-console-gui-3.2.0_alpha5-r1.patch 752 SHA256 cc1ce918363673baa06b83e07237a234ea46663a779d5636733143525be9776f SHA512 a13e3c74a17840b95856d8b981ceddf5924178fe647cf7699f3ff4626b252d520a305c25baa26ae16a3c2e9aa2d49b8140c45607be138f1d513dfd9cbb1a0c11 WHIRLPOOL 5c2861bd7663b0355196e604dae304b8e5ecdf446cefdefde67f515157785e7565874907b0ec2cb7f3ed2dc3be1747c5a4f281b828f76b2d5537552a2908bdee
|
||||
AUX calculate-console-gui-3.2.0_alpha5-r2.patch 3780 SHA256 76f8d2cdef3bdad3fee4f29b828f268561a0cecb41304f7617ea80189cc4b82c SHA512 bb6ffd23be55db7947e12c3319f6c7e2c9c71853e158236c8b8b33e7ac4be049c1b2a5cb0e75702e09bbe4f20455c5c13000905e4b750a345773ff2e15cc7608 WHIRLPOOL a41315ce832dec8e18d81eb4dbdd2471ca097db801f03ffeefade2bbce911ff25f4ebb4d8776b9c033fc19901ccf40d0c013bb86058c84cd8c6d4510127a8576
|
||||
DIST calculate-console-gui-3.2.0_alpha1.tar.bz2 320250 SHA256 8399ccbe7e1674f969f23eed8c55553cfd0b95a7f4b48ed1fa20d8f5b99996e4 SHA512 c8681b4261b4fb759e7db11c75c6c05cb84dfa21fc49a178b396e4ee255bc88c048b0030ecb51b18e6163a100ecff27466916bcf585bc41310d1d54c9a13fa5c WHIRLPOOL ac7a815f7937bd68d2e3f9d7ef6823c87933dd64b7268a16ca65a151fe17d454aec77fa6e315607b554c372e6b9cf51dd6b4e26ecdbe0143fecc5219770ddc7f
|
||||
DIST calculate-console-gui-3.2.0_alpha2.tar.bz2 319438 SHA256 73a0a472866a6bcdca5e2f3e9a10229d7d773604a0026807c293829264ac7be9 SHA512 d3064e751bb83a16560942b7e193e4ae1b421a7525f70001990ee7060401d14c7be511ed0eaedaf76cf5e6ac5fbe2782bdbbc5042911c6c5ca7b9b55acc910ef WHIRLPOOL c4d72c404ab61f44537f246b86fa15b7ad9fb6e4c3a2b8661d07a72b1b1a10ca380ccd5239eed652f501f9eee7e2508e8fc6bac2f8560635e809c6da2608529f
|
||||
DIST calculate-console-gui-3.2.0_alpha3.tar.bz2 319575 SHA256 f808ec79be33f2b81bce0fbff2ef707f92b5c0fbedbda04511283e3bfdf04818 SHA512 151722d110a8f517b94e07010e0d4d93d29c98160e6efaf7558e4d586bafa416bfb1f44e5b21a683492dc66ed9ed37fcb9f81117397f14c8519aa5c1b4ea1940 WHIRLPOOL cb797f7b03d125146c4d875608f3ee8bd6b064d7751762f14fea748abca0f93591808a2a01f149ddc3b4a6574b9aa98fbf66ffd21d821b8b5cf1638e12bc8d91
|
||||
DIST calculate-console-gui-3.2.0_alpha4.tar.bz2 319434 SHA256 0b379df628302ab9afcdb975ecf4c787a95422e80884a030860f636200e60738 SHA512 e04516251302bd4dcc4e71604039dc0ce535208e0f2a0bdf89c45048ae7782ead1d460dbadcc8044d56de403535f8b3f69faa2d18ea4b4d2893c5f08dfa28a18 WHIRLPOOL 3b9fae3f41e9ed0a330352f1a8a21c046d49b45f26e2665bc7105188c17d9911e480e183e36a1530b0ff2e7026c3939ed4aa7f9da1c3a053e6ddbd85716e3ac5
|
||||
DIST calculate-console-gui-3.2.0_alpha5.tar.bz2 319409 SHA256 65eda4164c9f857746877073ade5faee595bd687874e043a0b4752ee91237c28 SHA512 9a687c620bf31a4b781ea627fb079dac7d8f8f48c9f3e38256ba6e8bf2bc9e1dbb88ca3995ee3f4d34a11d93757ed4dd49d68eee2dfc3fad48e480f6917d56df WHIRLPOOL 45aa450af761f2c4590204fe37d99d10c68a8754075ad5c67237dcb8833f9e1dfc07ea597bf3abe5720eadca2ff99aef8d0301d77eff0edc37e4c5ec5e150c34
|
||||
DIST calculate-console-gui-3.2.0_alpha6.tar.bz2 319528 SHA256 3e17f90e7dd32f66268a40de12184fa7b7e4a2bdb6545695d99f16633ade00f0 SHA512 0a2d28551b2536889d6aef9d1ddc751d55e3ef34cfc9c25f2f2a85ced132570bcad5864776bedf93359193de5a1690f7f194f75d6d09777429120e88feaf6026 WHIRLPOOL a5095f2e385eecad4a3170d3d0c52614502d57c9e1a9dd52e7f4ff1d1dfda6c17122f31cf312b2fd1f75eee84b6beeb0e3d0b12cbb71f9375b1ee702c2fcc305
|
||||
DIST calculate-console-gui-3.2.0_alpha7.tar.bz2 319586 SHA256 6a7ab60c3340804144a7429d074c522585a6bd79e69a7686b353e88f57df7be6 SHA512 3c60f3e6cea103906a02429d094c6df3f60816f42848ea69ab475c91e76081ed451a191a946b718b4ee135cd42aa52bed74a4c01698495140b28fe34136c2d62 WHIRLPOOL b44941e00f8cea7f4a45d1d7bc641ea4ad4da027b0bec7dafaffe81ee38517543c26be8d8c3784dfc66342ee5de77a4bc2feb60bc4edd87ef885d96d8be0060f
|
||||
EBUILD calculate-console-gui-3.2.0_alpha1.ebuild 634 SHA256 795f6e1e109fdc34e5b869de81aad5763c046e464890e4adf6496eb8f29b22cf SHA512 ae799087669681e86c56d52b8aaf5b30b24e82f2053b9965c03314899b5f80c75f66dcf1ec0f87e1965bf0f94a26967607a984dd9650ebdbaade357e7c18a870 WHIRLPOOL 7b3d60a6a186b485e5b98e1041cc71568fea2b3e9ad8cfa68450133dee1ca1a254bf649e556404fdd48556dacd0a1bfbf311cd41c19f485600cd3b2c2d793fdc
|
||||
EBUILD calculate-console-gui-3.2.0_alpha2.ebuild 632 SHA256 b4ff01b5e24307b2a9428ff003745e5307fbe86fbe7da9a0ce37a92ccfb21f17 SHA512 e3308bbe7a6751e5294d162b4ef6cc8efd77244a76cd91e8a1fb6d7a2d61ac0297cf6f5347388bc36157cd99fb7337eb5560b9689294d7d3c8dde1ea3ac41489 WHIRLPOOL 1cc82edc53b7dc59db6aee608855226f5f235d440a206661e1835ed3daae43c21c22ab64a64e8f2e052cb379fb4561c013c15753480c131f35147587b826ecd3
|
||||
EBUILD calculate-console-gui-3.2.0_alpha3.ebuild 632 SHA256 8889c22fff2c7632965b02c4f8a76a53f4a8fe5118f599e70c7f7e6d8e7b7fde SHA512 7a25fc80f81838cc2e7fd10637165303b41b25e507071297ebc5843d2bead0fec66df5557056974c4c09c532810fa6a028e62c5603ebfd1417a4b0ffc6401a1f WHIRLPOOL 15e2060c11d0371c2eb4b67f8fd21cf1bfd633984a7a3aaa62b98ceafcce7dda941653a89142a8acc8d14fb99a78cd02de65fa62156d7eb8972eb8d8d6928e22
|
||||
EBUILD calculate-console-gui-3.2.0_alpha4.ebuild 632 SHA256 36914290a8191390ce98af80bc9b313c5eeca68713a79d625b7506713137f8df SHA512 5fa1ecca0df9c1c5e54963ad5371e2c90814b3323ff409da1147822b91eed462bf941c78d5fc2b02bf55d1a801e38dfeea3ad7d18f010b740423d19f6b9a722f WHIRLPOOL 4a2f14a5d683ba46f028917f9583f2d37996063fe7edcf6b0159ce0581c69940fcb7a0dedb2be7329841b2f816dc7c60a87c79ded4adb6b210d57fe5d3a30ea2
|
||||
EBUILD calculate-console-gui-3.2.0_alpha5-r1.ebuild 781 SHA256 189eb57587526334fc9c313f8d6cd2ff269bd0cd9b065e6923289c57410ff082 SHA512 63b2a58e6a76f260a14b5f144d7fdb285ff26420286bc22f213cd77549eea63b82d5bd28cb7715bc26bca7788592d864c4cc0160904b984a73f951ccce8cedd8 WHIRLPOOL 8a6ff7e2a87a78dbf14463e348989e508828165b0abfdc023b914bf717282e0620707ec31b33dc312f5031a16877d22ff428a8b6b13933779497cfe5ba78f7cd
|
||||
EBUILD calculate-console-gui-3.2.0_alpha5-r2.ebuild 781 SHA256 74de6a6cf7819db7ba6601e6c34a35bee8e91be4bcd5ee75e12993dce3988897 SHA512 c7ef13d78b9219d7c0583f97f133d3141a67b8ef22e9399023efa06fd8f0a453f2f85a6d3dda135b647830ab9e40c28fe5b1776dc471be48caf595662956bed5 WHIRLPOOL 9f0f9a3e605df72066ffcdec11ac68a6d4c4969deda19e5a2e1ebe0398746a07cdfa5dc59e6aff881fedaa366f97551d3aa867ff8ab121577f463e56960b3d23
|
||||
EBUILD calculate-console-gui-3.2.0_alpha5.ebuild 632 SHA256 efebd40d478fee0259a18b0fe1a674aebd5db2efed085ef291d50673a8eb385b SHA512 d8a987dea6d0a4eac99e0977c7ac594931b961b1acd90cbf2ce00d8dd11e878f2b6ec9093b208be5cc6ba90077b5cd4d1b9d14b34f2cb057cbd9ed2a7de3c1e7 WHIRLPOOL e837e98ec4d7906a8f01813bfdcf7c49ca1adfac512c80de6aad4afa3d1893b5ad36fcd174b2f12b8eb56a5787385ded0bae179cd8b8ea6992ce634677e5ec9b
|
||||
EBUILD calculate-console-gui-3.2.0_alpha6.ebuild 632 SHA256 b6180003b983a8ab9a36df923fddba563537dfabca77af6242cef8fcb89fa797 SHA512 27b304406e5605eb2cd6bf31956c0bf29a854e5dcacd44bc1b7564ccbc9479cd9004f34ea6dd702de0400baf4d24725e25e149ead9eaf4e8c7d866622450e796 WHIRLPOOL ca6f7e35b51ae773260bd24d521936f4e4d95c424cdb535528973e13852a87bd2175fa5c1de86816c97f3b32aaa14dada7ccf142ab45b50391327f0fc383abce
|
||||
EBUILD calculate-console-gui-3.2.0_alpha7.ebuild 632 SHA256 d29fc2c4465b2ff8131525adced24ef7cc36950b52cd51d70c9e9ff78ae284c8 SHA512 b865474eba6c20e1facedf88ab4090a1ce4a61809cdae0eeafc49b45df2f47220d8904e9e1e3255d81b309c1ea1d732c5972270ad97caacc861c984db1b76fc0 WHIRLPOOL 9b0c1063e5ac11911373f18870270fc4e15f1395749d35d9a2ddf95b0ab1b8b63dd6d7bd4b03381ee180b6e2bd81065ed7f151f38e77fdabbeeffe51164d2f2d
|
||||
EBUILD calculate-console-gui-3.2.9999.ebuild 578 SHA256 2a87e98828f92ae2e971b1f5f2927af077e93ed7d3fadacea7f7e232c7a09348 SHA512 15da60d40befc9bba51232dd388df2397aea92ec2b25d951a34fc1a298049602370ac53a98bef42995e3ba911c76bb3a838cf5bfd5a3c4a6af7fc33e0fab34fa WHIRLPOOL 895ac120cb615db6493156e16f0a634da178a667b5c45e122218ce0cc0d6abd096827c506d7cad94f0f613b324cf5d4848e11671caf9b34bbc352ba91d9aa20c
|
||||
|
@ -1,24 +0,0 @@
|
||||
# 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="Qt gui 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_alpha1
|
||||
dev-python/dbus-python
|
||||
virtual/python-imaging
|
||||
dev-python/pyside[script]"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,24 +0,0 @@
|
||||
# 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="Qt gui 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_alpha2
|
||||
dev-python/dbus-python
|
||||
virtual/python-imaging
|
||||
dev-python/pyside[script]"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,24 +0,0 @@
|
||||
# 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="Qt gui 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_alpha3
|
||||
dev-python/dbus-python
|
||||
virtual/python-imaging
|
||||
dev-python/pyside[script]"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,24 +0,0 @@
|
||||
# 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="Qt gui 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
|
||||
dev-python/dbus-python
|
||||
virtual/python-imaging
|
||||
dev-python/pyside[script]"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,32 +0,0 @@
|
||||
# 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="Qt gui 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_alpha5
|
||||
dev-python/dbus-python
|
||||
virtual/python-imaging
|
||||
dev-python/pyside[script]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-console-gui-3.2.0_alpha5-r1.patch"
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
# 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="Qt gui 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_alpha5
|
||||
dev-python/dbus-python
|
||||
virtual/python-imaging
|
||||
dev-python/pyside[script]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-console-gui-3.2.0_alpha5-r2.patch"
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
# 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="Qt gui 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_alpha5
|
||||
dev-python/dbus-python
|
||||
virtual/python-imaging
|
||||
dev-python/pyside[script]"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,13 +0,0 @@
|
||||
diff --git consolegui/application/ControlButton.py consolegui/application/ControlButton.py
|
||||
index 3e42fe9..84b2511 100644
|
||||
--- consolegui/application/ControlButton.py
|
||||
+++ consolegui/application/ControlButton.py
|
||||
@@ -289,7 +289,7 @@ class ControlButtonWgt(QtGui.QWidget):
|
||||
self.clear_proc_cache_button.setDisabled(True)
|
||||
sid = int(self.ClientObj.sid)
|
||||
res = self.ClientObj.client.service.clear_pid_cache(sid, self.pid)
|
||||
- if (hasattr(self._parent.ClientObj.sys_update_pid) and
|
||||
+ if (hasattr(self._parent.ClientObj,"sys_update_pid") and
|
||||
str(self.pid) == str(
|
||||
self._parent.ClientObj._parent.sys_update_pid)):
|
||||
self._parent.ClientObj._parent.sys_update_pid = None
|
@ -1,89 +0,0 @@
|
||||
diff --git consolegui/application/ControlButton.py consolegui/application/ControlButton.py
|
||||
index 3e42fe9..ccd7576 100644
|
||||
--- consolegui/application/ControlButton.py
|
||||
+++ consolegui/application/ControlButton.py
|
||||
@@ -146,6 +146,11 @@ class ControlButtonWgt(QtGui.QWidget):
|
||||
self.break_button = wgt
|
||||
self.hlayout.addWidget(wgt)
|
||||
|
||||
+ def close_break_button(self):
|
||||
+ if self.break_button:
|
||||
+ self.break_button.close()
|
||||
+ self.break_button = None
|
||||
+
|
||||
def _hide(self):
|
||||
if hasattr (self, 'button_widget'):
|
||||
self.hlayout.removeWidget(self.button_widget)
|
||||
@@ -289,7 +294,7 @@ class ControlButtonWgt(QtGui.QWidget):
|
||||
self.clear_proc_cache_button.setDisabled(True)
|
||||
sid = int(self.ClientObj.sid)
|
||||
res = self.ClientObj.client.service.clear_pid_cache(sid, self.pid)
|
||||
- if (hasattr(self._parent.ClientObj.sys_update_pid) and
|
||||
+ if (hasattr(self._parent.ClientObj,"sys_update_pid") and
|
||||
str(self.pid) == str(
|
||||
self._parent.ClientObj._parent.sys_update_pid)):
|
||||
self._parent.ClientObj._parent.sys_update_pid = None
|
||||
diff --git consolegui/application/MainFrameResult.py consolegui/application/MainFrameResult.py
|
||||
index 8a6498b..44e6c8f 100755
|
||||
--- consolegui/application/MainFrameResult.py
|
||||
+++ consolegui/application/MainFrameResult.py
|
||||
@@ -884,13 +884,14 @@ class MainFrameRes(QtGui.QWidget):
|
||||
self.send_password_thread.wait()
|
||||
|
||||
def closeDialogs(self):
|
||||
- if hasattr(self,"message") and self.message:
|
||||
+ if hasattr(self, "message") and self.message:
|
||||
self.message.close()
|
||||
self.message = None
|
||||
- if hasattr(self,"passwd") and self.passwd:
|
||||
+ if hasattr(self, "passwd") and self.passwd:
|
||||
self.passwd.close()
|
||||
self.passwd = None
|
||||
self._parent.control_button.close_confirmation()
|
||||
+ self._parent.control_button.close_break_button()
|
||||
|
||||
def closeEvent(self, event):
|
||||
self.timer.stop()
|
||||
@@ -1042,7 +1043,7 @@ class ButtonDialog(QtGui.QWidget):
|
||||
show_msg(_('Failed to send the message (password) to the server'))
|
||||
self.close()
|
||||
return 1
|
||||
- self._parent.show_result(result)
|
||||
+ #self._parent.show_result(result)
|
||||
self.close()
|
||||
|
||||
|
||||
diff --git consolegui/application/TrayIcon.py consolegui/application/TrayIcon.py
|
||||
index 9dfe126..fca4379 100644
|
||||
--- consolegui/application/TrayIcon.py
|
||||
+++ consolegui/application/TrayIcon.py
|
||||
@@ -21,7 +21,7 @@ import dbus
|
||||
|
||||
from ReturnMessage import ReturnedMessage
|
||||
from calculate.consolegui.application.pid_information import client_pid_info
|
||||
-from more import show_msg, get_sid
|
||||
+from more import show_msg, get_sid, _print
|
||||
|
||||
#class MySignal(QtCore.QObject):
|
||||
# sig = QtCore.Signal(str, str)
|
||||
@@ -48,7 +48,6 @@ class TrayUpdateSystem(QtCore.QThread):
|
||||
try:
|
||||
param_object = create_obj(self._parent.localhost_ClientObj.client,
|
||||
"update")
|
||||
- param_object.cl_update_precheck_set = True
|
||||
meth_result_temp = \
|
||||
self._parent.localhost_ClientObj.client.service.update(
|
||||
sid, param_object)
|
||||
diff --git consolegui/application/more.py consolegui/application/more.py
|
||||
index c50fbac..e82a91e 100755
|
||||
--- consolegui/application/more.py
|
||||
+++ consolegui/application/more.py
|
||||
@@ -2301,7 +2301,7 @@ class TaskWidget(QtGui.QWidget):
|
||||
self.text.setMinimumHeight(self.text.sizeHint().height())
|
||||
self.text.setMinimumWidth(d_w)
|
||||
self._layout.addWidget(self.text)
|
||||
- self._layout.setContentsMargins(0, 4, 0, 4)
|
||||
+ self._layout.setContentsMargins(0, 0, 0, 0)
|
||||
self._layout.setSpacing(8)
|
||||
self.status = False
|
||||
|
@ -1,21 +0,0 @@
|
||||
# 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_alpha1"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,21 +0,0 @@
|
||||
# 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_alpha2"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,21 +0,0 @@
|
||||
# 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_alpha3"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,29 +0,0 @@
|
||||
# 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"
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
# 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}"
|
@ -1,21 +0,0 @@
|
||||
# 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_alpha5"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,152 +0,0 @@
|
||||
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:
|
@ -1,51 +0,0 @@
|
||||
# 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_alpha1
|
||||
>=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_alpha1-r1.patch"
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# 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_alpha1
|
||||
>=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"
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# 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_alpha2
|
||||
>=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"
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# 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_alpha3
|
||||
>=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"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# 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_alpha4
|
||||
>=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_alpha4-r1.patch"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# 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_alpha4
|
||||
>=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_alpha4-r2.patch"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# 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_alpha4
|
||||
>=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_alpha4-r3.patch"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# 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_alpha4
|
||||
>=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_alpha4-r4.patch"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# 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_alpha4
|
||||
>=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_alpha4-r5.patch"
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# 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_alpha4
|
||||
>=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"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# 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"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# 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-r2.patch"
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# 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"
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
diff --git core/server/cl_server.py core/server/cl_server.py
|
||||
index a62d8cd..abd555f 100644
|
||||
--- core/server/cl_server.py
|
||||
+++ core/server/cl_server.py
|
||||
@@ -75,12 +75,13 @@ def main(*args, **keywords):
|
||||
cl_ver = ob.Get('cl_ver')
|
||||
log_path_var = ob.Get('cl_log_path')
|
||||
cl_core_port = ob.GetInteger('cl_core_port')
|
||||
+ file_logger = None
|
||||
|
||||
if args.version:
|
||||
print cl_ver
|
||||
return 0
|
||||
|
||||
- if ob.Get('cl_ebuild_phase') == '':
|
||||
+ if ob.Get('cl_ebuild_phase') == '' and os.getuid() == 0:
|
||||
import logging
|
||||
import logging.handlers
|
||||
|
||||
@@ -149,9 +150,10 @@ def main(*args, **keywords):
|
||||
serv_certbase, certbase, data_path)
|
||||
return 0
|
||||
except URLError, e:
|
||||
- fd = open(LOG_FILENAME,'a')
|
||||
- file_logger.debug(print_exc(file=fd))
|
||||
- fd.close()
|
||||
+ if file_logger:
|
||||
+ fd = open(LOG_FILENAME,'a')
|
||||
+ file_logger.debug(print_exc(file=fd))
|
||||
+ fd.close()
|
||||
print e
|
||||
params_list = ["start", "create_symlink", "method",
|
||||
"list_methods"]
|
||||
@@ -262,9 +264,10 @@ def main(*args, **keywords):
|
||||
print _("No socket could be created")
|
||||
print _('Port %d already in use') %port
|
||||
else:
|
||||
- fd = open(LOG_FILENAME,'a')
|
||||
- file_logger.debug(print_exc(file=fd))
|
||||
- fd.close()
|
||||
+ if file_logger:
|
||||
+ fd = open(LOG_FILENAME,'a')
|
||||
+ file_logger.debug(print_exc(file=fd))
|
||||
+ fd.close()
|
||||
print e
|
||||
except SSLError, e:
|
||||
print '\n',_('Server certificate not found')#, e
|
||||
@@ -273,9 +276,10 @@ def main(*args, **keywords):
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except Exception, e:
|
||||
- fd = open(LOG_FILENAME,'a')
|
||||
- file_logger.debug(print_exc(file=fd))
|
||||
- fd.close()
|
||||
+ if file_logger:
|
||||
+ fd = open(LOG_FILENAME,'a')
|
||||
+ file_logger.debug(print_exc(file=fd))
|
||||
+ fd.close()
|
||||
|
||||
server.stop()
|
||||
if args.pidfile:
|
||||
diff --git core/server/func.py core/server/func.py
|
||||
index 190a066..ae0c88f 100644
|
||||
--- core/server/func.py
|
||||
+++ core/server/func.py
|
||||
@@ -815,8 +815,8 @@ def shortTraceback(e1,e2,e3):
|
||||
Return short traceback
|
||||
"""
|
||||
frame = e3
|
||||
- #for i in apply(traceback.format_exception, (e1,e2,e3)):
|
||||
- # print i,
|
||||
+ for i in apply(traceback.format_exception, (e1,e2,e3)):
|
||||
+ print i,
|
||||
while(frame.tb_next):
|
||||
frame = frame.tb_next
|
||||
module,part = os.path.split(frame.tb_frame.f_code.co_filename)
|
||||
diff --git core/server/server_class.py core/server/server_class.py
|
||||
index 13157ec..43f9ffb 100644
|
||||
--- core/server/server_class.py
|
||||
+++ core/server/server_class.py
|
||||
@@ -360,7 +360,8 @@ class ClApplication(Application):
|
||||
certobj = OpenSSL.crypto.load_certificate \
|
||||
(OpenSSL.SSL.FILETYPE_PEM, curThread.client_cert)
|
||||
finger = certobj.digest('SHA1')
|
||||
- self.log.debug('%s %s %s forbidden %s' \
|
||||
+ if self.log:
|
||||
+ self.log.debug('%s %s %s forbidden %s' \
|
||||
%(datetime.datetime.now().__str__(), finger, ip, \
|
||||
method_name[5:]))
|
||||
resp = "Permission denied: " + method_name
|
||||
@@ -375,7 +376,8 @@ class ClApplication(Application):
|
||||
finger = certobj.digest('SHA1')
|
||||
if not method_name[5:] in not_log_list and \
|
||||
not method_name[5:].endswith('_view'):
|
||||
- self.log.debug('%s %s %s allowed %s' \
|
||||
+ if self.log:
|
||||
+ self.log.debug('%s %s %s allowed %s' \
|
||||
%(datetime.datetime.now().__str__(), finger, ip, \
|
||||
method_name[5:]))
|
||||
|
@ -1,453 +0,0 @@
|
||||
diff --git core/server/api_types.py core/server/api_types.py
|
||||
index 3863d53..eb205c1 100644
|
||||
--- core/server/api_types.py
|
||||
+++ core/server/api_types.py
|
||||
@@ -164,6 +164,97 @@ class Table(DataVarsSerializer):
|
||||
self.onClick = onClick
|
||||
self.addAction = addAction
|
||||
|
||||
+class ChoiceValueAdapter(object):
|
||||
+ def __init__(self, choicevalue):
|
||||
+ self.choicevalue = choicevalue
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return self.choicevalue.values.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.choicevalue.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def onChanged(self):
|
||||
+ return self.choicevalue.onChanged.string
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.choicevalue, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, choicevalue):
|
||||
+ if isinstance(choicevalue, ChoiceValue):
|
||||
+ return choicevalue
|
||||
+ else:
|
||||
+ return cls(choicevalue)
|
||||
+
|
||||
+class TableAdapter(object):
|
||||
+ def __init__(self, table):
|
||||
+ self.table = table
|
||||
+
|
||||
+ @property
|
||||
+ def fields(self):
|
||||
+ return self.table.fields.string
|
||||
+
|
||||
+ @property
|
||||
+ def head(self):
|
||||
+ return self.table.head.string
|
||||
+
|
||||
+ @property
|
||||
+ def body(self):
|
||||
+ if hasattr(self.table.body,'stringArray'):
|
||||
+ return [row.string
|
||||
+ for row in self.table.body.stringArray
|
||||
+ if hasattr(row, "string")]
|
||||
+ return []
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return [ChoiceValueAdapter(x) for x in self.table.values.ChoiceValue]
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.table, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, table):
|
||||
+ if isinstance(table, Table):
|
||||
+ return table
|
||||
+ else:
|
||||
+ return cls(table)
|
||||
+
|
||||
+class FieldAdapter(object):
|
||||
+ def __init__(self, field):
|
||||
+ self.field = field
|
||||
+
|
||||
+ @property
|
||||
+ def choice(self):
|
||||
+ return self.field.choice.string
|
||||
+
|
||||
+ @property
|
||||
+ def listvalue(self):
|
||||
+ return self.field.listvalue.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.field.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def tablevalue(self):
|
||||
+ return TableAdapter(self.field.tablevalue)
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.field, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, field):
|
||||
+ if isinstance(field, Field):
|
||||
+ return field
|
||||
+ else:
|
||||
+ return cls(field)
|
||||
+
|
||||
+
|
||||
class Option(DataVarsSerializer):
|
||||
shortopt = String
|
||||
longopt = String
|
||||
diff --git core/server/replace_class.py core/server/replace_class.py
|
||||
index 23c5282..d01dd9b 100644
|
||||
--- core/server/replace_class.py
|
||||
+++ core/server/replace_class.py
|
||||
@@ -34,6 +34,7 @@ from calculate.lib.utils.colortext.output import BaseOutput
|
||||
from calculate.lib.cl_print import color_print
|
||||
from calculate.lib.datavars import VariableError
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
+from calculate.core.server.api_types import FieldAdapter
|
||||
|
||||
from methods_func import get_method_argparser, collect_object, \
|
||||
check_result_msg, get_param_pwd, _print
|
||||
@@ -44,7 +45,7 @@ from func import shortTraceback, CommonMethods
|
||||
|
||||
|
||||
setLocalTranslate('cl_core3', sys.modules[__name__])
|
||||
-from itertools import cycle
|
||||
+from itertools import cycle, izip, ifilter
|
||||
import time
|
||||
|
||||
|
||||
@@ -766,159 +767,176 @@ def print_brief(view, brief_label):
|
||||
print_brief_group(Group.fields, Group.name)
|
||||
|
||||
|
||||
-def print_brief_group(Fields, group_name):
|
||||
- print_group_flag = False
|
||||
- # if group_name:
|
||||
- # _print ('\b'+group_name)
|
||||
- uncompatible_count = 0
|
||||
- colorPrint = color_print()
|
||||
- _colorprint = get_terminal_print(_print)
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['combo', 'comboEdit', 'radio', 'file']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.comments and field.choice:
|
||||
- if not field.value in field.choice:
|
||||
- field.choice.append(field.value)
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x),
|
||||
- filter(lambda x: x in field.choice,
|
||||
- [field.value])))
|
||||
- value = ', '.join(value)
|
||||
- else:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['multichoice', 'multichoice_add', \
|
||||
- 'selecttable', 'selecttable_add']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.listvalue:
|
||||
- if not field.listvalue[0]:
|
||||
- field.listvalue.pop(0)
|
||||
- if field.choice:
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x \
|
||||
- else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x), \
|
||||
- field.listvalue))
|
||||
+class Display(object):
|
||||
+ def __init__(self):
|
||||
+ self._print = get_terminal_print(color_print().defaultPrint)
|
||||
+
|
||||
+ def print_info(self, label, value):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ WHITE = TextState.Colors.WHITE
|
||||
+ self._print.foreground(WHITE)(value)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_label(self, label):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def display_asterisk(self, color):
|
||||
+ self._print(" ")
|
||||
+ self._print.foreground(color).bold("*")
|
||||
+ self._print(" ")
|
||||
+
|
||||
+ def print_error(self, message):
|
||||
+ RED = TextState.Colors.RED
|
||||
+ self.display_asterisk(RED)
|
||||
+ self._print(message)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_table(self, data, head):
|
||||
+ sys.stdout.write('%s\n' % printTable(data, head))
|
||||
+
|
||||
+ def print_group(self, label):
|
||||
+ WHITE = TextState.Colors.WHITE
|
||||
+ self._print.foreground(WHITE).bold(label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+
|
||||
+class InformationElement(object):
|
||||
+ def __init__(self, field, display):
|
||||
+ self.value = ""
|
||||
+ self.label = ""
|
||||
+ self.display = display
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_field(cls, field, display):
|
||||
+ if field.type == 'steps':
|
||||
+ return None
|
||||
+ map_elements = {'input': ValueInfo,
|
||||
+ 'openfile': ValueInfo,
|
||||
+ 'combo': ChoiceInfo,
|
||||
+ 'comboEdit': ChoiceInfo,
|
||||
+ 'radio': ChoiceInfo,
|
||||
+ 'file': ChoiceInfo,
|
||||
+ 'multichoice': MultiChoiceInfo,
|
||||
+ 'multichoice_add': MultiChoiceInfo,
|
||||
+ 'selecttable': MultiChoiceInfo,
|
||||
+ 'selecttable_add': MultiChoiceInfo,
|
||||
+ 'error': ErrorInfo,
|
||||
+ 'check': CheckInfo,
|
||||
+ 'check_tristate': CheckInfo,
|
||||
+ 'table': TableInfo
|
||||
+ }
|
||||
+ if field.element in map_elements:
|
||||
+ return map_elements[field.element](field, display)
|
||||
+ return None
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_info(self.label, self.value)
|
||||
+
|
||||
+
|
||||
+class ValueInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ValueInfo, self).__init__(field, display)
|
||||
+ self.value = field.value or ''
|
||||
+ self.label = field.label
|
||||
+
|
||||
+class CheckInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(CheckInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ self.value = map_answer.get(field.value, field.value)
|
||||
+
|
||||
+class ChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
+ self.value = map_comment.get(field.value, field.value) or ''
|
||||
+ else:
|
||||
+ self.value = field.value if field.value else ''
|
||||
+
|
||||
+
|
||||
+class MultiChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(MultiChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.listvalue:
|
||||
+ value = field.listvalue
|
||||
+ # удалить пустой первый элемент (особенности wsdl)
|
||||
+ if value and not value[0]:
|
||||
+ value.pop(0)
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
else:
|
||||
- value = []
|
||||
- value = ', '.join(value)
|
||||
- if field.listvalue and not value:
|
||||
- value = ', '.join(field.listvalue)
|
||||
- elif not value:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- # elif field.element == 'label':
|
||||
- # print field.label
|
||||
-
|
||||
- elif field.element == 'error':
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- 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')
|
||||
+ map_comment = {}
|
||||
+ self.value = ", ".join([map_comment.get(x, x) or '' for x in value])
|
||||
+ else:
|
||||
+ self.value = field.value or ""
|
||||
+
|
||||
+
|
||||
+class ErrorInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ErrorInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_error(self.label)
|
||||
+
|
||||
+
|
||||
+class TableInfo(InformationElement):
|
||||
+ """
|
||||
+ Табличная информация
|
||||
+ """
|
||||
+
|
||||
+ def map_row(self, row, typedata):
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ for cell, typefield in izip(row, typedata):
|
||||
+ if typefield in ['check', 'check_tristate']:
|
||||
+ yield map_answer.get(cell, cell) or ""
|
||||
+ elif "password" in typefield:
|
||||
+ yield "***"
|
||||
else:
|
||||
- value = field.value
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element == 'table' and field.type != 'steps':
|
||||
- head = field.tablevalue.head
|
||||
-
|
||||
- body = []
|
||||
- for row in field.tablevalue.body:
|
||||
- if not row[0]:
|
||||
- row.pop(0)
|
||||
- body.append(row)
|
||||
-
|
||||
- # 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 + "\n")
|
||||
- continue
|
||||
- ChoiceValue = field.tablevalue.values
|
||||
- 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 "password" in ChoiceValue[row].typefield:
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS(field.label + ': ')
|
||||
- res = printTable(data, head)
|
||||
- sys.stdout.flush()
|
||||
- sys.stdout.write(res + "\n")
|
||||
+ yield cell or ""
|
||||
+
|
||||
+ def __init__(self, field, display):
|
||||
+ super(TableInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ self.head = field.tablevalue.head
|
||||
+
|
||||
+ # удаление первого элемента строки (для wsdl)
|
||||
+ body = [x[1:] if x and not x[0] else x for x in field.tablevalue.body]
|
||||
+
|
||||
+ if not filter(None, map(lambda x: x, body)):
|
||||
+ self.body = None
|
||||
else:
|
||||
- uncompatible_count += 1
|
||||
+ type_values = [x.typefield for x in field.tablevalue.values]
|
||||
+ self.body = [list(self.map_row(x, type_values)) for x in body]
|
||||
+
|
||||
+ def show(self):
|
||||
+ if self.body:
|
||||
+ self.display.print_label(self.label)
|
||||
+ self.display.print_table(self.body, self.head)
|
||||
|
||||
|
||||
-# if uncompatible_count == len (Fields) and group_name:
|
||||
-# colorPrint.printSUCCESS(_('Not used'))
|
||||
+def print_brief_group(Fields, group_name):
|
||||
+ display = Display()
|
||||
+ show_group = True
|
||||
+ for element in ifilter(None,
|
||||
+ (InformationElement.from_field(
|
||||
+ FieldAdapter.from_detect(x),
|
||||
+ display)
|
||||
+ for x in Fields if not x.uncompatible)):
|
||||
+ if show_group:
|
||||
+ display.print_group(group_name)
|
||||
+ show_group = False
|
||||
+ element.show()
|
||||
+
|
||||
|
||||
class Table(tableReport):
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -953,4 +971,3 @@ def printTable(data, header=None):
|
||||
except Exception as e:
|
||||
print str(e)
|
||||
raise
|
||||
-
|
@ -1,456 +0,0 @@
|
||||
diff --git core/server/api_types.py core/server/api_types.py
|
||||
index 3863d53..eb205c1 100644
|
||||
--- core/server/api_types.py
|
||||
+++ core/server/api_types.py
|
||||
@@ -164,6 +164,97 @@ class Table(DataVarsSerializer):
|
||||
self.onClick = onClick
|
||||
self.addAction = addAction
|
||||
|
||||
+class ChoiceValueAdapter(object):
|
||||
+ def __init__(self, choicevalue):
|
||||
+ self.choicevalue = choicevalue
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return self.choicevalue.values.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.choicevalue.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def onChanged(self):
|
||||
+ return self.choicevalue.onChanged.string
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.choicevalue, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, choicevalue):
|
||||
+ if isinstance(choicevalue, ChoiceValue):
|
||||
+ return choicevalue
|
||||
+ else:
|
||||
+ return cls(choicevalue)
|
||||
+
|
||||
+class TableAdapter(object):
|
||||
+ def __init__(self, table):
|
||||
+ self.table = table
|
||||
+
|
||||
+ @property
|
||||
+ def fields(self):
|
||||
+ return self.table.fields.string
|
||||
+
|
||||
+ @property
|
||||
+ def head(self):
|
||||
+ return self.table.head.string
|
||||
+
|
||||
+ @property
|
||||
+ def body(self):
|
||||
+ if hasattr(self.table.body,'stringArray'):
|
||||
+ return [row.string
|
||||
+ for row in self.table.body.stringArray
|
||||
+ if hasattr(row, "string")]
|
||||
+ return []
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return [ChoiceValueAdapter(x) for x in self.table.values.ChoiceValue]
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.table, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, table):
|
||||
+ if isinstance(table, Table):
|
||||
+ return table
|
||||
+ else:
|
||||
+ return cls(table)
|
||||
+
|
||||
+class FieldAdapter(object):
|
||||
+ def __init__(self, field):
|
||||
+ self.field = field
|
||||
+
|
||||
+ @property
|
||||
+ def choice(self):
|
||||
+ return self.field.choice.string
|
||||
+
|
||||
+ @property
|
||||
+ def listvalue(self):
|
||||
+ return self.field.listvalue.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.field.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def tablevalue(self):
|
||||
+ return TableAdapter(self.field.tablevalue)
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.field, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, field):
|
||||
+ if isinstance(field, Field):
|
||||
+ return field
|
||||
+ else:
|
||||
+ return cls(field)
|
||||
+
|
||||
+
|
||||
class Option(DataVarsSerializer):
|
||||
shortopt = String
|
||||
longopt = String
|
||||
diff --git core/server/replace_class.py core/server/replace_class.py
|
||||
index 23c5282..6597928 100644
|
||||
--- core/server/replace_class.py
|
||||
+++ core/server/replace_class.py
|
||||
@@ -34,6 +34,7 @@ from calculate.lib.utils.colortext.output import BaseOutput
|
||||
from calculate.lib.cl_print import color_print
|
||||
from calculate.lib.datavars import VariableError
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
+from calculate.core.server.api_types import FieldAdapter
|
||||
|
||||
from methods_func import get_method_argparser, collect_object, \
|
||||
check_result_msg, get_param_pwd, _print
|
||||
@@ -44,7 +45,7 @@ from func import shortTraceback, CommonMethods
|
||||
|
||||
|
||||
setLocalTranslate('cl_core3', sys.modules[__name__])
|
||||
-from itertools import cycle
|
||||
+from itertools import cycle, izip, ifilter
|
||||
import time
|
||||
|
||||
|
||||
@@ -766,159 +767,179 @@ def print_brief(view, brief_label):
|
||||
print_brief_group(Group.fields, Group.name)
|
||||
|
||||
|
||||
-def print_brief_group(Fields, group_name):
|
||||
- print_group_flag = False
|
||||
- # if group_name:
|
||||
- # _print ('\b'+group_name)
|
||||
- uncompatible_count = 0
|
||||
- colorPrint = color_print()
|
||||
- _colorprint = get_terminal_print(_print)
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['combo', 'comboEdit', 'radio', 'file']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.comments and field.choice:
|
||||
- if not field.value in field.choice:
|
||||
- field.choice.append(field.value)
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x),
|
||||
- filter(lambda x: x in field.choice,
|
||||
- [field.value])))
|
||||
- value = ', '.join(value)
|
||||
- else:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['multichoice', 'multichoice_add', \
|
||||
- 'selecttable', 'selecttable_add']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.listvalue:
|
||||
- if not field.listvalue[0]:
|
||||
- field.listvalue.pop(0)
|
||||
- if field.choice:
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x \
|
||||
- else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x), \
|
||||
- field.listvalue))
|
||||
+class Display(object):
|
||||
+ def __init__(self):
|
||||
+ self._print = get_terminal_print(color_print().defaultPrint)
|
||||
+
|
||||
+ def print_info(self, label, value):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ WHITE = TextState.Colors.WHITE
|
||||
+ self._print.foreground(WHITE)(value)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_label(self, label):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def display_asterisk(self, color):
|
||||
+ self._print(" ")
|
||||
+ self._print.foreground(color).bold("*")
|
||||
+ self._print(" ")
|
||||
+
|
||||
+ def print_error(self, message):
|
||||
+ RED = TextState.Colors.RED
|
||||
+ self.display_asterisk(RED)
|
||||
+ self._print(message)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_table(self, data, head):
|
||||
+
|
||||
+ sys.stdout.write('%s\n' % printTable(data, head))
|
||||
+
|
||||
+ def print_group(self, label):
|
||||
+ #WHITE = TextState.Colors.WHITE
|
||||
+ #self._print.foreground(WHITE).bold(label)
|
||||
+ #self._print.underline(label)
|
||||
+ self._print(label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+
|
||||
+class InformationElement(object):
|
||||
+ def __init__(self, field, display):
|
||||
+ self.value = ""
|
||||
+ self.label = ""
|
||||
+ self.display = display
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_field(cls, field, display):
|
||||
+ if field.type == 'steps':
|
||||
+ return None
|
||||
+ map_elements = {'input': ValueInfo,
|
||||
+ 'openfile': ValueInfo,
|
||||
+ 'combo': ChoiceInfo,
|
||||
+ 'comboEdit': ChoiceInfo,
|
||||
+ 'radio': ChoiceInfo,
|
||||
+ 'file': ChoiceInfo,
|
||||
+ 'multichoice': MultiChoiceInfo,
|
||||
+ 'multichoice_add': MultiChoiceInfo,
|
||||
+ 'selecttable': MultiChoiceInfo,
|
||||
+ 'selecttable_add': MultiChoiceInfo,
|
||||
+ 'error': ErrorInfo,
|
||||
+ 'check': CheckInfo,
|
||||
+ 'check_tristate': CheckInfo,
|
||||
+ 'table': TableInfo
|
||||
+ }
|
||||
+ if field.element in map_elements:
|
||||
+ return map_elements[field.element](field, display)
|
||||
+ return None
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_info(self.label, self.value)
|
||||
+
|
||||
+
|
||||
+class ValueInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ValueInfo, self).__init__(field, display)
|
||||
+ self.value = field.value or ''
|
||||
+ self.label = field.label
|
||||
+
|
||||
+class CheckInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(CheckInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ self.value = map_answer.get(field.value, field.value)
|
||||
+
|
||||
+class ChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
+ self.value = map_comment.get(field.value, field.value) or ''
|
||||
+ else:
|
||||
+ self.value = field.value if field.value else ''
|
||||
+
|
||||
+
|
||||
+class MultiChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(MultiChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.listvalue:
|
||||
+ value = field.listvalue
|
||||
+ # удалить пустой первый элемент (особенности wsdl)
|
||||
+ if value and not value[0]:
|
||||
+ value.pop(0)
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
else:
|
||||
- value = []
|
||||
- value = ', '.join(value)
|
||||
- if field.listvalue and not value:
|
||||
- value = ', '.join(field.listvalue)
|
||||
- elif not value:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- # elif field.element == 'label':
|
||||
- # print field.label
|
||||
-
|
||||
- elif field.element == 'error':
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- 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')
|
||||
+ map_comment = {}
|
||||
+ self.value = ", ".join([map_comment.get(x, x) or '' for x in value])
|
||||
+ else:
|
||||
+ self.value = field.value or ""
|
||||
+
|
||||
+
|
||||
+class ErrorInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ErrorInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_error(self.label)
|
||||
+
|
||||
+
|
||||
+class TableInfo(InformationElement):
|
||||
+ """
|
||||
+ Табличная информация
|
||||
+ """
|
||||
+
|
||||
+ def map_row(self, row, typedata):
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ for cell, typefield in izip(row, typedata):
|
||||
+ if typefield in ['check', 'check_tristate']:
|
||||
+ yield map_answer.get(cell, cell) or ""
|
||||
+ elif "password" in typefield:
|
||||
+ yield "***"
|
||||
else:
|
||||
- value = field.value
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element == 'table' and field.type != 'steps':
|
||||
- head = field.tablevalue.head
|
||||
-
|
||||
- body = []
|
||||
- for row in field.tablevalue.body:
|
||||
- if not row[0]:
|
||||
- row.pop(0)
|
||||
- body.append(row)
|
||||
-
|
||||
- # 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 + "\n")
|
||||
- continue
|
||||
- ChoiceValue = field.tablevalue.values
|
||||
- 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 "password" in ChoiceValue[row].typefield:
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS(field.label + ': ')
|
||||
- res = printTable(data, head)
|
||||
- sys.stdout.flush()
|
||||
- sys.stdout.write(res + "\n")
|
||||
+ yield cell or ""
|
||||
+
|
||||
+ def __init__(self, field, display):
|
||||
+ super(TableInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ self.head = field.tablevalue.head
|
||||
+
|
||||
+ # удаление первого элемента строки (для wsdl)
|
||||
+ body = [x[1:] if x and not x[0] else x for x in field.tablevalue.body]
|
||||
+
|
||||
+ if not filter(None, map(lambda x: x, body)):
|
||||
+ self.body = None
|
||||
else:
|
||||
- uncompatible_count += 1
|
||||
+ type_values = [x.typefield for x in field.tablevalue.values]
|
||||
+ self.body = [list(self.map_row(x, type_values)) for x in body]
|
||||
+
|
||||
+ def show(self):
|
||||
+ if self.body:
|
||||
+ self.display.print_label(self.label)
|
||||
+ self.display.print_table(self.body, self.head)
|
||||
|
||||
|
||||
-# if uncompatible_count == len (Fields) and group_name:
|
||||
-# colorPrint.printSUCCESS(_('Not used'))
|
||||
+def print_brief_group(Fields, group_name):
|
||||
+ display = Display()
|
||||
+ show_group = True
|
||||
+ for element in ifilter(None,
|
||||
+ (InformationElement.from_field(
|
||||
+ FieldAdapter.from_detect(x),
|
||||
+ display)
|
||||
+ for x in Fields if not x.uncompatible)):
|
||||
+ if show_group:
|
||||
+ display.print_group(group_name)
|
||||
+ show_group = False
|
||||
+ element.show()
|
||||
+
|
||||
|
||||
class Table(tableReport):
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -953,4 +974,3 @@ def printTable(data, header=None):
|
||||
except Exception as e:
|
||||
print str(e)
|
||||
raise
|
||||
-
|
@ -1,465 +0,0 @@
|
||||
diff --git core/server/api_types.py core/server/api_types.py
|
||||
index 3863d53..eb205c1 100644
|
||||
--- core/server/api_types.py
|
||||
+++ core/server/api_types.py
|
||||
@@ -164,6 +164,97 @@ class Table(DataVarsSerializer):
|
||||
self.onClick = onClick
|
||||
self.addAction = addAction
|
||||
|
||||
+class ChoiceValueAdapter(object):
|
||||
+ def __init__(self, choicevalue):
|
||||
+ self.choicevalue = choicevalue
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return self.choicevalue.values.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.choicevalue.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def onChanged(self):
|
||||
+ return self.choicevalue.onChanged.string
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.choicevalue, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, choicevalue):
|
||||
+ if isinstance(choicevalue, ChoiceValue):
|
||||
+ return choicevalue
|
||||
+ else:
|
||||
+ return cls(choicevalue)
|
||||
+
|
||||
+class TableAdapter(object):
|
||||
+ def __init__(self, table):
|
||||
+ self.table = table
|
||||
+
|
||||
+ @property
|
||||
+ def fields(self):
|
||||
+ return self.table.fields.string
|
||||
+
|
||||
+ @property
|
||||
+ def head(self):
|
||||
+ return self.table.head.string
|
||||
+
|
||||
+ @property
|
||||
+ def body(self):
|
||||
+ if hasattr(self.table.body,'stringArray'):
|
||||
+ return [row.string
|
||||
+ for row in self.table.body.stringArray
|
||||
+ if hasattr(row, "string")]
|
||||
+ return []
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return [ChoiceValueAdapter(x) for x in self.table.values.ChoiceValue]
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.table, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, table):
|
||||
+ if isinstance(table, Table):
|
||||
+ return table
|
||||
+ else:
|
||||
+ return cls(table)
|
||||
+
|
||||
+class FieldAdapter(object):
|
||||
+ def __init__(self, field):
|
||||
+ self.field = field
|
||||
+
|
||||
+ @property
|
||||
+ def choice(self):
|
||||
+ return self.field.choice.string
|
||||
+
|
||||
+ @property
|
||||
+ def listvalue(self):
|
||||
+ return self.field.listvalue.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.field.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def tablevalue(self):
|
||||
+ return TableAdapter(self.field.tablevalue)
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.field, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, field):
|
||||
+ if isinstance(field, Field):
|
||||
+ return field
|
||||
+ else:
|
||||
+ return cls(field)
|
||||
+
|
||||
+
|
||||
class Option(DataVarsSerializer):
|
||||
shortopt = String
|
||||
longopt = String
|
||||
diff --git core/server/replace_class.py core/server/replace_class.py
|
||||
index 23c5282..1318deb 100644
|
||||
--- core/server/replace_class.py
|
||||
+++ core/server/replace_class.py
|
||||
@@ -34,6 +34,7 @@ from calculate.lib.utils.colortext.output import BaseOutput
|
||||
from calculate.lib.cl_print import color_print
|
||||
from calculate.lib.datavars import VariableError
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
+from calculate.core.server.api_types import FieldAdapter
|
||||
|
||||
from methods_func import get_method_argparser, collect_object, \
|
||||
check_result_msg, get_param_pwd, _print
|
||||
@@ -44,7 +45,7 @@ from func import shortTraceback, CommonMethods
|
||||
|
||||
|
||||
setLocalTranslate('cl_core3', sys.modules[__name__])
|
||||
-from itertools import cycle
|
||||
+from itertools import cycle, izip, ifilter
|
||||
import time
|
||||
|
||||
|
||||
@@ -531,7 +532,7 @@ class replaceClass():
|
||||
def startGroup(self, message):
|
||||
_print = get_terminal_print()
|
||||
self.printDefault(
|
||||
- _print.foreground(TextState.Colors.WHITE).bold(message))
|
||||
+ _print.foreground(TextState.Colors.WHITE)(message))
|
||||
#self.addMessage(type='startGroup', message=message)
|
||||
|
||||
def endGroup(self):
|
||||
@@ -766,159 +767,179 @@ def print_brief(view, brief_label):
|
||||
print_brief_group(Group.fields, Group.name)
|
||||
|
||||
|
||||
-def print_brief_group(Fields, group_name):
|
||||
- print_group_flag = False
|
||||
- # if group_name:
|
||||
- # _print ('\b'+group_name)
|
||||
- uncompatible_count = 0
|
||||
- colorPrint = color_print()
|
||||
- _colorprint = get_terminal_print(_print)
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['combo', 'comboEdit', 'radio', 'file']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.comments and field.choice:
|
||||
- if not field.value in field.choice:
|
||||
- field.choice.append(field.value)
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x),
|
||||
- filter(lambda x: x in field.choice,
|
||||
- [field.value])))
|
||||
- value = ', '.join(value)
|
||||
- else:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['multichoice', 'multichoice_add', \
|
||||
- 'selecttable', 'selecttable_add']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.listvalue:
|
||||
- if not field.listvalue[0]:
|
||||
- field.listvalue.pop(0)
|
||||
- if field.choice:
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x \
|
||||
- else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x), \
|
||||
- field.listvalue))
|
||||
+class Display(object):
|
||||
+ def __init__(self):
|
||||
+ self._print = get_terminal_print(color_print().defaultPrint)
|
||||
+
|
||||
+ def print_info(self, label, value):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ WHITE = TextState.Colors.WHITE
|
||||
+ self._print.foreground(WHITE)(value)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_label(self, label):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def display_asterisk(self, color):
|
||||
+ self._print(" ")
|
||||
+ self._print.foreground(color).bold("*")
|
||||
+ self._print(" ")
|
||||
+
|
||||
+ def print_error(self, message):
|
||||
+ RED = TextState.Colors.RED
|
||||
+ self.display_asterisk(RED)
|
||||
+ self._print(message)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_table(self, data, head):
|
||||
+
|
||||
+ sys.stdout.write('%s\n' % printTable(data, head))
|
||||
+
|
||||
+ def print_group(self, label):
|
||||
+ #WHITE = TextState.Colors.WHITE
|
||||
+ #self._print.foreground(WHITE).bold(label)
|
||||
+ #self._print.underline(label)
|
||||
+ self._print(label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+
|
||||
+class InformationElement(object):
|
||||
+ def __init__(self, field, display):
|
||||
+ self.value = ""
|
||||
+ self.label = ""
|
||||
+ self.display = display
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_field(cls, field, display):
|
||||
+ if field.type == 'steps':
|
||||
+ return None
|
||||
+ map_elements = {'input': ValueInfo,
|
||||
+ 'openfile': ValueInfo,
|
||||
+ 'combo': ChoiceInfo,
|
||||
+ 'comboEdit': ChoiceInfo,
|
||||
+ 'radio': ChoiceInfo,
|
||||
+ 'file': ChoiceInfo,
|
||||
+ 'multichoice': MultiChoiceInfo,
|
||||
+ 'multichoice_add': MultiChoiceInfo,
|
||||
+ 'selecttable': MultiChoiceInfo,
|
||||
+ 'selecttable_add': MultiChoiceInfo,
|
||||
+ 'error': ErrorInfo,
|
||||
+ 'check': CheckInfo,
|
||||
+ 'check_tristate': CheckInfo,
|
||||
+ 'table': TableInfo
|
||||
+ }
|
||||
+ if field.element in map_elements:
|
||||
+ return map_elements[field.element](field, display)
|
||||
+ return None
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_info(self.label, self.value)
|
||||
+
|
||||
+
|
||||
+class ValueInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ValueInfo, self).__init__(field, display)
|
||||
+ self.value = field.value or ''
|
||||
+ self.label = field.label
|
||||
+
|
||||
+class CheckInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(CheckInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ self.value = map_answer.get(field.value, field.value)
|
||||
+
|
||||
+class ChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
+ self.value = map_comment.get(field.value, field.value) or ''
|
||||
+ else:
|
||||
+ self.value = field.value if field.value else ''
|
||||
+
|
||||
+
|
||||
+class MultiChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(MultiChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.listvalue:
|
||||
+ value = field.listvalue
|
||||
+ # удалить пустой первый элемент (особенности wsdl)
|
||||
+ if value and not value[0]:
|
||||
+ value.pop(0)
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
else:
|
||||
- value = []
|
||||
- value = ', '.join(value)
|
||||
- if field.listvalue and not value:
|
||||
- value = ', '.join(field.listvalue)
|
||||
- elif not value:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- # elif field.element == 'label':
|
||||
- # print field.label
|
||||
-
|
||||
- elif field.element == 'error':
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- 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')
|
||||
+ map_comment = {}
|
||||
+ self.value = ", ".join([map_comment.get(x, x) or '' for x in value])
|
||||
+ else:
|
||||
+ self.value = field.value or ""
|
||||
+
|
||||
+
|
||||
+class ErrorInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ErrorInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_error(self.label)
|
||||
+
|
||||
+
|
||||
+class TableInfo(InformationElement):
|
||||
+ """
|
||||
+ Табличная информация
|
||||
+ """
|
||||
+
|
||||
+ def map_row(self, row, typedata):
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ for cell, typefield in izip(row, typedata):
|
||||
+ if typefield in ['check', 'check_tristate']:
|
||||
+ yield map_answer.get(cell, cell) or ""
|
||||
+ elif "password" in typefield:
|
||||
+ yield "***"
|
||||
else:
|
||||
- value = field.value
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element == 'table' and field.type != 'steps':
|
||||
- head = field.tablevalue.head
|
||||
-
|
||||
- body = []
|
||||
- for row in field.tablevalue.body:
|
||||
- if not row[0]:
|
||||
- row.pop(0)
|
||||
- body.append(row)
|
||||
-
|
||||
- # 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 + "\n")
|
||||
- continue
|
||||
- ChoiceValue = field.tablevalue.values
|
||||
- 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 "password" in ChoiceValue[row].typefield:
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS(field.label + ': ')
|
||||
- res = printTable(data, head)
|
||||
- sys.stdout.flush()
|
||||
- sys.stdout.write(res + "\n")
|
||||
+ yield cell or ""
|
||||
+
|
||||
+ def __init__(self, field, display):
|
||||
+ super(TableInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ self.head = field.tablevalue.head
|
||||
+
|
||||
+ # удаление первого элемента строки (для wsdl)
|
||||
+ body = [x[1:] if x and not x[0] else x for x in field.tablevalue.body]
|
||||
+
|
||||
+ if not filter(None, map(lambda x: x, body)):
|
||||
+ self.body = None
|
||||
else:
|
||||
- uncompatible_count += 1
|
||||
+ type_values = [x.typefield for x in field.tablevalue.values]
|
||||
+ self.body = [list(self.map_row(x, type_values)) for x in body]
|
||||
+
|
||||
+ def show(self):
|
||||
+ if self.body:
|
||||
+ self.display.print_label(self.label)
|
||||
+ self.display.print_table(self.body, self.head)
|
||||
|
||||
|
||||
-# if uncompatible_count == len (Fields) and group_name:
|
||||
-# colorPrint.printSUCCESS(_('Not used'))
|
||||
+def print_brief_group(Fields, group_name):
|
||||
+ display = Display()
|
||||
+ show_group = True
|
||||
+ for element in ifilter(None,
|
||||
+ (InformationElement.from_field(
|
||||
+ FieldAdapter.from_detect(x),
|
||||
+ display)
|
||||
+ for x in Fields if not x.uncompatible)):
|
||||
+ if show_group:
|
||||
+ display.print_group(group_name)
|
||||
+ show_group = False
|
||||
+ element.show()
|
||||
+
|
||||
|
||||
class Table(tableReport):
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -953,4 +974,3 @@ def printTable(data, header=None):
|
||||
except Exception as e:
|
||||
print str(e)
|
||||
raise
|
||||
-
|
@ -1,500 +0,0 @@
|
||||
diff --git core/server/api_types.py core/server/api_types.py
|
||||
index 3863d53..eb205c1 100644
|
||||
--- core/server/api_types.py
|
||||
+++ core/server/api_types.py
|
||||
@@ -164,6 +164,97 @@ class Table(DataVarsSerializer):
|
||||
self.onClick = onClick
|
||||
self.addAction = addAction
|
||||
|
||||
+class ChoiceValueAdapter(object):
|
||||
+ def __init__(self, choicevalue):
|
||||
+ self.choicevalue = choicevalue
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return self.choicevalue.values.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.choicevalue.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def onChanged(self):
|
||||
+ return self.choicevalue.onChanged.string
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.choicevalue, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, choicevalue):
|
||||
+ if isinstance(choicevalue, ChoiceValue):
|
||||
+ return choicevalue
|
||||
+ else:
|
||||
+ return cls(choicevalue)
|
||||
+
|
||||
+class TableAdapter(object):
|
||||
+ def __init__(self, table):
|
||||
+ self.table = table
|
||||
+
|
||||
+ @property
|
||||
+ def fields(self):
|
||||
+ return self.table.fields.string
|
||||
+
|
||||
+ @property
|
||||
+ def head(self):
|
||||
+ return self.table.head.string
|
||||
+
|
||||
+ @property
|
||||
+ def body(self):
|
||||
+ if hasattr(self.table.body,'stringArray'):
|
||||
+ return [row.string
|
||||
+ for row in self.table.body.stringArray
|
||||
+ if hasattr(row, "string")]
|
||||
+ return []
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return [ChoiceValueAdapter(x) for x in self.table.values.ChoiceValue]
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.table, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, table):
|
||||
+ if isinstance(table, Table):
|
||||
+ return table
|
||||
+ else:
|
||||
+ return cls(table)
|
||||
+
|
||||
+class FieldAdapter(object):
|
||||
+ def __init__(self, field):
|
||||
+ self.field = field
|
||||
+
|
||||
+ @property
|
||||
+ def choice(self):
|
||||
+ return self.field.choice.string
|
||||
+
|
||||
+ @property
|
||||
+ def listvalue(self):
|
||||
+ return self.field.listvalue.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.field.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def tablevalue(self):
|
||||
+ return TableAdapter(self.field.tablevalue)
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.field, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, field):
|
||||
+ if isinstance(field, Field):
|
||||
+ return field
|
||||
+ else:
|
||||
+ return cls(field)
|
||||
+
|
||||
+
|
||||
class Option(DataVarsSerializer):
|
||||
shortopt = String
|
||||
longopt = String
|
||||
diff --git core/server/replace_class.py core/server/replace_class.py
|
||||
index 23c5282..6901ef6 100644
|
||||
--- core/server/replace_class.py
|
||||
+++ core/server/replace_class.py
|
||||
@@ -34,6 +34,7 @@ from calculate.lib.utils.colortext.output import BaseOutput
|
||||
from calculate.lib.cl_print import color_print
|
||||
from calculate.lib.datavars import VariableError
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
+from calculate.core.server.api_types import FieldAdapter
|
||||
|
||||
from methods_func import get_method_argparser, collect_object, \
|
||||
check_result_msg, get_param_pwd, _print
|
||||
@@ -44,7 +45,7 @@ from func import shortTraceback, CommonMethods
|
||||
|
||||
|
||||
setLocalTranslate('cl_core3', sys.modules[__name__])
|
||||
-from itertools import cycle
|
||||
+from itertools import cycle, izip, ifilter
|
||||
import time
|
||||
|
||||
|
||||
@@ -411,9 +412,9 @@ class replaceClass():
|
||||
yes_color, no_color = Colors.GREEN, Colors.LIGHT_RED
|
||||
else:
|
||||
yes_color, no_color = Colors.LIGHT_RED, Colors.GREEN
|
||||
- yes = _print.foreground(yes_color).bold("Yes")
|
||||
- no = _print.foreground(no_color).bold("No")
|
||||
- white_message = _print.foreground(Colors.WHITE).bold(
|
||||
+ yes = _print.foreground(yes_color)("Yes")
|
||||
+ no = _print.foreground(no_color)("No")
|
||||
+ white_message = _print.foreground(Colors.WHITE)(
|
||||
message)
|
||||
ask = raw_input(white_message + ' (%s/%s): ' % (yes, no))
|
||||
except KeyboardInterrupt:
|
||||
@@ -445,7 +446,7 @@ class replaceClass():
|
||||
useGetChar = False
|
||||
else:
|
||||
useGetChar = True
|
||||
- message = _print.foreground(Colors.WHITE).bold(message)
|
||||
+ message = _print.foreground(Colors.WHITE)(message)
|
||||
|
||||
while True:
|
||||
outMessage = message + ' (%s): ' % \
|
||||
@@ -531,7 +532,7 @@ class replaceClass():
|
||||
def startGroup(self, message):
|
||||
_print = get_terminal_print()
|
||||
self.printDefault(
|
||||
- _print.foreground(TextState.Colors.WHITE).bold(message))
|
||||
+ _print.foreground(TextState.Colors.WHITE)(message))
|
||||
#self.addMessage(type='startGroup', message=message)
|
||||
|
||||
def endGroup(self):
|
||||
@@ -766,159 +767,179 @@ def print_brief(view, brief_label):
|
||||
print_brief_group(Group.fields, Group.name)
|
||||
|
||||
|
||||
-def print_brief_group(Fields, group_name):
|
||||
- print_group_flag = False
|
||||
- # if group_name:
|
||||
- # _print ('\b'+group_name)
|
||||
- uncompatible_count = 0
|
||||
- colorPrint = color_print()
|
||||
- _colorprint = get_terminal_print(_print)
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['combo', 'comboEdit', 'radio', 'file']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.comments and field.choice:
|
||||
- if not field.value in field.choice:
|
||||
- field.choice.append(field.value)
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x),
|
||||
- filter(lambda x: x in field.choice,
|
||||
- [field.value])))
|
||||
- value = ', '.join(value)
|
||||
- else:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['multichoice', 'multichoice_add', \
|
||||
- 'selecttable', 'selecttable_add']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.listvalue:
|
||||
- if not field.listvalue[0]:
|
||||
- field.listvalue.pop(0)
|
||||
- if field.choice:
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x \
|
||||
- else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x), \
|
||||
- field.listvalue))
|
||||
+class Display(object):
|
||||
+ def __init__(self):
|
||||
+ self._print = get_terminal_print(color_print().defaultPrint)
|
||||
+
|
||||
+ def print_info(self, label, value):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ WHITE = TextState.Colors.WHITE
|
||||
+ self._print.foreground(WHITE)(value)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_label(self, label):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def display_asterisk(self, color):
|
||||
+ self._print(" ")
|
||||
+ self._print.foreground(color).bold("*")
|
||||
+ self._print(" ")
|
||||
+
|
||||
+ def print_error(self, message):
|
||||
+ RED = TextState.Colors.RED
|
||||
+ self.display_asterisk(RED)
|
||||
+ self._print(message)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_table(self, data, head):
|
||||
+
|
||||
+ sys.stdout.write('%s\n' % printTable(data, head))
|
||||
+
|
||||
+ def print_group(self, label):
|
||||
+ #WHITE = TextState.Colors.WHITE
|
||||
+ #self._print.foreground(WHITE).bold(label)
|
||||
+ #self._print.underline(label)
|
||||
+ self._print(label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+
|
||||
+class InformationElement(object):
|
||||
+ def __init__(self, field, display):
|
||||
+ self.value = ""
|
||||
+ self.label = ""
|
||||
+ self.display = display
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_field(cls, field, display):
|
||||
+ if field.type == 'steps':
|
||||
+ return None
|
||||
+ map_elements = {'input': ValueInfo,
|
||||
+ 'openfile': ValueInfo,
|
||||
+ 'combo': ChoiceInfo,
|
||||
+ 'comboEdit': ChoiceInfo,
|
||||
+ 'radio': ChoiceInfo,
|
||||
+ 'file': ChoiceInfo,
|
||||
+ 'multichoice': MultiChoiceInfo,
|
||||
+ 'multichoice_add': MultiChoiceInfo,
|
||||
+ 'selecttable': MultiChoiceInfo,
|
||||
+ 'selecttable_add': MultiChoiceInfo,
|
||||
+ 'error': ErrorInfo,
|
||||
+ 'check': CheckInfo,
|
||||
+ 'check_tristate': CheckInfo,
|
||||
+ 'table': TableInfo
|
||||
+ }
|
||||
+ if field.element in map_elements:
|
||||
+ return map_elements[field.element](field, display)
|
||||
+ return None
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_info(self.label, self.value)
|
||||
+
|
||||
+
|
||||
+class ValueInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ValueInfo, self).__init__(field, display)
|
||||
+ self.value = field.value or ''
|
||||
+ self.label = field.label
|
||||
+
|
||||
+class CheckInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(CheckInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ self.value = map_answer.get(field.value, field.value)
|
||||
+
|
||||
+class ChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
+ self.value = map_comment.get(field.value, field.value) or ''
|
||||
+ else:
|
||||
+ self.value = field.value if field.value else ''
|
||||
+
|
||||
+
|
||||
+class MultiChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(MultiChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.listvalue:
|
||||
+ value = field.listvalue
|
||||
+ # удалить пустой первый элемент (особенности wsdl)
|
||||
+ if value and not value[0]:
|
||||
+ value.pop(0)
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
else:
|
||||
- value = []
|
||||
- value = ', '.join(value)
|
||||
- if field.listvalue and not value:
|
||||
- value = ', '.join(field.listvalue)
|
||||
- elif not value:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- # elif field.element == 'label':
|
||||
- # print field.label
|
||||
-
|
||||
- elif field.element == 'error':
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- 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')
|
||||
+ map_comment = {}
|
||||
+ self.value = ", ".join([map_comment.get(x, x) or '' for x in value])
|
||||
+ else:
|
||||
+ self.value = field.value or ""
|
||||
+
|
||||
+
|
||||
+class ErrorInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ErrorInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_error(self.label)
|
||||
+
|
||||
+
|
||||
+class TableInfo(InformationElement):
|
||||
+ """
|
||||
+ Табличная информация
|
||||
+ """
|
||||
+
|
||||
+ def map_row(self, row, typedata):
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ for cell, typefield in izip(row, typedata):
|
||||
+ if typefield in ['check', 'check_tristate']:
|
||||
+ yield map_answer.get(cell, cell) or ""
|
||||
+ elif "password" in typefield:
|
||||
+ yield "***"
|
||||
else:
|
||||
- value = field.value
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element == 'table' and field.type != 'steps':
|
||||
- head = field.tablevalue.head
|
||||
-
|
||||
- body = []
|
||||
- for row in field.tablevalue.body:
|
||||
- if not row[0]:
|
||||
- row.pop(0)
|
||||
- body.append(row)
|
||||
-
|
||||
- # 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 + "\n")
|
||||
- continue
|
||||
- ChoiceValue = field.tablevalue.values
|
||||
- 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 "password" in ChoiceValue[row].typefield:
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS(field.label + ': ')
|
||||
- res = printTable(data, head)
|
||||
- sys.stdout.flush()
|
||||
- sys.stdout.write(res + "\n")
|
||||
+ yield cell or ""
|
||||
+
|
||||
+ def __init__(self, field, display):
|
||||
+ super(TableInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ self.head = field.tablevalue.head
|
||||
+
|
||||
+ # удаление первого элемента строки (для wsdl)
|
||||
+ body = [x[1:] if x and not x[0] else x for x in field.tablevalue.body]
|
||||
+
|
||||
+ if not filter(None, map(lambda x: x, body)):
|
||||
+ self.body = None
|
||||
else:
|
||||
- uncompatible_count += 1
|
||||
+ type_values = [x.typefield for x in field.tablevalue.values]
|
||||
+ self.body = [list(self.map_row(x, type_values)) for x in body]
|
||||
+
|
||||
+ def show(self):
|
||||
+ if self.body:
|
||||
+ self.display.print_label(self.label)
|
||||
+ self.display.print_table(self.body, self.head)
|
||||
|
||||
|
||||
-# if uncompatible_count == len (Fields) and group_name:
|
||||
-# colorPrint.printSUCCESS(_('Not used'))
|
||||
+def print_brief_group(Fields, group_name):
|
||||
+ display = Display()
|
||||
+ show_group = True
|
||||
+ for element in ifilter(None,
|
||||
+ (InformationElement.from_field(
|
||||
+ FieldAdapter.from_detect(x),
|
||||
+ display)
|
||||
+ for x in Fields if not x.uncompatible)):
|
||||
+ if show_group:
|
||||
+ display.print_group(group_name)
|
||||
+ show_group = False
|
||||
+ element.show()
|
||||
+
|
||||
|
||||
class Table(tableReport):
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -953,4 +974,3 @@ def printTable(data, header=None):
|
||||
except Exception as e:
|
||||
print str(e)
|
||||
raise
|
||||
-
|
||||
diff --git core/variables/certificate.py core/variables/certificate.py
|
||||
index 7cbf9fe..8b1c0cf 100644
|
||||
--- core/variables/certificate.py
|
||||
+++ core/variables/certificate.py
|
||||
@@ -204,7 +204,7 @@ class VariableClCertGroups(Variable):
|
||||
(OpenSSL.SSL.FILETYPE_PEM, cert)
|
||||
com = certobj.get_extension(certobj.get_extension_count()-1). \
|
||||
get_data()
|
||||
- groups = com.split(':')[1]
|
||||
+ groups = com.rpartition(':')[2]
|
||||
groups_list = groups.split(',')
|
||||
return groups_list
|
||||
except (OpenSSL.crypto.Error,IOError) as e:
|
@ -1,522 +0,0 @@
|
||||
diff --git core/server/api_types.py core/server/api_types.py
|
||||
index 3863d53..eb205c1 100644
|
||||
--- core/server/api_types.py
|
||||
+++ core/server/api_types.py
|
||||
@@ -164,6 +164,97 @@ class Table(DataVarsSerializer):
|
||||
self.onClick = onClick
|
||||
self.addAction = addAction
|
||||
|
||||
+class ChoiceValueAdapter(object):
|
||||
+ def __init__(self, choicevalue):
|
||||
+ self.choicevalue = choicevalue
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return self.choicevalue.values.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.choicevalue.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def onChanged(self):
|
||||
+ return self.choicevalue.onChanged.string
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.choicevalue, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, choicevalue):
|
||||
+ if isinstance(choicevalue, ChoiceValue):
|
||||
+ return choicevalue
|
||||
+ else:
|
||||
+ return cls(choicevalue)
|
||||
+
|
||||
+class TableAdapter(object):
|
||||
+ def __init__(self, table):
|
||||
+ self.table = table
|
||||
+
|
||||
+ @property
|
||||
+ def fields(self):
|
||||
+ return self.table.fields.string
|
||||
+
|
||||
+ @property
|
||||
+ def head(self):
|
||||
+ return self.table.head.string
|
||||
+
|
||||
+ @property
|
||||
+ def body(self):
|
||||
+ if hasattr(self.table.body,'stringArray'):
|
||||
+ return [row.string
|
||||
+ for row in self.table.body.stringArray
|
||||
+ if hasattr(row, "string")]
|
||||
+ return []
|
||||
+
|
||||
+ @property
|
||||
+ def values(self):
|
||||
+ return [ChoiceValueAdapter(x) for x in self.table.values.ChoiceValue]
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.table, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, table):
|
||||
+ if isinstance(table, Table):
|
||||
+ return table
|
||||
+ else:
|
||||
+ return cls(table)
|
||||
+
|
||||
+class FieldAdapter(object):
|
||||
+ def __init__(self, field):
|
||||
+ self.field = field
|
||||
+
|
||||
+ @property
|
||||
+ def choice(self):
|
||||
+ return self.field.choice.string
|
||||
+
|
||||
+ @property
|
||||
+ def listvalue(self):
|
||||
+ return self.field.listvalue.string
|
||||
+
|
||||
+ @property
|
||||
+ def comments(self):
|
||||
+ return self.field.comments.string
|
||||
+
|
||||
+ @property
|
||||
+ def tablevalue(self):
|
||||
+ return TableAdapter(self.field.tablevalue)
|
||||
+
|
||||
+ def __getattr__(self, item):
|
||||
+ return getattr(self.field, item)
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_detect(cls, field):
|
||||
+ if isinstance(field, Field):
|
||||
+ return field
|
||||
+ else:
|
||||
+ return cls(field)
|
||||
+
|
||||
+
|
||||
class Option(DataVarsSerializer):
|
||||
shortopt = String
|
||||
longopt = String
|
||||
diff --git core/server/replace_class.py core/server/replace_class.py
|
||||
index 23c5282..6901ef6 100644
|
||||
--- core/server/replace_class.py
|
||||
+++ core/server/replace_class.py
|
||||
@@ -34,6 +34,7 @@ from calculate.lib.utils.colortext.output import BaseOutput
|
||||
from calculate.lib.cl_print import color_print
|
||||
from calculate.lib.datavars import VariableError
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
+from calculate.core.server.api_types import FieldAdapter
|
||||
|
||||
from methods_func import get_method_argparser, collect_object, \
|
||||
check_result_msg, get_param_pwd, _print
|
||||
@@ -44,7 +45,7 @@ from func import shortTraceback, CommonMethods
|
||||
|
||||
|
||||
setLocalTranslate('cl_core3', sys.modules[__name__])
|
||||
-from itertools import cycle
|
||||
+from itertools import cycle, izip, ifilter
|
||||
import time
|
||||
|
||||
|
||||
@@ -411,9 +412,9 @@ class replaceClass():
|
||||
yes_color, no_color = Colors.GREEN, Colors.LIGHT_RED
|
||||
else:
|
||||
yes_color, no_color = Colors.LIGHT_RED, Colors.GREEN
|
||||
- yes = _print.foreground(yes_color).bold("Yes")
|
||||
- no = _print.foreground(no_color).bold("No")
|
||||
- white_message = _print.foreground(Colors.WHITE).bold(
|
||||
+ yes = _print.foreground(yes_color)("Yes")
|
||||
+ no = _print.foreground(no_color)("No")
|
||||
+ white_message = _print.foreground(Colors.WHITE)(
|
||||
message)
|
||||
ask = raw_input(white_message + ' (%s/%s): ' % (yes, no))
|
||||
except KeyboardInterrupt:
|
||||
@@ -445,7 +446,7 @@ class replaceClass():
|
||||
useGetChar = False
|
||||
else:
|
||||
useGetChar = True
|
||||
- message = _print.foreground(Colors.WHITE).bold(message)
|
||||
+ message = _print.foreground(Colors.WHITE)(message)
|
||||
|
||||
while True:
|
||||
outMessage = message + ' (%s): ' % \
|
||||
@@ -531,7 +532,7 @@ class replaceClass():
|
||||
def startGroup(self, message):
|
||||
_print = get_terminal_print()
|
||||
self.printDefault(
|
||||
- _print.foreground(TextState.Colors.WHITE).bold(message))
|
||||
+ _print.foreground(TextState.Colors.WHITE)(message))
|
||||
#self.addMessage(type='startGroup', message=message)
|
||||
|
||||
def endGroup(self):
|
||||
@@ -766,159 +767,179 @@ def print_brief(view, brief_label):
|
||||
print_brief_group(Group.fields, Group.name)
|
||||
|
||||
|
||||
-def print_brief_group(Fields, group_name):
|
||||
- print_group_flag = False
|
||||
- # if group_name:
|
||||
- # _print ('\b'+group_name)
|
||||
- uncompatible_count = 0
|
||||
- colorPrint = color_print()
|
||||
- _colorprint = get_terminal_print(_print)
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['combo', 'comboEdit', 'radio', 'file']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.comments and field.choice:
|
||||
- if not field.value in field.choice:
|
||||
- field.choice.append(field.value)
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x),
|
||||
- filter(lambda x: x in field.choice,
|
||||
- [field.value])))
|
||||
- value = ', '.join(value)
|
||||
- else:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element in ['multichoice', 'multichoice_add', \
|
||||
- 'selecttable', 'selecttable_add']:
|
||||
- if field.choice:
|
||||
- if not field.choice[0]:
|
||||
- field.choice.pop(0)
|
||||
- if field.comments:
|
||||
- if not field.comments[0]:
|
||||
- field.comments.pop(0)
|
||||
- if field.listvalue:
|
||||
- if not field.listvalue[0]:
|
||||
- field.listvalue.pop(0)
|
||||
- if field.choice:
|
||||
- value = map(lambda x: field.comments[x] \
|
||||
- if len(field.comments) > x \
|
||||
- else field.choice[x],
|
||||
- map(lambda x: field.choice.index(x), \
|
||||
- field.listvalue))
|
||||
+class Display(object):
|
||||
+ def __init__(self):
|
||||
+ self._print = get_terminal_print(color_print().defaultPrint)
|
||||
+
|
||||
+ def print_info(self, label, value):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ WHITE = TextState.Colors.WHITE
|
||||
+ self._print.foreground(WHITE)(value)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_label(self, label):
|
||||
+ GREEN = TextState.Colors.GREEN
|
||||
+ self.display_asterisk(GREEN)
|
||||
+ self._print("%s: " % label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def display_asterisk(self, color):
|
||||
+ self._print(" ")
|
||||
+ self._print.foreground(color).bold("*")
|
||||
+ self._print(" ")
|
||||
+
|
||||
+ def print_error(self, message):
|
||||
+ RED = TextState.Colors.RED
|
||||
+ self.display_asterisk(RED)
|
||||
+ self._print(message)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+ def print_table(self, data, head):
|
||||
+
|
||||
+ sys.stdout.write('%s\n' % printTable(data, head))
|
||||
+
|
||||
+ def print_group(self, label):
|
||||
+ #WHITE = TextState.Colors.WHITE
|
||||
+ #self._print.foreground(WHITE).bold(label)
|
||||
+ #self._print.underline(label)
|
||||
+ self._print(label)
|
||||
+ self._print("\n")
|
||||
+
|
||||
+
|
||||
+class InformationElement(object):
|
||||
+ def __init__(self, field, display):
|
||||
+ self.value = ""
|
||||
+ self.label = ""
|
||||
+ self.display = display
|
||||
+
|
||||
+ @classmethod
|
||||
+ def from_field(cls, field, display):
|
||||
+ if field.type == 'steps':
|
||||
+ return None
|
||||
+ map_elements = {'input': ValueInfo,
|
||||
+ 'openfile': ValueInfo,
|
||||
+ 'combo': ChoiceInfo,
|
||||
+ 'comboEdit': ChoiceInfo,
|
||||
+ 'radio': ChoiceInfo,
|
||||
+ 'file': ChoiceInfo,
|
||||
+ 'multichoice': MultiChoiceInfo,
|
||||
+ 'multichoice_add': MultiChoiceInfo,
|
||||
+ 'selecttable': MultiChoiceInfo,
|
||||
+ 'selecttable_add': MultiChoiceInfo,
|
||||
+ 'error': ErrorInfo,
|
||||
+ 'check': CheckInfo,
|
||||
+ 'check_tristate': CheckInfo,
|
||||
+ 'table': TableInfo
|
||||
+ }
|
||||
+ if field.element in map_elements:
|
||||
+ return map_elements[field.element](field, display)
|
||||
+ return None
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_info(self.label, self.value)
|
||||
+
|
||||
+
|
||||
+class ValueInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ValueInfo, self).__init__(field, display)
|
||||
+ self.value = field.value or ''
|
||||
+ self.label = field.label
|
||||
+
|
||||
+class CheckInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(CheckInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ self.value = map_answer.get(field.value, field.value)
|
||||
+
|
||||
+class ChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
+ self.value = map_comment.get(field.value, field.value) or ''
|
||||
+ else:
|
||||
+ self.value = field.value if field.value else ''
|
||||
+
|
||||
+
|
||||
+class MultiChoiceInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(MultiChoiceInfo, self).__init__(field, display)
|
||||
+ self.label = field.label or ''
|
||||
+ if field.listvalue:
|
||||
+ value = field.listvalue
|
||||
+ # удалить пустой первый элемент (особенности wsdl)
|
||||
+ if value and not value[0]:
|
||||
+ value.pop(0)
|
||||
+ if field.choice and field.comments:
|
||||
+ map_comment = dict(zip(field.choice, field.comments))
|
||||
else:
|
||||
- value = []
|
||||
- value = ', '.join(value)
|
||||
- if field.listvalue and not value:
|
||||
- value = ', '.join(field.listvalue)
|
||||
- elif not value:
|
||||
- value = field.value if field.value else ''
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- #_print('\b' + group_name)
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- # elif field.element == 'label':
|
||||
- # print field.label
|
||||
-
|
||||
- elif field.element == 'error':
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- 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')
|
||||
+ map_comment = {}
|
||||
+ self.value = ", ".join([map_comment.get(x, x) or '' for x in value])
|
||||
+ else:
|
||||
+ self.value = field.value or ""
|
||||
+
|
||||
+
|
||||
+class ErrorInfo(InformationElement):
|
||||
+ def __init__(self, field, display):
|
||||
+ super(ErrorInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+
|
||||
+ def show(self):
|
||||
+ self.display.print_error(self.label)
|
||||
+
|
||||
+
|
||||
+class TableInfo(InformationElement):
|
||||
+ """
|
||||
+ Табличная информация
|
||||
+ """
|
||||
+
|
||||
+ def map_row(self, row, typedata):
|
||||
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
|
||||
+ for cell, typefield in izip(row, typedata):
|
||||
+ if typefield in ['check', 'check_tristate']:
|
||||
+ yield map_answer.get(cell, cell) or ""
|
||||
+ elif "password" in typefield:
|
||||
+ yield "***"
|
||||
else:
|
||||
- value = field.value
|
||||
- if not print_group_flag:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
|
||||
-
|
||||
- elif field.element == 'table' and field.type != 'steps':
|
||||
- head = field.tablevalue.head
|
||||
-
|
||||
- body = []
|
||||
- for row in field.tablevalue.body:
|
||||
- if not row[0]:
|
||||
- row.pop(0)
|
||||
- body.append(row)
|
||||
-
|
||||
- # 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 + "\n")
|
||||
- continue
|
||||
- ChoiceValue = field.tablevalue.values
|
||||
- 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 "password" in ChoiceValue[row].typefield:
|
||||
- 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:
|
||||
- if group_name:
|
||||
- print_group_flag = True
|
||||
- _colorprint.bold.foreground(
|
||||
- TextState.Colors.WHITE)(group_name)
|
||||
- colorPrint.printSUCCESS(field.label + ': ')
|
||||
- res = printTable(data, head)
|
||||
- sys.stdout.flush()
|
||||
- sys.stdout.write(res + "\n")
|
||||
+ yield cell or ""
|
||||
+
|
||||
+ def __init__(self, field, display):
|
||||
+ super(TableInfo, self).__init__(field, display)
|
||||
+ self.label = field.label
|
||||
+ self.head = field.tablevalue.head
|
||||
+
|
||||
+ # удаление первого элемента строки (для wsdl)
|
||||
+ body = [x[1:] if x and not x[0] else x for x in field.tablevalue.body]
|
||||
+
|
||||
+ if not filter(None, map(lambda x: x, body)):
|
||||
+ self.body = None
|
||||
else:
|
||||
- uncompatible_count += 1
|
||||
+ type_values = [x.typefield for x in field.tablevalue.values]
|
||||
+ self.body = [list(self.map_row(x, type_values)) for x in body]
|
||||
+
|
||||
+ def show(self):
|
||||
+ if self.body:
|
||||
+ self.display.print_label(self.label)
|
||||
+ self.display.print_table(self.body, self.head)
|
||||
|
||||
|
||||
-# if uncompatible_count == len (Fields) and group_name:
|
||||
-# colorPrint.printSUCCESS(_('Not used'))
|
||||
+def print_brief_group(Fields, group_name):
|
||||
+ display = Display()
|
||||
+ show_group = True
|
||||
+ for element in ifilter(None,
|
||||
+ (InformationElement.from_field(
|
||||
+ FieldAdapter.from_detect(x),
|
||||
+ display)
|
||||
+ for x in Fields if not x.uncompatible)):
|
||||
+ if show_group:
|
||||
+ display.print_group(group_name)
|
||||
+ show_group = False
|
||||
+ element.show()
|
||||
+
|
||||
|
||||
class Table(tableReport):
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -953,4 +974,3 @@ def printTable(data, header=None):
|
||||
except Exception as e:
|
||||
print str(e)
|
||||
raise
|
||||
-
|
||||
diff --git core/variables/certificate.py core/variables/certificate.py
|
||||
index 7cbf9fe..8b1c0cf 100644
|
||||
--- core/variables/certificate.py
|
||||
+++ core/variables/certificate.py
|
||||
@@ -204,7 +204,7 @@ class VariableClCertGroups(Variable):
|
||||
(OpenSSL.SSL.FILETYPE_PEM, cert)
|
||||
com = certobj.get_extension(certobj.get_extension_count()-1). \
|
||||
get_data()
|
||||
- groups = com.split(':')[1]
|
||||
+ groups = com.rpartition(':')[2]
|
||||
groups_list = groups.split(',')
|
||||
return groups_list
|
||||
except (OpenSSL.crypto.Error,IOError) as e:
|
||||
diff --git scripts/cl-core scripts/cl-core
|
||||
index 02baeff..c923e34 100644
|
||||
--- scripts/cl-core
|
||||
+++ scripts/cl-core
|
||||
@@ -18,6 +18,7 @@
|
||||
from calculate.core.server.cl_server import main
|
||||
import sys, os
|
||||
reload(sys)
|
||||
+from calculate.lib.datavars import CriticalError
|
||||
sys.setdefaultencoding("utf-8")
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
setLocalTranslate('cl_core',sys.modules[__name__])
|
||||
@@ -26,6 +27,9 @@ from traceback import print_exc
|
||||
if __name__=='__main__':
|
||||
try:
|
||||
sys.exit(main())
|
||||
+ except CriticalError as e:
|
||||
+ sys.stderr.write("%s\n" % str(e))
|
||||
+ sys.exit(1)
|
||||
except ImportError, e:
|
||||
print_exc()
|
||||
cannot_import = 'cannot import name '
|
@ -1,102 +0,0 @@
|
||||
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 = ""
|
||||
|
@ -1,133 +0,0 @@
|
||||
diff --git core/depricated.py core/depricated.py
|
||||
new file mode 100644
|
||||
index 0000000..f5d7b4e
|
||||
--- /dev/null
|
||||
+++ core/depricated.py
|
||||
@@ -0,0 +1,17 @@
|
||||
+#-*- coding: utf-8 -*-
|
||||
+
|
||||
+# Copyright 2011-2013 Calculate Ltd. http://www.calculate-linux.org
|
||||
+#
|
||||
+# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+# you may not use this file except in compliance with the License.
|
||||
+# You may obtain a copy of the License at
|
||||
+#
|
||||
+# http://www.apache.org/licenses/LICENSE-2.0
|
||||
+#
|
||||
+# Unless required by applicable law or agreed to in writing, software
|
||||
+# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+# See the License for the specific language governing permissions and
|
||||
+# limitations under the License.
|
||||
+
|
||||
+safetyWrapper = lambda *args, **kw: lambda f:f
|
||||
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..3bde6e4 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
|
||||
@@ -38,6 +39,7 @@ from calculate.core.server.api_types import ChoiceValue, Table, Option, Field, \
|
||||
GroupField, ViewInfo, ViewParams
|
||||
from calculate.lib.datavars import DataVars
|
||||
from decorators import Dec
|
||||
+from calculate.core.depricated import safetyWrapper
|
||||
|
||||
class CommonMethods:
|
||||
def dispatchConf(self,filesApply=None):
|
||||
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 = ""
|
||||
|
@ -1,15 +1,5 @@
|
||||
DIST calculate-desktop-3.2.0_alpha1.tar.bz2 16991 SHA256 ae11cc15034f6c635056d2e093138cd0ff721c16ecce0f7a964b993c531cf55f SHA512 acb9bf90d706072201a3c1c63512e6f218964e89856a704c44f0545124ab96c2e7b1871239e9527ab87579adb812acb4541bb58eebdb53b80442524b5b5cf7e4 WHIRLPOOL 53c36dbad0473a1ba6977de5488975a87e7d35d9975399bdf715a48268dce5eb1b4d0c5026acf65fd6003388d42095d5264396cca5e9c06c98b1711e51f83f65
|
||||
DIST calculate-desktop-3.2.0_alpha2.tar.bz2 16992 SHA256 a15f663b4cbdf3e5c76a3016c7bd7271eb7c5d2192a914c3e8daf0fa80d7ab6e SHA512 91dc8011d55e6680625d6b9ba101983155c45c01c4286605284521de5c13c8203c1c8c6424bb7b68f041f51863166958a634c18ba18b9e9c82d4ecde51c56c75 WHIRLPOOL 3a2c3282e9d0092e3cea8647cd906987d9ef5966c63f62f24eeeff50face26bc134615c82bb885207209623705940092b46f765dda8e0091afdd27eec8827523
|
||||
DIST calculate-desktop-3.2.0_alpha3.tar.bz2 16966 SHA256 cec3be379d400c030aba3858555ed30cfd5455dacea5b372c34dcc840bafce4f SHA512 2e2f1b2b90eb1bc4e1617099a83f828f91df3656e6c79e33895c928690bcb155fa5f0af3ad0a15b923121015bf79c0b34a90c8d609d1414e7c242a90372c8a4d WHIRLPOOL 7a4d9c8e709e01cc030ddf89ff529fb733726fcfe91c4b1d8a1b2a011cffc935e2c61c9c6259deea22529279546372a63902e67f773a28e9ec830d6856c2194c
|
||||
DIST calculate-desktop-3.2.0_alpha4.tar.bz2 16993 SHA256 341af3512fd6f03873d4ba8fb9ae6619e58b3645714e5865528232dfe87bd391 SHA512 e372f6efb53ce25adec3eb537b1fdb9e3aa9ba55675a1d3f27f8b424638a454a9aae9f3dcb89d425b11b3d126d0055c5e382048a0396ca071251ac5afcc057f3 WHIRLPOOL 4c00ec00fb17937ac324d2ad14268c08a200f0e982450e49e9a48f5e887e2f6a69ccba2ec4929715c7fcd5c21c3d96c78b95f7037d2f6ffdde699955134a454c
|
||||
DIST calculate-desktop-3.2.0_alpha5.tar.bz2 16960 SHA256 5ac8f0f92bd5e71256a78a5715348f627e05e48fbc1e79e6c6a91cd22d1dda8d SHA512 fe655e03a4ff8f115ebcadebd68e0cf439dc10f35b5526b82c7e5df95966c451379a58b7cc3872d6b44f8dad9a2824bb116c4a119a7c3811459b09cddceeb10b WHIRLPOOL c3ee1926c8402d9411983cf53fbf0bee8f972ce7d7bbe53082df2a46b1c3769c96a475884b3e4d7d2ae62f6c9a6af3345c18344a1e7814356856063edb039358
|
||||
DIST calculate-desktop-3.2.0_alpha6.tar.bz2 16994 SHA256 26c068a2b009a4d3dccf3164d541fcdeb27854717880eddbbba1daecd64998cc SHA512 6ac9f982a5abfd32d36669404de1936b66d57d5e3590778fa6f128464d75fd6a5a3d062fe7a4ad400439929d5d6e3ed2ccbb51c27f5d83ed4b398e463f7c1642 WHIRLPOOL 64e4e53085fd8f7458665471a43816a425e56281d62c3579d68285647057f9ac1e3d761e0d11cd1dd86f80046d1d2525162d4b107e726d6c405a09e5203e8864
|
||||
DIST calculate-desktop-3.2.0_alpha7.tar.bz2 16986 SHA256 03d279545655fbc44ea0848575f6ffe8c9bbda31b31a8301e88c8c880dd80869 SHA512 1c4de51161b6ac2cbd9c6470fcafd40dfc45b47133c123d518b8cfd32564b6d0e7b55eb10ce5a9330f765219d4adb63c1e7d99792a9021369ae3984b70d5184a WHIRLPOOL 847c81a4ebb390f62efcef7bb4e21e6ce624a5ec52f4f5132f3f7f805bc854ff145c384e5c939b1eadbebe5c17c8023e55a45b3bd36012571e2a7e78073c095f
|
||||
EBUILD calculate-desktop-3.2.0_alpha1.ebuild 772 SHA256 4cc1a40a4bc4ccce2b878d979ef1dfb84acadad570cebabefc9a34d5f32b774c SHA512 279af8a1c6e5d017d46c2436466e0697f4be35b6975e0f1d44c0f59e8020b3130c5788e4841116a021ab6b16fed1f21052886197342eb0987d72e549f5b17ba2 WHIRLPOOL 8f512d33d5364be9ee9cce997fea18826d77ca85287c7ef146c0729e4cfbeba09e5175fd889325b793322c4feee83633177793204bc63aa773639f27fe845914
|
||||
EBUILD calculate-desktop-3.2.0_alpha2.ebuild 770 SHA256 894ed9f241cd42c1477ed119b950e22f714ff591309ba0fdb438ffc95c7b9fcb SHA512 ceacdc067a91b9669382490d038702de7c79911aa834250ed03ba87f15ca6c23bde33fb58fa42f65b8ccb4971bfbb41f0c5104f8c6141d264d1187274201e4ce WHIRLPOOL afeee7bcbbd8e945977b17d5d9b06dd6ec1ada2b9471639ea0bf978e7b22c74b36e5b4d45347a031fdda15dec9f112a372afff5447d7428add0fd0d02e45d971
|
||||
EBUILD calculate-desktop-3.2.0_alpha3.ebuild 770 SHA256 4aa669171d82a0b3f1d17dca57d651c5001e632ed0a00ac19f4eee84fae8f0a5 SHA512 8d9887a764ec8d146943368363e57cb74e1b88709a2faed3e61f027144d347b8508d9a1e52763890c3b4724d27db7249ac5e18aaa5f34c92ba386a2441dfee35 WHIRLPOOL 5947b680727f55a9ada7ffedb13a417f18c1a7ee30d8c624076c57ea2f7327de5977bee1667dfcb5ceea938a576c99199789b1c941fdfbbd9451d0b6278605ef
|
||||
EBUILD calculate-desktop-3.2.0_alpha4.ebuild 770 SHA256 66a44885c720810ac3f4bedc83d16a1af6947268ef02b5446b52e95873aa9bd8 SHA512 cbe7266189af6b1c43f6c9e7857919a291f46257fe35b2c8c3a6629b63218f566b3069cb0abf03ac3c37a4bbaef0d913e7d6110351252cc059a481fcbd7a1a99 WHIRLPOOL f7804d0a06c5619fd1498443e95769c4c434203f832c180441d19e8fed84bf7ca2ca11804112775467a464c445a7582371690b431ef311f10f6ff2db58b0bc42
|
||||
EBUILD calculate-desktop-3.2.0_alpha5.ebuild 770 SHA256 a64221d60d2d2793a044b39b6485cb3324b51588529919810da93862850bc47f SHA512 fa31be471f02916f04757fb767f0bb1eaab290827cfb505ae6114e51b04b9c8b61bdb19d9536a05177f89404425d37ae509b32ff025ba6274b81010e62404580 WHIRLPOOL e086e031907c7e35e7c2111d1473c8a3af85b79ccbd6297f08a66fc6d362c45543475e25fa7b1905b3b3544c1e3d0e2d74d0582a56455baf3284f4f209a322e6
|
||||
EBUILD calculate-desktop-3.2.0_alpha6.ebuild 770 SHA256 b61657898f8754fa2154607e053af2bd11317a9a574daad21028d04db8ed0eba SHA512 11aea4b613fff9ce31b19d3f22bef3d888c8bd3bbacc712b8a8450642bcb19300fe3ff9dc74583e1e8032be3630080609c07e8c86b5aaf99836a50cecbe38f86 WHIRLPOOL 440ec050982e230a337e98f13242016a0edae9764a93660699a0c38ffc6c61d5fa139482ae97fc4e31ebfcc586688e1ab458254dddb4e9fc8e259837fe1fd5b4
|
||||
EBUILD calculate-desktop-3.2.0_alpha7.ebuild 770 SHA256 dc0c14fdd8a3de6cf5aaeccd504d5938577d9c08977aae82ffbc28e7e364e317 SHA512 9c6770bc981724fae2cfcbb840d7e7451b6af1fa6c1b575efd70e0221495114429e234876c4af26916bbaf7a9c57c9fdf2ecb754a36bc479c77c84a6ec4f7f28 WHIRLPOOL dd3bb9155590e7b5758191670df1f167a656e29f70925d80ab9d72d8bfbc533c677d01c2a33b2cf4e218bdcbfbfe24dc8c3b91bee85bda40c8f1e8a9fff026f5
|
||||
EBUILD calculate-desktop-3.2.9999.ebuild 976 SHA256 bd8a14acad129ab9d31540ed84b0ac43db93672c8b8503fc8a67fa9806ddf33c SHA512 8369a58929caad3c2b2017589e260c17eb17e55a3f7cd257836c7c9922a6880c991f70ab3e267c21a1cc416261e091aa3e1619e06cdc8c850096a39c63968a28 WHIRLPOOL 837661bf9ab451689c25290793a92286e9bed8eb02761bd3f7757b606f7ef16f18de4a8653c6e0902e3b23fafd1f3f7b3215e7e4d1713ed9e6f70ef12ded196e
|
||||
|
@ -1,31 +0,0 @@
|
||||
# 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 the desktop configuration 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_alpha1
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
media-gfx/feh
|
||||
x11-apps/xmessage
|
||||
!<sys-apps/calculate-desktop-3.1.0_alpha1
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,31 +0,0 @@
|
||||
# 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 the desktop configuration 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_alpha2
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
media-gfx/feh
|
||||
x11-apps/xmessage
|
||||
!<sys-apps/calculate-desktop-3.1.0_alpha1
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,31 +0,0 @@
|
||||
# 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 the desktop configuration 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_alpha3
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
media-gfx/feh
|
||||
x11-apps/xmessage
|
||||
!<sys-apps/calculate-desktop-3.1.0_alpha1
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,31 +0,0 @@
|
||||
# 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 the desktop configuration 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_alpha4
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
media-gfx/feh
|
||||
x11-apps/xmessage
|
||||
!<sys-apps/calculate-desktop-3.1.0_alpha1
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,31 +0,0 @@
|
||||
# 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 the desktop configuration 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
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
media-gfx/feh
|
||||
x11-apps/xmessage
|
||||
!<sys-apps/calculate-desktop-3.1.0_alpha1
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
sys-auth/pam_client
|
||||
dev-lang/swig"
|
||||
RDEPEND="${DEPEND}"
|
@ -1,23 +0,0 @@
|
||||
# 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 utilities for assembling tasks of Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND=">=sys-apps/calculate-lib-3.2.0_alpha1"
|
||||
|
||||
DEPEND="sys-devel/gettext
|
||||
${RDEPEND}"
|
@ -1,23 +0,0 @@
|
||||
# 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 utilities for assembling tasks of Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
RDEPEND=">=sys-apps/calculate-lib-3.2.0_alpha2"
|
||||
|
||||
DEPEND="sys-devel/gettext
|
||||
${RDEPEND}"
|
@ -1,23 +0,0 @@
|
||||
# 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 utilities for assembling tasks of Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
RDEPEND=">=sys-apps/calculate-lib-3.2.0_alpha3"
|
||||
|
||||
DEPEND="sys-devel/gettext
|
||||
${RDEPEND}"
|
@ -1,23 +0,0 @@
|
||||
# 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 utilities for assembling tasks of Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
RDEPEND=">=sys-apps/calculate-lib-3.2.0_alpha4"
|
||||
|
||||
DEPEND="sys-devel/gettext
|
||||
${RDEPEND}"
|
@ -1,23 +0,0 @@
|
||||
# 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 utilities for assembling tasks of Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
RDEPEND=">=sys-apps/calculate-lib-3.2.0_alpha5"
|
||||
|
||||
DEPEND="sys-devel/gettext
|
||||
${RDEPEND}"
|
@ -1,17 +1,5 @@
|
||||
AUX calculate-install-3.2.0_alpha4-r1.patch 542 SHA256 e65e98c21728e29093ef210b38b28bd9c5ed77d9dad23e0b58f47b7a1a5138de SHA512 a2708507707ae6c1742b79f690f57316cac5b59881a0914ab38c507406c48e3fc53438ea4f62da3bb163d6399480a7240862eb315c7706ea145a75f05968c1e2 WHIRLPOOL 1fb0e494376f91a75a29fecffaeb38bb95b0098798d3d574bddd7aca6c49c3373a25cd7bb22b8cb0437bf53c3c4905b61b9824528a2fdf36db301dc3391009bc
|
||||
DIST calculate-install-3.2.0_alpha1.tar.bz2 77373 SHA256 d636ddbfe3fa2990e5a490b6fd23cee7c1f9d2d69fcb975d62ef2cf94b78a033 SHA512 f2e1089828811d0dac18ed3d3e864dc1a543f198edf8b18a23b267b16f2583d75c4f3650ce92d7fd54de489da8b825c77b4d3fe5d788d210810f9909dca48266 WHIRLPOOL ef0d8766eb20eb8076ebcceaaa869d887ea02ccc565a149840ee645e43366de236f8f1250d9a1052e8146c6401f4562b5457cb071bf9ad49db9800ce53c99f4d
|
||||
DIST calculate-install-3.2.0_alpha2.tar.bz2 77181 SHA256 abc155fae93afef3d7aa5d8281e5445e002e0686e86268e850419870aadb3c2b SHA512 0c9554fe492bdbd01f5dba35af0690b621a9f9df48df13404a7d9b65aadc785afd4060fb891e993a8ee0cc22aea707815969e1092727f26568d5d8bb83d2731c WHIRLPOOL 0ae8fe06302a94f450db857fa6f24d40f07193a56ec4834f3de82a707fc5616fb2a3aca3e034e5fdf890c6aa4e61cd7ce94fdab21ecd7d2117f0341803dcc8af
|
||||
DIST calculate-install-3.2.0_alpha3.tar.bz2 77190 SHA256 507730948b2beca15bdf70bb0af8c319766229d41e7b59b13930d3706034bc8c SHA512 b786dcd699707e58487136fc9a60b18912c8db65f9c843bffd6c7c701c6d3ce083dd0e5a7a93f89b3fa8da95c1e10bcb3d891047f78826b8b6ed15d55287ef31 WHIRLPOOL a0666f19decb779cfde4a808e7395b79dbc0b25a5fdf396172b4728711ad76a4de42b73a13f05513727d8dc78a2a5e14fd986c41b08c124fd35d6ee66eac50d5
|
||||
DIST calculate-install-3.2.0_alpha4.tar.bz2 77196 SHA256 69d5b92b5e3df781a4581b471459241b2335829295fb876335064bba8dad09c7 SHA512 d5e631c3ed09fa8133f8607a1c6708c77fee2504aa8dfbc5c7ae90986c440664eeb576e20feb0fce9d72d30ba16f461167a07da1f596b044bdde9ac925f60a33 WHIRLPOOL 313875703beea9de6dff965ae7bd817be6cd2ebaf858d804b03bffdc47c1e658b97c7f81d203967c182170886d1ab488d28f91c668a1311499468c6c151b0181
|
||||
DIST calculate-install-3.2.0_alpha5.tar.bz2 77187 SHA256 8f09ab733b935750a73199b6e4c41443f6eb787b3cba608630ebc0421e85f91c SHA512 78424eb916048098dee9ec02ef501834b3c3b3fbf617d972c55236e64f6081965437dc6a648768f13104e48eb826ff3f0970549113ff005f617f555f5f114443 WHIRLPOOL e7a8c91a16f30766a155bb1aec97d25f0fe58ab222dcbb500d836649b668a052df0ee83fb9beb45dbd465358a25e9de2a47c28c7625aa9486b0e13df0f25218c
|
||||
DIST calculate-install-3.2.0_alpha6.tar.bz2 77185 SHA256 a7ef2b34ed7a3b59eae49260bb8e7a5ed4eacb6c3dd3bf23baf73ba70e85ae07 SHA512 55e0b230723181d0b732e53135b458a73d436875b76c928677865053e3884de32741fa9f964ba7029802f56adf4d83f0fda0efc19af0547c0aec2853c1ce0fee WHIRLPOOL 7873b23d068939b94b88420d3e1c4ed9e7f4975f5c8acdf0b1209cf91a3576bd7051f015f1235c81c2a5b1375e25a408004880edf34c5a240600f55923fcf655
|
||||
DIST calculate-install-3.2.0_alpha7.tar.bz2 77177 SHA256 a03bc2dcc969a899af47b17c6e8c73572f7536825ed0dba38181004c5bdd2d49 SHA512 8d2f298e9a39e85eb2cd097e77c9f2995ac2f4c683b306956806f1ea220f8238a75870fbc8345f6248d41a25b6a9b1d141c30507c63a5d16f8187b02e6cf51ac WHIRLPOOL b34095ea200c698f3f0189636941fda6834c5b482e60356ccb53df453e00e846b086eb15fde08cf82a00b4a8fc9418ee516db06486791e45d52c50d792e67c25
|
||||
EBUILD calculate-install-3.2.0_alpha1.ebuild 914 SHA256 2ef6cf6b62c46fb65466a7dab039e72178fc98f77ea56104b4f327b2596cbbd4 SHA512 f0853f5ddc2c71754e5249df9c332a04accc390d7514347651a24ce4ace8e93e4ac1a763aadec5fe4de4ffe7277d6c7e477985fda9c3a9c8957afea52b7bcb74 WHIRLPOOL e443c38a254512205f1d141c3d409a44329c22ff56281da462bef683cab2bb3dc2cff416d39ed30fde512c69551005bb099ffb22e90e89f25b1de3e01afe9271
|
||||
EBUILD calculate-install-3.2.0_alpha2.ebuild 912 SHA256 51833fff84c97b49c86408f08c8d0eb4f6e56edf10be7239c114f751ebd7c30a SHA512 1e6d379cf8949a2c12226042ade00605c6aa8987a8d3213396ed15584da0bbad50fa8ba20e74c145e6658e914a18112afd890d3828c542765b098dbcf1932a18 WHIRLPOOL 460574e3ca234a13f49d0f4edf56e93a76f536f2b46d4693f478bcfc3b0a940610c5c1b32f02d37e5f4ba28cdbed3a79f76f0c094e852f3e5cf12f793cfd141c
|
||||
EBUILD calculate-install-3.2.0_alpha3.ebuild 912 SHA256 219ca7b8fffc380861aea9e5e48d8ca5eb4747f36ba4656e32f8bd3841fe71d7 SHA512 b2c5bf3fe10e622f8293635d577cb1eb07ee4fce584aa7010f8fe3469bb308c92479eb3531480ef1c3aee29d9c9fb7feed3f5d037bfc9972a7ff18f86729e784 WHIRLPOOL fe30a249f0b87e5d1c0bde27600fee673943de5046609f1d282a6f415f4e6d263c75c9258d48eb6d6b5ed546f98ee7228233aca75340032f6fe902163d5ef65a
|
||||
EBUILD calculate-install-3.2.0_alpha4-r1.ebuild 1057 SHA256 0c3b03eda9902977d17953f45a190e09b86311e62155e4a4b35e5675605d4fe7 SHA512 84a3421cffda225d6ea2afcd43701dd59b245fa25efe0a7eab3c4cbe501490efa553a7c28a18a69de37d24a9def44d46e30e387d1da654d918bb6291fc279ff4 WHIRLPOOL 887cf49f6aacec909e45e464236bde2be7de920d67dc1d92f80282f3e1860d1e217ab07113e8d1c3cb1855150c36cf98202907c7341420441f3e06d18b233816
|
||||
EBUILD calculate-install-3.2.0_alpha4.ebuild 912 SHA256 551346a50d995d60b6ea747c6b13eead110648da9a354085236720c31b4d17eb SHA512 7cd67aaaa9cca4613c6a660dc8258fe82399829e48411fde8de0c5f36a2b905baa8d14a16392cceb14d81194f5a5b09de6f3792b7d4bd0d8c113c3cfc5570008 WHIRLPOOL 0aa1bbaeb375fbf54a6ee76e1c8156e7bb927d73c3dcf0d0a62ea861731e52d1077ec71013c01ca66673f5d1d97574e76b3f90a59a167196776c62a0361bb4be
|
||||
EBUILD calculate-install-3.2.0_alpha5.ebuild 912 SHA256 889647a000d8356f50853025db7751c8d6b99a1e009c3f1122258562abff0832 SHA512 832339126d271fd9ae0ef8d28beaaa8409dc8960ae08a0e87ec6e35c4a2e9761909d8e641850b5843a788c2b39666a2543df6d3000c520ee67dd32594408eac3 WHIRLPOOL d5fb216058eae45f861233cde470f30e367bb57c8d95586e955b68f46b6e151cdc01c684150ffaec1dfdf0052c15a28c62f875130d83c0eac507428a48821025
|
||||
EBUILD calculate-install-3.2.0_alpha6.ebuild 912 SHA256 90162bd69aa98810a7cb2083bb76e395806aa1f18c56880d292a61501eacb1d3 SHA512 86d1975cf6fc9ae795ac30ccd74ba682e3bf91c47533a43c1045edd0e97591d4f3e5146492f573fb9fbae703c29d1cfbd33e13a43e708f673d4750e7d4f20b5a WHIRLPOOL a13022978dea3a31d90c77b0d4b32028593e632187ce74ad261922c0ac0aaafdc0de1ef3d93cfe0e2f405c4bb7c8bccfe9773c38ec35e3a6f68af8b6eff4e975
|
||||
EBUILD calculate-install-3.2.0_alpha7.ebuild 912 SHA256 357670ed6057184cea7e6abc3f15e40f1e65e4a0dc099058ad335869c8ccc9ff SHA512 5005816cd85e777d08ffdebd0622bf0a90a178ccd30c42d9da1cc5ef3d598c1fcc96dce50d8e6302fb9b35fc2a8ad0b178867b8d9c4748469a38ca6aeec9acb0 WHIRLPOOL 83fa722c6a4b3b917e02d4d01c4fc3037f07ac4e5d9baabeb81f872407c23cfc2e10e60de86d5b61fc0fb81949a3a80173f34ff33809b64c68a639a07e91dd16
|
||||
EBUILD calculate-install-3.2.9999.ebuild 683 SHA256 e355d430ae0b2a2103d5c959adf7fa57a23d4bfa17d77c2bd698114fe6c471ce SHA512 de416bd2be0d4928fc2934724abcd3fd168ba8a945bd680a61b990d01805f3dd22c1955bb819f271357fd12bccd91c25daa058b3c667deeceb255c5d713ff0c6 WHIRLPOOL dcfb7e979a63dad506743834f09b8192fbb5ddd637fde5a6890fa7412b453fa99b7d94f3229149061469ce1a541a1560f97de875aa61a9aa301d5fe97408876c
|
||||
|
@ -1,36 +0,0 @@
|
||||
# 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_alpha1
|
||||
!<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 )"
|
@ -1,36 +0,0 @@
|
||||
# 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_alpha2
|
||||
!<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 )"
|
@ -1,36 +0,0 @@
|
||||
# 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_alpha3
|
||||
!<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 )"
|
@ -1,44 +0,0 @@
|
||||
# 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"
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
# 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 )"
|
@ -1,36 +0,0 @@
|
||||
# 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_alpha5
|
||||
!<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 )"
|
@ -1,12 +0,0 @@
|
||||
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]
|
@ -1,36 +0,0 @@
|
||||
# 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="~amd64 ~x86"
|
||||
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.2.0_alpha1-r1.patch"
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# 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="~amd64 ~x86"
|
||||
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}"
|
@ -1,28 +0,0 @@
|
||||
# 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="amd64 x86"
|
||||
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}"
|
@ -1,28 +0,0 @@
|
||||
# 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="amd64 x86"
|
||||
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}"
|
@ -1,36 +0,0 @@
|
||||
# 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="amd64 x86"
|
||||
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.2.0_alpha4-r1.patch"
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
# 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="amd64 x86"
|
||||
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.2.0_alpha4-r2.patch"
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
# 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="amd64 x86"
|
||||
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.2.0_alpha4-r3.patch"
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
# 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="amd64 x86"
|
||||
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.2.0_alpha4-r4.patch"
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# 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="amd64 x86"
|
||||
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}"
|
@ -1,28 +0,0 @@
|
||||
# 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="amd64 x86"
|
||||
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}"
|
@ -1,27 +0,0 @@
|
||||
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||
index d5d7cdf..7363a50 100644
|
||||
--- calculate/lib/cl_template.py
|
||||
+++ calculate/lib/cl_template.py
|
||||
@@ -4956,7 +4956,12 @@ gettext -d cl_template "$*"
|
||||
if not crDirs is True:
|
||||
createdDirs += crDirs
|
||||
else:
|
||||
- os.chmod(applyDir, mode)
|
||||
+ try:
|
||||
+ os.chmod(applyDir, mode)
|
||||
+ except:
|
||||
+ self.setError(
|
||||
+ _("Failed to change mode for directory: ") +\
|
||||
+ applyDir)
|
||||
else:
|
||||
self.setError(_("Wrong value 'chmod' in the template") + ": " +\
|
||||
templateDirFile)
|
||||
@@ -5127,7 +5132,7 @@ gettext -d cl_template "$*"
|
||||
# Создание файла
|
||||
FD = open(nameFileConfig, "w")
|
||||
FD.close()
|
||||
- os.chown(nameFileConfig, uid, gid)
|
||||
+ os.lchown(nameFileConfig, uid, gid)
|
||||
except Exception as e:
|
||||
if hasattr(e,'errno') and e.errno == 13 and \
|
||||
"var/calculate/remote" in nameFileConfig:
|
@ -1,152 +0,0 @@
|
||||
diff --git calculate/lib/datavars.py calculate/lib/datavars.py
|
||||
index 1881294..3690083 100644
|
||||
--- calculate/lib/datavars.py
|
||||
+++ calculate/lib/datavars.py
|
||||
@@ -1017,9 +1017,10 @@ class DataVars(SimpleDataVars):
|
||||
"""
|
||||
if not self.iniCache:
|
||||
# get initialized section names
|
||||
- if os.path.exists('/etc/make.profile'):
|
||||
+ make_profile = self.Get('main.cl_make_profile')
|
||||
+ if os.path.exists(make_profile):
|
||||
profiles = [('profile',
|
||||
- path.join('/etc',os.readlink('/etc/make.profile')))]
|
||||
+ path.join('/etc',os.readlink(make_profile)))]
|
||||
else:
|
||||
profiles = []
|
||||
for iniName,iniFile in profiles+\
|
||||
diff --git calculate/lib/variables/env.py calculate/lib/variables/env.py
|
||||
index ab295ca..87d43cc 100644
|
||||
--- calculate/lib/variables/env.py
|
||||
+++ calculate/lib/variables/env.py
|
||||
@@ -414,6 +414,17 @@ class VariableClMakeProfile(Variable):
|
||||
"""
|
||||
Путь до актуального make.profile
|
||||
"""
|
||||
+ systemRoot = "/"
|
||||
+
|
||||
+ def get_work_link(self, *links):
|
||||
+ for link in links:
|
||||
+ if path.exists(link):
|
||||
+ return link
|
||||
+
|
||||
def get(self):
|
||||
- # TODO: заглушка, нужно учитывать /etc/portage/make.profile
|
||||
- return "/etc/make.profile"
|
||||
+ files = ["etc/portage/make.profile", "etc/make.profile"]
|
||||
+ val = self.get_work_link(
|
||||
+ *[path.join(self.systemRoot, x) for x in files])
|
||||
+ if not val:
|
||||
+ raise VariableError(_("Failed to detect system profile"))
|
||||
+ return val
|
||||
diff --git calculate/lib/variables/linux.py calculate/lib/variables/linux.py
|
||||
index 5d907f6..d49c773 100644
|
||||
--- calculate/lib/variables/linux.py
|
||||
+++ calculate/lib/variables/linux.py
|
||||
@@ -18,10 +18,10 @@ import os
|
||||
from os import path
|
||||
import re
|
||||
import platform
|
||||
-from calculate.lib.datavars import Variable,ReadonlyVariable,SimpleDataVars
|
||||
+from calculate.lib.datavars import Variable, SimpleDataVars
|
||||
from calculate.lib.utils.portage import isPkgInstalled
|
||||
-from calculate.lib.utils.files import countFiles,readFile
|
||||
-import calculate.lib.cl_template as cl_template
|
||||
+from calculate.lib.utils.files import readFile
|
||||
+from env import VariableClMakeProfile
|
||||
|
||||
class Linux:
|
||||
dictLinuxName = {"CLD":"Calculate Linux Desktop",
|
||||
@@ -51,7 +51,7 @@ class Linux:
|
||||
|
||||
def getShortnameByMakeprofile(self,systemroot):
|
||||
"""Get shortname by symlink of make.profile"""
|
||||
- makeprofile = path.join(systemroot,'etc/make.profile')
|
||||
+ makeprofile = self.Get('cl_make_profile')
|
||||
if path.exists(makeprofile):
|
||||
link = os.readlink(makeprofile)
|
||||
reMakeProfileLink = re.compile('/calculate/(desktop|server)/(%s)/'%
|
||||
@@ -78,11 +78,11 @@ class Linux:
|
||||
|
||||
def detectOtherShortname(self,systemroot):
|
||||
"""Detect other system. Now only Gentoo."""
|
||||
- gentooFile = path.join(systemroot,"etc/gentoo-release")
|
||||
+ gentooFile = path.join(systemroot, "etc/gentoo-release")
|
||||
if path.exists(gentooFile):
|
||||
return "Gentoo"
|
||||
- if all(map(lambda x:path.lexists(path.join(systemroot,x)),
|
||||
- ['bin','var','lib','etc'])):
|
||||
+ if all(map(lambda x: path.lexists(path.join(systemroot, x)),
|
||||
+ ['bin', 'var', 'lib', 'etc'])):
|
||||
return "Linux"
|
||||
return None
|
||||
|
||||
@@ -92,17 +92,17 @@ class Linux:
|
||||
"""
|
||||
overlayPath = 'var/lib/layman/calculate'
|
||||
releaseFile = 'profiles/calculate-release'
|
||||
- return readFile(path.join(systemroot,overlayPath,releaseFile))
|
||||
+ return readFile(path.join(systemroot, overlayPath, releaseFile))
|
||||
|
||||
def getVersionFromMetapackage(self,systemroot,shortname):
|
||||
"""Get version from meta package"""
|
||||
- for pkg in ("app-misc/calculate-meta","app-misc/%s-meta"%shortname):
|
||||
- calcMeta = isPkgInstalled(pkg,systemroot)
|
||||
+ for pkg in ("app-misc/calculate-meta", "app-misc/%s-meta" % shortname):
|
||||
+ calcMeta = isPkgInstalled(pkg, systemroot)
|
||||
if calcMeta:
|
||||
return calcMeta[0]['PV']
|
||||
return None
|
||||
|
||||
- def getVersionFromCalculateIni(self,systemroot):
|
||||
+ def getVersionFromCalculateIni(self, systemroot):
|
||||
"""Get version from calculate ini"""
|
||||
pathname = path.join(systemroot,
|
||||
'etc/calculate/calculate.ini')
|
||||
@@ -124,11 +124,9 @@ class Linux:
|
||||
def getVersionFromGentooFiles(self,systemroot):
|
||||
"""Get version from gentoo files"""
|
||||
gentooFile = path.join(systemroot,"etc/gentoo-release")
|
||||
- systemVersion = ""
|
||||
- flagGentoo = False
|
||||
reVer=re.compile("^(\d+\.)*\d+$",re.S)
|
||||
if path.exists(gentooFile):
|
||||
- gentooLink = path.join(systemroot,"etc/make.profile")
|
||||
+ gentooLink = self.Get('cl_make_profile')
|
||||
if path.islink(gentooLink):
|
||||
vers = filter(reVer.search,
|
||||
os.readlink(gentooLink).split('/'))
|
||||
@@ -227,9 +225,10 @@ class VariableOsLinuxFiles(Variable,Linux):
|
||||
|
||||
|
||||
class LinuxDataVars(SimpleDataVars):
|
||||
- def __init__(self,systemRoot="/"):
|
||||
+ def __init__(self, systemRoot="/"):
|
||||
self.systemRoot = systemRoot
|
||||
SimpleDataVars.__init__(self,
|
||||
+ VariableClMakeProfile(systemRoot=systemRoot),
|
||||
VariableOsLinuxShortname(systemRoot=systemRoot),
|
||||
VariableOsLinuxName(systemRoot=systemRoot),
|
||||
VariableOsLinuxSubname(systemRoot=systemRoot),
|
||||
@@ -238,14 +237,12 @@ class LinuxDataVars(SimpleDataVars):
|
||||
VariableOsLinuxSystem(systemRoot=systemRoot),
|
||||
VariableOsLinuxVer(systemRoot=systemRoot),
|
||||
VariableOsLinuxBuild(systemRoot=systemRoot))
|
||||
- makeprofile = path.join(systemRoot,'etc/make.profile')
|
||||
+ makeprofile = self.Get('cl_make_profile')
|
||||
if os.path.exists(makeprofile):
|
||||
- inifile = path.join(systemRoot,'etc',
|
||||
- os.readlink(path.join(systemRoot,'etc/make.profile')))
|
||||
+ inifile = path.join(systemRoot, 'etc',
|
||||
+ os.readlink(makeprofile))
|
||||
self.flIniFileFrom(inifile)
|
||||
- inifile = "etc/calculate/calculate.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,inifile))
|
||||
- iniFile = "etc/calculate/calculate3.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,iniFile))
|
||||
- iniFile = "etc/calculate/calculate2.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,iniFile))
|
||||
+ for inifile in ("etc/calculate/calculate.env",
|
||||
+ "etc/calculate/calculate3.env",
|
||||
+ "etc/calculate/calculate2.env"):
|
||||
+ self.flIniFileFrom(path.join(systemRoot, inifile))
|
@ -1,172 +0,0 @@
|
||||
diff --git calculate/lib/cl_progressbar.py calculate/lib/cl_progressbar.py
|
||||
index 36bb6c4..5734d28 100644
|
||||
--- calculate/lib/cl_progressbar.py
|
||||
+++ calculate/lib/cl_progressbar.py
|
||||
@@ -110,6 +110,7 @@ try:
|
||||
|
||||
def __init__(self):
|
||||
self.outQueue = Queue()
|
||||
+ self.finished = False
|
||||
self.inQueue = Queue()
|
||||
Process(target=self.runProgress,
|
||||
args=(self.outQueue,self.inQueue)).start()
|
||||
@@ -127,6 +128,7 @@ try:
|
||||
|
||||
def quit(self):
|
||||
self.outQueue.put(("quit",(),False))
|
||||
+ self.finished = True
|
||||
self.outQueue.close()
|
||||
self.inQueue.close()
|
||||
except:
|
||||
diff --git calculate/lib/datavars.py calculate/lib/datavars.py
|
||||
index 1881294..3690083 100644
|
||||
--- calculate/lib/datavars.py
|
||||
+++ calculate/lib/datavars.py
|
||||
@@ -1017,9 +1017,10 @@ class DataVars(SimpleDataVars):
|
||||
"""
|
||||
if not self.iniCache:
|
||||
# get initialized section names
|
||||
- if os.path.exists('/etc/make.profile'):
|
||||
+ make_profile = self.Get('main.cl_make_profile')
|
||||
+ if os.path.exists(make_profile):
|
||||
profiles = [('profile',
|
||||
- path.join('/etc',os.readlink('/etc/make.profile')))]
|
||||
+ path.join('/etc',os.readlink(make_profile)))]
|
||||
else:
|
||||
profiles = []
|
||||
for iniName,iniFile in profiles+\
|
||||
diff --git calculate/lib/variables/env.py calculate/lib/variables/env.py
|
||||
index ab295ca..87d43cc 100644
|
||||
--- calculate/lib/variables/env.py
|
||||
+++ calculate/lib/variables/env.py
|
||||
@@ -414,6 +414,17 @@ class VariableClMakeProfile(Variable):
|
||||
"""
|
||||
Путь до актуального make.profile
|
||||
"""
|
||||
+ systemRoot = "/"
|
||||
+
|
||||
+ def get_work_link(self, *links):
|
||||
+ for link in links:
|
||||
+ if path.exists(link):
|
||||
+ return link
|
||||
+
|
||||
def get(self):
|
||||
- # TODO: заглушка, нужно учитывать /etc/portage/make.profile
|
||||
- return "/etc/make.profile"
|
||||
+ files = ["etc/portage/make.profile", "etc/make.profile"]
|
||||
+ val = self.get_work_link(
|
||||
+ *[path.join(self.systemRoot, x) for x in files])
|
||||
+ if not val:
|
||||
+ raise VariableError(_("Failed to detect system profile"))
|
||||
+ return val
|
||||
diff --git calculate/lib/variables/linux.py calculate/lib/variables/linux.py
|
||||
index 5d907f6..d49c773 100644
|
||||
--- calculate/lib/variables/linux.py
|
||||
+++ calculate/lib/variables/linux.py
|
||||
@@ -18,10 +18,10 @@ import os
|
||||
from os import path
|
||||
import re
|
||||
import platform
|
||||
-from calculate.lib.datavars import Variable,ReadonlyVariable,SimpleDataVars
|
||||
+from calculate.lib.datavars import Variable, SimpleDataVars
|
||||
from calculate.lib.utils.portage import isPkgInstalled
|
||||
-from calculate.lib.utils.files import countFiles,readFile
|
||||
-import calculate.lib.cl_template as cl_template
|
||||
+from calculate.lib.utils.files import readFile
|
||||
+from env import VariableClMakeProfile
|
||||
|
||||
class Linux:
|
||||
dictLinuxName = {"CLD":"Calculate Linux Desktop",
|
||||
@@ -51,7 +51,7 @@ class Linux:
|
||||
|
||||
def getShortnameByMakeprofile(self,systemroot):
|
||||
"""Get shortname by symlink of make.profile"""
|
||||
- makeprofile = path.join(systemroot,'etc/make.profile')
|
||||
+ makeprofile = self.Get('cl_make_profile')
|
||||
if path.exists(makeprofile):
|
||||
link = os.readlink(makeprofile)
|
||||
reMakeProfileLink = re.compile('/calculate/(desktop|server)/(%s)/'%
|
||||
@@ -78,11 +78,11 @@ class Linux:
|
||||
|
||||
def detectOtherShortname(self,systemroot):
|
||||
"""Detect other system. Now only Gentoo."""
|
||||
- gentooFile = path.join(systemroot,"etc/gentoo-release")
|
||||
+ gentooFile = path.join(systemroot, "etc/gentoo-release")
|
||||
if path.exists(gentooFile):
|
||||
return "Gentoo"
|
||||
- if all(map(lambda x:path.lexists(path.join(systemroot,x)),
|
||||
- ['bin','var','lib','etc'])):
|
||||
+ if all(map(lambda x: path.lexists(path.join(systemroot, x)),
|
||||
+ ['bin', 'var', 'lib', 'etc'])):
|
||||
return "Linux"
|
||||
return None
|
||||
|
||||
@@ -92,17 +92,17 @@ class Linux:
|
||||
"""
|
||||
overlayPath = 'var/lib/layman/calculate'
|
||||
releaseFile = 'profiles/calculate-release'
|
||||
- return readFile(path.join(systemroot,overlayPath,releaseFile))
|
||||
+ return readFile(path.join(systemroot, overlayPath, releaseFile))
|
||||
|
||||
def getVersionFromMetapackage(self,systemroot,shortname):
|
||||
"""Get version from meta package"""
|
||||
- for pkg in ("app-misc/calculate-meta","app-misc/%s-meta"%shortname):
|
||||
- calcMeta = isPkgInstalled(pkg,systemroot)
|
||||
+ for pkg in ("app-misc/calculate-meta", "app-misc/%s-meta" % shortname):
|
||||
+ calcMeta = isPkgInstalled(pkg, systemroot)
|
||||
if calcMeta:
|
||||
return calcMeta[0]['PV']
|
||||
return None
|
||||
|
||||
- def getVersionFromCalculateIni(self,systemroot):
|
||||
+ def getVersionFromCalculateIni(self, systemroot):
|
||||
"""Get version from calculate ini"""
|
||||
pathname = path.join(systemroot,
|
||||
'etc/calculate/calculate.ini')
|
||||
@@ -124,11 +124,9 @@ class Linux:
|
||||
def getVersionFromGentooFiles(self,systemroot):
|
||||
"""Get version from gentoo files"""
|
||||
gentooFile = path.join(systemroot,"etc/gentoo-release")
|
||||
- systemVersion = ""
|
||||
- flagGentoo = False
|
||||
reVer=re.compile("^(\d+\.)*\d+$",re.S)
|
||||
if path.exists(gentooFile):
|
||||
- gentooLink = path.join(systemroot,"etc/make.profile")
|
||||
+ gentooLink = self.Get('cl_make_profile')
|
||||
if path.islink(gentooLink):
|
||||
vers = filter(reVer.search,
|
||||
os.readlink(gentooLink).split('/'))
|
||||
@@ -227,9 +225,10 @@ class VariableOsLinuxFiles(Variable,Linux):
|
||||
|
||||
|
||||
class LinuxDataVars(SimpleDataVars):
|
||||
- def __init__(self,systemRoot="/"):
|
||||
+ def __init__(self, systemRoot="/"):
|
||||
self.systemRoot = systemRoot
|
||||
SimpleDataVars.__init__(self,
|
||||
+ VariableClMakeProfile(systemRoot=systemRoot),
|
||||
VariableOsLinuxShortname(systemRoot=systemRoot),
|
||||
VariableOsLinuxName(systemRoot=systemRoot),
|
||||
VariableOsLinuxSubname(systemRoot=systemRoot),
|
||||
@@ -238,14 +237,12 @@ class LinuxDataVars(SimpleDataVars):
|
||||
VariableOsLinuxSystem(systemRoot=systemRoot),
|
||||
VariableOsLinuxVer(systemRoot=systemRoot),
|
||||
VariableOsLinuxBuild(systemRoot=systemRoot))
|
||||
- makeprofile = path.join(systemRoot,'etc/make.profile')
|
||||
+ makeprofile = self.Get('cl_make_profile')
|
||||
if os.path.exists(makeprofile):
|
||||
- inifile = path.join(systemRoot,'etc',
|
||||
- os.readlink(path.join(systemRoot,'etc/make.profile')))
|
||||
+ inifile = path.join(systemRoot, 'etc',
|
||||
+ os.readlink(makeprofile))
|
||||
self.flIniFileFrom(inifile)
|
||||
- inifile = "etc/calculate/calculate.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,inifile))
|
||||
- iniFile = "etc/calculate/calculate3.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,iniFile))
|
||||
- iniFile = "etc/calculate/calculate2.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,iniFile))
|
||||
+ for inifile in ("etc/calculate/calculate.env",
|
||||
+ "etc/calculate/calculate3.env",
|
||||
+ "etc/calculate/calculate2.env"):
|
||||
+ self.flIniFileFrom(path.join(systemRoot, inifile))
|
@ -1,188 +0,0 @@
|
||||
diff --git calculate/lib/cl_progressbar.py calculate/lib/cl_progressbar.py
|
||||
index 36bb6c4..5734d28 100644
|
||||
--- calculate/lib/cl_progressbar.py
|
||||
+++ calculate/lib/cl_progressbar.py
|
||||
@@ -110,6 +110,7 @@ try:
|
||||
|
||||
def __init__(self):
|
||||
self.outQueue = Queue()
|
||||
+ self.finished = False
|
||||
self.inQueue = Queue()
|
||||
Process(target=self.runProgress,
|
||||
args=(self.outQueue,self.inQueue)).start()
|
||||
@@ -127,6 +128,7 @@ try:
|
||||
|
||||
def quit(self):
|
||||
self.outQueue.put(("quit",(),False))
|
||||
+ self.finished = True
|
||||
self.outQueue.close()
|
||||
self.inQueue.close()
|
||||
except:
|
||||
diff --git calculate/lib/datavars.py calculate/lib/datavars.py
|
||||
index 1881294..3690083 100644
|
||||
--- calculate/lib/datavars.py
|
||||
+++ calculate/lib/datavars.py
|
||||
@@ -1017,9 +1017,10 @@ class DataVars(SimpleDataVars):
|
||||
"""
|
||||
if not self.iniCache:
|
||||
# get initialized section names
|
||||
- if os.path.exists('/etc/make.profile'):
|
||||
+ make_profile = self.Get('main.cl_make_profile')
|
||||
+ if os.path.exists(make_profile):
|
||||
profiles = [('profile',
|
||||
- path.join('/etc',os.readlink('/etc/make.profile')))]
|
||||
+ path.join('/etc',os.readlink(make_profile)))]
|
||||
else:
|
||||
profiles = []
|
||||
for iniName,iniFile in profiles+\
|
||||
diff --git calculate/lib/utils/colortext/printing.py calculate/lib/utils/colortext/printing.py
|
||||
index 147d1d7..75227ee 100644
|
||||
--- calculate/lib/utils/colortext/printing.py
|
||||
+++ calculate/lib/utils/colortext/printing.py
|
||||
@@ -32,6 +32,11 @@ class Print(object):
|
||||
self.buffer.append(self.output.setBold())
|
||||
return self
|
||||
|
||||
+ @property
|
||||
+ def underline(self):
|
||||
+ self.buffer.append(self.output.setUnderline())
|
||||
+ return self
|
||||
+
|
||||
def foreground(self, color):
|
||||
self.buffer.append(self.output.setForeground(color))
|
||||
return self
|
||||
diff --git calculate/lib/variables/env.py calculate/lib/variables/env.py
|
||||
index ab295ca..87d43cc 100644
|
||||
--- calculate/lib/variables/env.py
|
||||
+++ calculate/lib/variables/env.py
|
||||
@@ -414,6 +414,17 @@ class VariableClMakeProfile(Variable):
|
||||
"""
|
||||
Путь до актуального make.profile
|
||||
"""
|
||||
+ systemRoot = "/"
|
||||
+
|
||||
+ def get_work_link(self, *links):
|
||||
+ for link in links:
|
||||
+ if path.exists(link):
|
||||
+ return link
|
||||
+
|
||||
def get(self):
|
||||
- # TODO: заглушка, нужно учитывать /etc/portage/make.profile
|
||||
- return "/etc/make.profile"
|
||||
+ files = ["etc/portage/make.profile", "etc/make.profile"]
|
||||
+ val = self.get_work_link(
|
||||
+ *[path.join(self.systemRoot, x) for x in files])
|
||||
+ if not val:
|
||||
+ raise VariableError(_("Failed to detect system profile"))
|
||||
+ return val
|
||||
diff --git calculate/lib/variables/linux.py calculate/lib/variables/linux.py
|
||||
index 5d907f6..d49c773 100644
|
||||
--- calculate/lib/variables/linux.py
|
||||
+++ calculate/lib/variables/linux.py
|
||||
@@ -18,10 +18,10 @@ import os
|
||||
from os import path
|
||||
import re
|
||||
import platform
|
||||
-from calculate.lib.datavars import Variable,ReadonlyVariable,SimpleDataVars
|
||||
+from calculate.lib.datavars import Variable, SimpleDataVars
|
||||
from calculate.lib.utils.portage import isPkgInstalled
|
||||
-from calculate.lib.utils.files import countFiles,readFile
|
||||
-import calculate.lib.cl_template as cl_template
|
||||
+from calculate.lib.utils.files import readFile
|
||||
+from env import VariableClMakeProfile
|
||||
|
||||
class Linux:
|
||||
dictLinuxName = {"CLD":"Calculate Linux Desktop",
|
||||
@@ -51,7 +51,7 @@ class Linux:
|
||||
|
||||
def getShortnameByMakeprofile(self,systemroot):
|
||||
"""Get shortname by symlink of make.profile"""
|
||||
- makeprofile = path.join(systemroot,'etc/make.profile')
|
||||
+ makeprofile = self.Get('cl_make_profile')
|
||||
if path.exists(makeprofile):
|
||||
link = os.readlink(makeprofile)
|
||||
reMakeProfileLink = re.compile('/calculate/(desktop|server)/(%s)/'%
|
||||
@@ -78,11 +78,11 @@ class Linux:
|
||||
|
||||
def detectOtherShortname(self,systemroot):
|
||||
"""Detect other system. Now only Gentoo."""
|
||||
- gentooFile = path.join(systemroot,"etc/gentoo-release")
|
||||
+ gentooFile = path.join(systemroot, "etc/gentoo-release")
|
||||
if path.exists(gentooFile):
|
||||
return "Gentoo"
|
||||
- if all(map(lambda x:path.lexists(path.join(systemroot,x)),
|
||||
- ['bin','var','lib','etc'])):
|
||||
+ if all(map(lambda x: path.lexists(path.join(systemroot, x)),
|
||||
+ ['bin', 'var', 'lib', 'etc'])):
|
||||
return "Linux"
|
||||
return None
|
||||
|
||||
@@ -92,17 +92,17 @@ class Linux:
|
||||
"""
|
||||
overlayPath = 'var/lib/layman/calculate'
|
||||
releaseFile = 'profiles/calculate-release'
|
||||
- return readFile(path.join(systemroot,overlayPath,releaseFile))
|
||||
+ return readFile(path.join(systemroot, overlayPath, releaseFile))
|
||||
|
||||
def getVersionFromMetapackage(self,systemroot,shortname):
|
||||
"""Get version from meta package"""
|
||||
- for pkg in ("app-misc/calculate-meta","app-misc/%s-meta"%shortname):
|
||||
- calcMeta = isPkgInstalled(pkg,systemroot)
|
||||
+ for pkg in ("app-misc/calculate-meta", "app-misc/%s-meta" % shortname):
|
||||
+ calcMeta = isPkgInstalled(pkg, systemroot)
|
||||
if calcMeta:
|
||||
return calcMeta[0]['PV']
|
||||
return None
|
||||
|
||||
- def getVersionFromCalculateIni(self,systemroot):
|
||||
+ def getVersionFromCalculateIni(self, systemroot):
|
||||
"""Get version from calculate ini"""
|
||||
pathname = path.join(systemroot,
|
||||
'etc/calculate/calculate.ini')
|
||||
@@ -124,11 +124,9 @@ class Linux:
|
||||
def getVersionFromGentooFiles(self,systemroot):
|
||||
"""Get version from gentoo files"""
|
||||
gentooFile = path.join(systemroot,"etc/gentoo-release")
|
||||
- systemVersion = ""
|
||||
- flagGentoo = False
|
||||
reVer=re.compile("^(\d+\.)*\d+$",re.S)
|
||||
if path.exists(gentooFile):
|
||||
- gentooLink = path.join(systemroot,"etc/make.profile")
|
||||
+ gentooLink = self.Get('cl_make_profile')
|
||||
if path.islink(gentooLink):
|
||||
vers = filter(reVer.search,
|
||||
os.readlink(gentooLink).split('/'))
|
||||
@@ -227,9 +225,10 @@ class VariableOsLinuxFiles(Variable,Linux):
|
||||
|
||||
|
||||
class LinuxDataVars(SimpleDataVars):
|
||||
- def __init__(self,systemRoot="/"):
|
||||
+ def __init__(self, systemRoot="/"):
|
||||
self.systemRoot = systemRoot
|
||||
SimpleDataVars.__init__(self,
|
||||
+ VariableClMakeProfile(systemRoot=systemRoot),
|
||||
VariableOsLinuxShortname(systemRoot=systemRoot),
|
||||
VariableOsLinuxName(systemRoot=systemRoot),
|
||||
VariableOsLinuxSubname(systemRoot=systemRoot),
|
||||
@@ -238,14 +237,12 @@ class LinuxDataVars(SimpleDataVars):
|
||||
VariableOsLinuxSystem(systemRoot=systemRoot),
|
||||
VariableOsLinuxVer(systemRoot=systemRoot),
|
||||
VariableOsLinuxBuild(systemRoot=systemRoot))
|
||||
- makeprofile = path.join(systemRoot,'etc/make.profile')
|
||||
+ makeprofile = self.Get('cl_make_profile')
|
||||
if os.path.exists(makeprofile):
|
||||
- inifile = path.join(systemRoot,'etc',
|
||||
- os.readlink(path.join(systemRoot,'etc/make.profile')))
|
||||
+ inifile = path.join(systemRoot, 'etc',
|
||||
+ os.readlink(makeprofile))
|
||||
self.flIniFileFrom(inifile)
|
||||
- inifile = "etc/calculate/calculate.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,inifile))
|
||||
- iniFile = "etc/calculate/calculate3.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,iniFile))
|
||||
- iniFile = "etc/calculate/calculate2.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,iniFile))
|
||||
+ for inifile in ("etc/calculate/calculate.env",
|
||||
+ "etc/calculate/calculate3.env",
|
||||
+ "etc/calculate/calculate2.env"):
|
||||
+ self.flIniFileFrom(path.join(systemRoot, inifile))
|
@ -1,201 +0,0 @@
|
||||
diff --git calculate/lib/cl_progressbar.py calculate/lib/cl_progressbar.py
|
||||
index 36bb6c4..5734d28 100644
|
||||
--- calculate/lib/cl_progressbar.py
|
||||
+++ calculate/lib/cl_progressbar.py
|
||||
@@ -110,6 +110,7 @@ try:
|
||||
|
||||
def __init__(self):
|
||||
self.outQueue = Queue()
|
||||
+ self.finished = False
|
||||
self.inQueue = Queue()
|
||||
Process(target=self.runProgress,
|
||||
args=(self.outQueue,self.inQueue)).start()
|
||||
@@ -127,6 +128,7 @@ try:
|
||||
|
||||
def quit(self):
|
||||
self.outQueue.put(("quit",(),False))
|
||||
+ self.finished = True
|
||||
self.outQueue.close()
|
||||
self.inQueue.close()
|
||||
except:
|
||||
diff --git calculate/lib/datavars.py calculate/lib/datavars.py
|
||||
index 1881294..b5f2d33 100644
|
||||
--- calculate/lib/datavars.py
|
||||
+++ calculate/lib/datavars.py
|
||||
@@ -48,6 +48,9 @@ def itemgetter(*args,**kwargs):
|
||||
return lambda x:(x[args[0]],)
|
||||
return operator.itemgetter(*args)
|
||||
|
||||
+class CriticalError(Exception):
|
||||
+ """Critical error"""
|
||||
+
|
||||
class DataVarsError(Exception):
|
||||
"""Exception of getting variable values"""
|
||||
|
||||
@@ -1017,9 +1020,13 @@ class DataVars(SimpleDataVars):
|
||||
"""
|
||||
if not self.iniCache:
|
||||
# get initialized section names
|
||||
- if os.path.exists('/etc/make.profile'):
|
||||
+ try:
|
||||
+ make_profile = self.Get('main.cl_make_profile')
|
||||
+ except VariableError as e:
|
||||
+ raise CriticalError(str(e))
|
||||
+ if os.path.exists(make_profile):
|
||||
profiles = [('profile',
|
||||
- path.join('/etc',os.readlink('/etc/make.profile')))]
|
||||
+ path.join('/etc',os.readlink(make_profile)))]
|
||||
else:
|
||||
profiles = []
|
||||
for iniName,iniFile in profiles+\
|
||||
diff --git calculate/lib/utils/colortext/printing.py calculate/lib/utils/colortext/printing.py
|
||||
index 147d1d7..75227ee 100644
|
||||
--- calculate/lib/utils/colortext/printing.py
|
||||
+++ calculate/lib/utils/colortext/printing.py
|
||||
@@ -32,6 +32,11 @@ class Print(object):
|
||||
self.buffer.append(self.output.setBold())
|
||||
return self
|
||||
|
||||
+ @property
|
||||
+ def underline(self):
|
||||
+ self.buffer.append(self.output.setUnderline())
|
||||
+ return self
|
||||
+
|
||||
def foreground(self, color):
|
||||
self.buffer.append(self.output.setForeground(color))
|
||||
return self
|
||||
diff --git calculate/lib/variables/env.py calculate/lib/variables/env.py
|
||||
index ab295ca..87d43cc 100644
|
||||
--- calculate/lib/variables/env.py
|
||||
+++ calculate/lib/variables/env.py
|
||||
@@ -414,6 +414,17 @@ class VariableClMakeProfile(Variable):
|
||||
"""
|
||||
Путь до актуального make.profile
|
||||
"""
|
||||
+ systemRoot = "/"
|
||||
+
|
||||
+ def get_work_link(self, *links):
|
||||
+ for link in links:
|
||||
+ if path.exists(link):
|
||||
+ return link
|
||||
+
|
||||
def get(self):
|
||||
- # TODO: заглушка, нужно учитывать /etc/portage/make.profile
|
||||
- return "/etc/make.profile"
|
||||
+ files = ["etc/portage/make.profile", "etc/make.profile"]
|
||||
+ val = self.get_work_link(
|
||||
+ *[path.join(self.systemRoot, x) for x in files])
|
||||
+ if not val:
|
||||
+ raise VariableError(_("Failed to detect system profile"))
|
||||
+ return val
|
||||
diff --git calculate/lib/variables/linux.py calculate/lib/variables/linux.py
|
||||
index 5d907f6..d49c773 100644
|
||||
--- calculate/lib/variables/linux.py
|
||||
+++ calculate/lib/variables/linux.py
|
||||
@@ -18,10 +18,10 @@ import os
|
||||
from os import path
|
||||
import re
|
||||
import platform
|
||||
-from calculate.lib.datavars import Variable,ReadonlyVariable,SimpleDataVars
|
||||
+from calculate.lib.datavars import Variable, SimpleDataVars
|
||||
from calculate.lib.utils.portage import isPkgInstalled
|
||||
-from calculate.lib.utils.files import countFiles,readFile
|
||||
-import calculate.lib.cl_template as cl_template
|
||||
+from calculate.lib.utils.files import readFile
|
||||
+from env import VariableClMakeProfile
|
||||
|
||||
class Linux:
|
||||
dictLinuxName = {"CLD":"Calculate Linux Desktop",
|
||||
@@ -51,7 +51,7 @@ class Linux:
|
||||
|
||||
def getShortnameByMakeprofile(self,systemroot):
|
||||
"""Get shortname by symlink of make.profile"""
|
||||
- makeprofile = path.join(systemroot,'etc/make.profile')
|
||||
+ makeprofile = self.Get('cl_make_profile')
|
||||
if path.exists(makeprofile):
|
||||
link = os.readlink(makeprofile)
|
||||
reMakeProfileLink = re.compile('/calculate/(desktop|server)/(%s)/'%
|
||||
@@ -78,11 +78,11 @@ class Linux:
|
||||
|
||||
def detectOtherShortname(self,systemroot):
|
||||
"""Detect other system. Now only Gentoo."""
|
||||
- gentooFile = path.join(systemroot,"etc/gentoo-release")
|
||||
+ gentooFile = path.join(systemroot, "etc/gentoo-release")
|
||||
if path.exists(gentooFile):
|
||||
return "Gentoo"
|
||||
- if all(map(lambda x:path.lexists(path.join(systemroot,x)),
|
||||
- ['bin','var','lib','etc'])):
|
||||
+ if all(map(lambda x: path.lexists(path.join(systemroot, x)),
|
||||
+ ['bin', 'var', 'lib', 'etc'])):
|
||||
return "Linux"
|
||||
return None
|
||||
|
||||
@@ -92,17 +92,17 @@ class Linux:
|
||||
"""
|
||||
overlayPath = 'var/lib/layman/calculate'
|
||||
releaseFile = 'profiles/calculate-release'
|
||||
- return readFile(path.join(systemroot,overlayPath,releaseFile))
|
||||
+ return readFile(path.join(systemroot, overlayPath, releaseFile))
|
||||
|
||||
def getVersionFromMetapackage(self,systemroot,shortname):
|
||||
"""Get version from meta package"""
|
||||
- for pkg in ("app-misc/calculate-meta","app-misc/%s-meta"%shortname):
|
||||
- calcMeta = isPkgInstalled(pkg,systemroot)
|
||||
+ for pkg in ("app-misc/calculate-meta", "app-misc/%s-meta" % shortname):
|
||||
+ calcMeta = isPkgInstalled(pkg, systemroot)
|
||||
if calcMeta:
|
||||
return calcMeta[0]['PV']
|
||||
return None
|
||||
|
||||
- def getVersionFromCalculateIni(self,systemroot):
|
||||
+ def getVersionFromCalculateIni(self, systemroot):
|
||||
"""Get version from calculate ini"""
|
||||
pathname = path.join(systemroot,
|
||||
'etc/calculate/calculate.ini')
|
||||
@@ -124,11 +124,9 @@ class Linux:
|
||||
def getVersionFromGentooFiles(self,systemroot):
|
||||
"""Get version from gentoo files"""
|
||||
gentooFile = path.join(systemroot,"etc/gentoo-release")
|
||||
- systemVersion = ""
|
||||
- flagGentoo = False
|
||||
reVer=re.compile("^(\d+\.)*\d+$",re.S)
|
||||
if path.exists(gentooFile):
|
||||
- gentooLink = path.join(systemroot,"etc/make.profile")
|
||||
+ gentooLink = self.Get('cl_make_profile')
|
||||
if path.islink(gentooLink):
|
||||
vers = filter(reVer.search,
|
||||
os.readlink(gentooLink).split('/'))
|
||||
@@ -227,9 +225,10 @@ class VariableOsLinuxFiles(Variable,Linux):
|
||||
|
||||
|
||||
class LinuxDataVars(SimpleDataVars):
|
||||
- def __init__(self,systemRoot="/"):
|
||||
+ def __init__(self, systemRoot="/"):
|
||||
self.systemRoot = systemRoot
|
||||
SimpleDataVars.__init__(self,
|
||||
+ VariableClMakeProfile(systemRoot=systemRoot),
|
||||
VariableOsLinuxShortname(systemRoot=systemRoot),
|
||||
VariableOsLinuxName(systemRoot=systemRoot),
|
||||
VariableOsLinuxSubname(systemRoot=systemRoot),
|
||||
@@ -238,14 +237,12 @@ class LinuxDataVars(SimpleDataVars):
|
||||
VariableOsLinuxSystem(systemRoot=systemRoot),
|
||||
VariableOsLinuxVer(systemRoot=systemRoot),
|
||||
VariableOsLinuxBuild(systemRoot=systemRoot))
|
||||
- makeprofile = path.join(systemRoot,'etc/make.profile')
|
||||
+ makeprofile = self.Get('cl_make_profile')
|
||||
if os.path.exists(makeprofile):
|
||||
- inifile = path.join(systemRoot,'etc',
|
||||
- os.readlink(path.join(systemRoot,'etc/make.profile')))
|
||||
+ inifile = path.join(systemRoot, 'etc',
|
||||
+ os.readlink(makeprofile))
|
||||
self.flIniFileFrom(inifile)
|
||||
- inifile = "etc/calculate/calculate.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,inifile))
|
||||
- iniFile = "etc/calculate/calculate3.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,iniFile))
|
||||
- iniFile = "etc/calculate/calculate2.env"
|
||||
- self.flIniFileFrom(path.join(systemRoot,iniFile))
|
||||
+ for inifile in ("etc/calculate/calculate.env",
|
||||
+ "etc/calculate/calculate3.env",
|
||||
+ "etc/calculate/calculate2.env"):
|
||||
+ self.flIniFileFrom(path.join(systemRoot, inifile))
|
@ -1,35 +1,5 @@
|
||||
AUX calculate-update-3.2.0_alpha1-r1.patch 683 SHA256 39edbee7b73bbb34d31ce88170e5624c956f99f2535346ae4572f5b293610485 SHA512 6a9f5dd2f66fe7cbd21073b676a29ae8bb8a5884822d2ddc99321637f4475aa1ed8eda10a7ee80b7bcab4bb711bc1d2d0d44f526ee300a0fda4e2a25c0ffafb3 WHIRLPOOL 3cceb6d5a53126d7cb14ca412b48985ed235f1de898e7e304fbb12b21deaa2c0934554b121fa165f2be1ec18443279c103d99f3f5e53c07d343da291132cb0f5
|
||||
AUX calculate-update-3.2.0_alpha3-r1.patch 1506 SHA256 e02436a3f56d49eb96f4c3e9e53450dd93943d23ba4ff8b5d1b7332bc3fb03df SHA512 f237e2d3f72e236293d5e6eb4887be41a314ea0a16d5a4d29fe6179d957598743dc3e28e665c7ecdff66d2f8973dbeb7c9fc7c07a0da93db576446b2d8aefcbf WHIRLPOOL a7ac88f77218fbde7f8a2b50f60fbb647143b6c58f15cb376d163e885ce72fc24086f408eacb04fb1eda582ca6bba039b677c8532334fc95d642f4f20cac27e6
|
||||
AUX calculate-update-3.2.0_alpha3-r2.patch 1651 SHA256 2d8bc30666b5327d8212bac7262ba3d518a5e401600046bc85dd52531686bbbb SHA512 0193ea7a3b88bb77bfdadddb3c6bf84561aa54b0edcee7492d745326637df138ca86f611cd4459e125eec68fa73616e1093d37ece508e2ef1a9b3b0ef34b196f WHIRLPOOL 29d3cd3790a2085a060ecc964a45d65a13ef8fa0ac21d12b005d66ce160e0edc0ae75b8277bd459a60a10b8e4d764cfcdae108d7bee543d80426c3c819534041
|
||||
AUX calculate-update-3.2.0_alpha4-r1.patch 2410 SHA256 5e69ded9db0e676d142674e53dc5b84d90120e58474fdd43a27b7024f4888a92 SHA512 51ee3eb4fe96cfbf44c9f706a0eaca34b732bf54f865d3ef6d36d24c56ad9b01f2d3b43201e058acc800cfa8ed2171aa2266469647492109d495cd3db6cff04f WHIRLPOOL d381f59f2a8f1a4fbf9d6f390b28cf43b7e124c3062cc90e85eff40bc3470b39a169b8e7ff94d07049c6a2ef18d83622dab2c8b7c8b8906e53d644f2349a1a79
|
||||
AUX calculate-update-3.2.0_alpha4-r2.patch 6582 SHA256 57e9b6f162ca9f1c1e9295cc4dbbb9410617d9f2a04ed528189ace9e72e27bf8 SHA512 3d39899a85386bc223023fd60ddbacc9823d15f5319c379d4f1b71a1ef930f9ac375dbd527599cdecc9c4f54435afffe63a9e223a0f18b3683d6f3818c6e637d WHIRLPOOL 96fe4a57bf47a866f8be4365bc9ae1b06525e34076a0a6a2c04e96d7558b79302c7b14e62044b8fa305a5b4c3108795b5fe2ab700c221fbe922635ac25d20b48
|
||||
AUX calculate-update-3.2.0_alpha4-r3.patch 6988 SHA256 148483a99fa374a3f0e75fbc9ea5cd024171fc9ef973fa200bbcb8d997f71935 SHA512 0c79191712b2cb1aa1c2a3f3cdd4a4d9ae144ae5c1749707cc4dcf6fadbdbe638436136698228c979338ab365d4b7c54d17151697ad844af9ecc697f484853e5 WHIRLPOOL 4be6ce6f917065702052bbbd97ae9ee67afc59a2a1554772e163a5a40f525f33667db2754e4a1358b3f75de0373946a07a448079674806d703121002dca7c38b
|
||||
AUX calculate-update-3.2.0_alpha4-r4.patch 19180 SHA256 7e01cd3e5c02f7490fc11f301f8a5a2dd52ea6901918dab580429139ac9ea024 SHA512 72ceb57d48e9ca17646fef56f785adbe929007664d569b8c27e15dd4433a7dbc94e8942a18af333bb8a319fe50d2c4329c2c8fdebd0c9774923fcba9df694aa0 WHIRLPOOL ef0d5bf3161a4450a5f240ddeef502fab0bdb605d1f8d3852f99dfd8db893e74d5ba000252adb1af398609b421c22d6a37e76719d43dd8bda79f5c5535eb879b
|
||||
AUX calculate-update-3.2.0_alpha5-r1.patch 488 SHA256 dc3ef84b48f1b4d9ff57263c4d6f45f0b3752f79b0afc8feb8a527cc16e1a5a9 SHA512 0bd80a9e2d9b54a0f5f11809a85645c22afc2094086004a7375212e5edde089799fab3e5bcd250a0609725741d0ecc3c6c90a83940161a924011d217ae3c5ff1 WHIRLPOOL 0d78cb993d7567629a819d08042ffcfd1f7a3e66e0532fcb717b48f29a73d7132e73fbebfbaef646125ded98ea2ac035309a49b5f45af3a72a4e59008351e183
|
||||
AUX calculate-update-3.2.0_alpha5-r2.patch 2649 SHA256 537d81d1352453f0f11fca1fa3558b11c4bca96167e97ace04bfab1689133bdb SHA512 fde7a804943ff48765746b6d5fd1960850c717ce2289c43568af84cfe3d9934d4a7c0f1d92c469b99bcfff478297dbd2716353e93fd1d1e25939d1ca6a9e6723 WHIRLPOOL 17cccb453c8e3ff3d42548c02b5ddf849a9bfd456db7e68773bb10235dccb235a0e74125b7b95946146d5fe103010cb7b10180328bf582c314965e0ca40e9bc6
|
||||
AUX calculate-update-3.2.0_alpha5-r3.patch 6639 SHA256 2b8630488a45370248538436d67ba948f4b36921192cebd8d83ef2666b2df5b6 SHA512 5e432a94fcf96e2456cc5935d66fab10befb51961b1a44d61a91e3f339723dc269cd48b8e1635d4574c12bcf9061e66d28df13b180a1b20147edb1091fc22061 WHIRLPOOL 271e1597ac7f82f6887e1eff30a68659662288d742ad97b56ee14afe96a23078fffbe38a2ceeee63c09dfde6c922f7e96d3bd333139b4bf7914a982f7c6eeb0c
|
||||
DIST calculate-update-3.2.0_alpha1.tar.bz2 14159 SHA256 6c5e73041029e93f04fe897447984c1f52f66f3486309d4e3bb741c0151dc44d SHA512 aac77b42e51f3be5f266bc3a7c233d2fa443b6316a7a618c61ef07be8e25704322bec6c39352184ee8fae227e4b2bbf276dfa038d4006be12079c71e983d16d4 WHIRLPOOL 8f395718c3332286ce47783fc42601f3dea9b9f7fd7225e5549ff8d04013a4d6a2208f103fde112b6ebf6791650a61aa5974dbfa435aecfd7d8e7b2d7ff9ae8b
|
||||
DIST calculate-update-3.2.0_alpha2.tar.bz2 24294 SHA256 b626f371db8def2823f5f2a5081122a0746a9dae5f04bb1e38bc82c618d69042 SHA512 32e216097ad19444b16200082a8796a6a7a2d824310e271df51e931e73eef1b13a57cbe9b6eaeddd6bf4e8b0e3a3d3f4a41def509ed1c55a960a3df524afd472 WHIRLPOOL 7b241545ce18af117481a813b2b0b2d9450f0b638068867fc60d2a759f4345d50114459646f51f6972267586678149efc5f4c26f1090d8f1fa4485b3bc4b4d5f
|
||||
DIST calculate-update-3.2.0_alpha3.tar.bz2 24313 SHA256 934f4b55f9df42090a128c524e2874b27f2e91b7f5b9c0eb2170ad8ee899362e SHA512 31c593b8d70592aa5f05011583317054c7bb75f558ae792cc3289820eaa87d85f4be91e29485c2aa824d1f2d7cbde942ed7f66fd9937d8950e59d83d41f6f7a2 WHIRLPOOL b995a3806cf7c964a26d979ad6c1416ec4b7315e79546c079c72c0ee12eb7dcc589198149186aba65ab860736389bfd9f0c3b534d88c97769d0ece5d8f013c1a
|
||||
DIST calculate-update-3.2.0_alpha4.tar.bz2 24420 SHA256 b3536f249b5662516afa8cbbe732e711ac6c1a9abbbb9af861c086555e525eb1 SHA512 8f4d8a5eba7483a043a62167cfada94eec3915dd7609229e982322afb793495390b2d3337569b193d58d9a4b45f8ed09ba9e79e0b93fe7c0a0f2d764851508f8 WHIRLPOOL 2ee291b8ce112b2e3b2c48db5006af0da711d40aacadd14f4cc08d86c183419f534cf1ccc6ed14273a8fa439a5d51ab77aac0747c5e0a1ffd1bd1b711bea3b18
|
||||
DIST calculate-update-3.2.0_alpha5.tar.bz2 24834 SHA256 0d7452f632f8d23bbbd760203ce66769e71dbeb23d4ec2ba9cd3c56a574fe51f SHA512 434ca0811ba97143936e2d3c6f3458289c0f373f99b22fbf08b27cd34338846a02a45c0a6480602cc5172ada1b24f0fd124ae715675a8b706c2248c9003acfca WHIRLPOOL c543e597f980b459148d3ecc9c5fe085192001343485a430bc40698ce2a929c4d3ed186a25099aeca19a6a24d6e480246a42de5277148da91e397192aa5aad63
|
||||
DIST calculate-update-3.2.0_alpha6.tar.bz2 24918 SHA256 ba6c633330d68761bc426750dd5b3bb52d75843c1e5adc6f1ee41daa032e1e2e SHA512 c44e02e158758e5f1bfb26d1f1f276d27664e072df9aa3485840d4853320671a0323dc03ccfc31e78f1ae66003416d5723383967991fefbb5c427ec8447dccee WHIRLPOOL 14d5fbec32105e18f31304d7c70f1c57b98b4c3ffd83ca4bc209c622b71df218f2c63f006fb15b5804676c0421b86c05ac6ffef26651e1336a5cf820701900ff
|
||||
DIST calculate-update-3.2.0_alpha7.tar.bz2 25167 SHA256 73354a7256acf3939c988fd08f79ecee1ea79def52c6a70d4f3eb2b30057f0ed SHA512 b50befb55b22128e5038934b5184e86d039b5cd04b2f2df8446a5bf471229ad27bf324fb889157a7d5ce2351e4709cfac29c8a985930cde89d140197adb82034 WHIRLPOOL 92febfbec36985a9636783423ae86d230d2bc8586865165e24fa913046daa8de84206dbc9ab9ce3a8a87eee050a50813511d102fd66b37f2f83e0be4c64ce270
|
||||
EBUILD calculate-update-3.2.0_alpha1-r1.ebuild 749 SHA256 59377f0c4bd1b0ab1a881a2c6ea8ed46717a709c84c07dcc1a07f161dc0b2259 SHA512 cbcbf5c5ebe2fe8e7f79b20f35f7ab5c26e48b1769c6bbffe73c41d73052627cc6eda7aed812c8bb94b98361ee0f04bf81381b6ecd3b81a52b6e8756e410b4d9 WHIRLPOOL ed5ac0355fa232190a75ec5daff8b2559435eceaac13ef3cf0a17a501eda4a264ae85e546de10cc0af42ac9b099dbe078b31c095cb7d42d4a5a8e9876b16c84e
|
||||
EBUILD calculate-update-3.2.0_alpha1.ebuild 605 SHA256 bbba2cb38551fc98a0be4b262a9dacb7c37eb9459721dc4e7bfe59f54149330a SHA512 06ca411da63d5f8eb1dce23a908d5735dc760654a54b6246b373454f39c6966e8a46f2acf7c9f86c3b70cf3cd789459dac7757ac9c5747d1fc9bf85c09b850bb WHIRLPOOL cd2d5211ebe879bdee1af43446088700fbc5609c7c87ce25c3364a0c9a42942af9a1a8a11efcf1773217def31778d1139e491a6e771bb90b9b3f56a3e20ab570
|
||||
EBUILD calculate-update-3.2.0_alpha2.ebuild 623 SHA256 e0fdd7f36ffb80057fe77efb72f8d3368a06015499449555a16fe1c4882802f2 SHA512 ea3e16087cb9c0446e151ad23072fc56195b54219760d7cdf49bf744cff68f12a5847e4dcdf42d90141049ab79262a260886c283038db130c8cfda29eb6bfdb4 WHIRLPOOL 710e53286c8754acaf2361b184279b999f1d67f95a747950ae91f5ed7be89375041cf097d0a227e4e78f6d17679f6b3f69d030486ce6dd5f6cb3cb687315707a
|
||||
EBUILD calculate-update-3.2.0_alpha3-r1.ebuild 767 SHA256 30d51073f279718f20cd042265905b17ef4fe2a4f7bd98955caaa8d00922b75f SHA512 08b55eec3d280647f065d32e91b90a78a62f6c3a7786ee706c0b0e17c1194c1bb72d5c7d0c97305b919ea30cc0c5af10c6792bd8b36ab8b9a98bde8b6c8174b5 WHIRLPOOL b3523ffd53edc3a09a9de35f1b4856a2874146f0a409a9fc51467c4a32523e84277b0159633bcf7857080897d5016de3bb27b3d44ca3b5d0d81c903e02d09c7b
|
||||
EBUILD calculate-update-3.2.0_alpha3-r2.ebuild 767 SHA256 a2d534813424e7ee22c6fcbda9f459ad16b4d8eefd0691f124e728d260b03b34 SHA512 30ea415d70e2d65a35aeb05b28d55c2499588dd9659e330b9c7567b680a50242793bd32b6d3b20b93d7f1dde915a56b7c4145adbcf76a1d8c1fd5ca0b34e46ff WHIRLPOOL 2f64e6d3d0e7e3d2855888ee2bd9110ced3e82750aeb15481ed22e6c1a74053359cfa7b8fd9fd72cd0c408955b6c1bfa43c39a9624ac958f508fb6558a20dd42
|
||||
EBUILD calculate-update-3.2.0_alpha3.ebuild 623 SHA256 9747a7f19c9cd545b38f74f283a1c7aecb451bc1769a833935217cfe53b01baa SHA512 c2910b1427589e6fa869840d15dcd3149c84da02d5a6f09a1f1ac23c8702a4efaf0bbbd778057395217e7e70c20eb6a1716e933710719669c9236fa9ca3c4c3a WHIRLPOOL aaae73a86f00e62990528e9a01e5f9f41c57f38a4407452433362189fddd3c5230ce69016c93ffb4e5f0694e1c811d6e9c2f631f854422d1195021c656fa9292
|
||||
EBUILD calculate-update-3.2.0_alpha4-r1.ebuild 767 SHA256 f12912de4c0bfea487c8b1a135fc9293cb8550f9443f10d59cdf514ea50aed1e SHA512 d021b334806c95424614c2bc0c702bb3bd75f17b12a7ea41361d053627b187564eab65be08c1418ac0de186d2bb97d96c7824760f4c52d14dd68faacea216fe9 WHIRLPOOL ae97441c8478a13f4cddbbbf8c1f16d0fab9ed40b5af565701beae2f9db7ee8a0c93b717a6654045b11e2c001313a77c7f04b42e12cdb3fa4b0a06246a880b5f
|
||||
EBUILD calculate-update-3.2.0_alpha4-r2.ebuild 767 SHA256 710e26f93755be8a5a6faf2857bd4fc5c29b55a2034a4dc9e18c20ba1e993eb2 SHA512 0ad565fd9f7240bd2347dadb12574ef1916e6946c20f0f414312a48229a7e128edd6dce545faa6aa20f69c8ece4d184b108e2afabb568f36801dd0f279e5c119 WHIRLPOOL 8267f5128363b52e4870298685e38375585329cb21d9e5b8f9e36a4362c58e90bffb8e6d8d8b871bb0fb85ccf323354174f11574dc28fbb71941c7a1f7dd87d8
|
||||
EBUILD calculate-update-3.2.0_alpha4-r3.ebuild 767 SHA256 f5dc6601800363d095a93e8726a8758aa3e42a010623a1a0aa973b18e9d05c47 SHA512 57d9f397a1e3ba3f89ce15ce7daebc2cb5f93e6d9600d31a23076cae6e27a3209468c983bbd5eca6b618b344beefe98d68c343d7b8123f101d704fc00f521eb4 WHIRLPOOL f512e66ad18047a6cbe49cbfc8085a11b18b07d34cdde28257d024017e981b4f7bc24573c518ab4e330c1e7d395728d3c1d0357c713ad32130ac0c372c39d2da
|
||||
EBUILD calculate-update-3.2.0_alpha4-r4.ebuild 767 SHA256 8e9a3d77977a81cc529baa562a436d630da8709d9c00488e9cb750e83279f826 SHA512 b78245627614453aa9631ac12f548c1f4b531b81d8e770b8aa297c7af167e06944b10451bd976fe57ec22cd94cdcf114ddba419a5cdac5b2a1cced726d520a82 WHIRLPOOL 0a0d3cfb6e1c7098a393891d623d114cc1badee121e4bc414a23e701b9b9af784fe45997207335fe83833c8fbb248e2a3a1af91c932d41672375b84d1b7767cd
|
||||
EBUILD calculate-update-3.2.0_alpha4.ebuild 623 SHA256 51f176a0b12ff53b612634c391e3504059bb8f5bfba20325e86efda1cd0f2787 SHA512 f693242808a683f9bfb895dd4a5330b9bb50a27d51ab51a272619724a03ad5a531cc23434abbaae6773f974dc5d699f1aee7d9062d2b19076335ccbe4bd7febd WHIRLPOOL 39ce52a3ae9fe1f7bca4b00a96929a58cb50cdd9c0a22f801bd9b8fdafbece62f9033c48f9e3a549136d4b838f4ace423710cbd63e2e3b7da9fa72fa81802255
|
||||
EBUILD calculate-update-3.2.0_alpha5-r1.ebuild 767 SHA256 fe240b29d75a1e24f3d0260d2556687dd1a86b208b717999a7d31b2b834140e4 SHA512 46cf6287a4021421c75b2cd8852499bb6f0a31f3f02fe9a950d6f2e16a660669501a4c46f79bfb96bf1540b3be20f416c6b42a5159db761c8d628e4294da2535 WHIRLPOOL 466fdb29dfad3fffb4e377fa58fc5f5b0bb074571c38fb58f008f1971909b8ce30578ec53b32e4160b6a59256cd8acb3c80cc46eb34a5d8e899a272486fe3858
|
||||
EBUILD calculate-update-3.2.0_alpha5-r2.ebuild 767 SHA256 03ddecb52d21af5d8c2a5dd8b96ad87d1fead18a2630bd68f419f8ed3f0af7e7 SHA512 c2d80544c91bdf470b039a0dc81439a4b721977b281c80e411e2883ee73965f68b2bf4d75140e30c975271cd37d310d6df4bc2f585ff3632f687ccd4c6746d4a WHIRLPOOL fd87d40c1b44aa1ecef848f1c34a40bf8ba6603c3ce51716c1446000ed3f96a15421ddeb312943c6d21dbaeef39d5bc6983ebb58218d2de62e58a9a24c5c2e1b
|
||||
EBUILD calculate-update-3.2.0_alpha5-r3.ebuild 767 SHA256 693bf06a78e2d02be968a1b807210b0f3d338f73f8a2aff9494ab42a71b36f08 SHA512 cd39e67a44c35477000136a05dec4d5721d71aa66d64438b450ac95a79ca03ce5dfb02c9110290cfe63256dfec1f24e68f1d78b6471d08125b870976b7616ec6 WHIRLPOOL bbaee8a3ae2db30bb1733ead92a888a79da888556b5cd9ea3cbf7db44dc4868daacac7daac66355c68f3f9446aa460bc282944ac08245bc6c83210b38e7c702d
|
||||
EBUILD calculate-update-3.2.0_alpha5.ebuild 623 SHA256 b5b09dcf5177124e9e521154ab3e7e63e0052fc58dfeec1cacb6462f96112a3b SHA512 57c022bf4951fc6d341eb8df33d527a7f5d16f629b3ca1cd71710947eac3499fc0604f34ec666193a8222d6347914fdd38363364827d01db6c8e16af6b0c2a01 WHIRLPOOL 470fad0fdc631d4bcb52e370e3351adde95df42a56f23875945cf72c9e23fee0b8adad26ad592d5b9d17f6eed056bbfcafa3086f549aea6ef5f3e8e5fd7f027b
|
||||
EBUILD calculate-update-3.2.0_alpha6.ebuild 623 SHA256 2c6730fbbeb47c9e2d20d18451900e1fa6db0cb380421533bb4ef8beeb19ede2 SHA512 147fc1940845797014c7b725780dd3b1c17b87bfcb2906d62f95ec56c3e1fb04c72a050f24b9ac9d8ffd81ea98e394f6649735dd8b31232fe13febbee74f2e0f WHIRLPOOL fea68cc4175de5f4e52c6a527d53375d9921e4bb3003f25d540c618d9fdc987a2bc255aec1755868a56f3c531dd2264b2481b06c240ca536d478615213bab9b0
|
||||
EBUILD calculate-update-3.2.0_alpha7.ebuild 623 SHA256 7bd0dfb4a6c818a8e1727d0830cfeda2dc19ff193dc5c920090569ff1c9fb58b SHA512 6a88fe0a67a65af232001c4ea13d6a40327c4c4d177b06b64ef5afd387349f654faec1c5d52af6c35373ef77d0802622a9fb9fe720b08202baa116d9e2fcc18c WHIRLPOOL 4ebe91b2db932cf521558fe7618faf6550c55f5cd0e674585d854ac81f013f4d4fac2fae6341f8ea238c2b5f288e4842ef213a0ab52abb802043e2d51ae484b7
|
||||
EBUILD calculate-update-3.2.9999.ebuild 530 SHA256 9558d49a6b95f73c67f79c835e4003725ba7ae7e0492ea336737da16fe2f5005 SHA512 466bce621f4073bfbf4d34063cbb54077910baa5e40637d5d8d23044edccc9d79bb764db25e05b68969f1bd63573a1c0bc04676f45a6bbeca173503df6887767 WHIRLPOOL 0107e9b7746739a9be77664aa9e6907c9e511ac0422721d709fe63ffb4a55246a2d6c494280bd3b72e50d8e1aecb7f811cfdd112c482168bd9fa17c4ff0d5eaf
|
||||
|
@ -1,32 +0,0 @@
|
||||
# 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_alpha1
|
||||
~sys-apps/calculate-install-3.2.0_alpha1"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_alpha1-r1.patch"
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
# 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_alpha1
|
||||
~sys-apps/calculate-install-3.2.0_alpha1"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,25 +0,0 @@
|
||||
# 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_alpha2
|
||||
~sys-apps/calculate-install-3.2.0_alpha2
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,33 +0,0 @@
|
||||
# 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_alpha3
|
||||
~sys-apps/calculate-install-3.2.0_alpha3
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_alpha3-r1.patch"
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# 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_alpha3
|
||||
~sys-apps/calculate-install-3.2.0_alpha3
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_alpha3-r2.patch"
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
# 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_alpha3
|
||||
~sys-apps/calculate-install-3.2.0_alpha3
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,33 +0,0 @@
|
||||
# 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_alpha4
|
||||
~sys-apps/calculate-install-3.2.0_alpha4
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_alpha4-r1.patch"
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# 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_alpha4
|
||||
~sys-apps/calculate-install-3.2.0_alpha4
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_alpha4-r2.patch"
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# 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_alpha4
|
||||
~sys-apps/calculate-install-3.2.0_alpha4
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_alpha4-r3.patch"
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# 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_alpha4
|
||||
~sys-apps/calculate-install-3.2.0_alpha4
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_alpha4-r4.patch"
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
# 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_alpha4
|
||||
~sys-apps/calculate-install-3.2.0_alpha4
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -1,33 +0,0 @@
|
||||
# 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-r1.patch"
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# 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"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue