From 03becd4f017734bc8019203349f0de79dd06bfbf Mon Sep 17 00:00:00 2001 From: Mike khiretskiy Date: Tue, 22 Apr 2014 17:55:01 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=83=D1=82=D0=B8=D0=BB=D0=B8=D1=82=20alp?= =?UTF-8?q?ha6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sys-apps/calculate-client/Manifest | 2 + .../calculate-client-3.2.0_alpha6-r1.ebuild | 40 + .../calculate-client-3.2.0_alpha6-r1.patch | 27 + sys-apps/calculate-console/Manifest | 2 + .../calculate-console-3.2.0_alpha6-r1.ebuild | 29 + .../calculate-console-3.2.0_alpha6-r1.patch | 101 +++ sys-apps/calculate-core/Manifest | 2 + .../calculate-core-3.2.0_alpha6-r1.ebuild | 51 ++ .../calculate-core-3.2.0_alpha6-r1.patch | 786 ++++++++++++++++++ sys-apps/calculate-i18n/Manifest | 2 + .../calculate-i18n-3.2.0_alpha6-r1.ebuild | 31 + .../calculate-i18n-3.2.0_alpha6-r1.patch | 38 + sys-apps/calculate-lib/Manifest | 2 + .../calculate-lib-3.2.0_alpha6-r1.ebuild | 36 + .../files/calculate-lib-3.2.0_alpha6-r1.patch | 84 ++ sys-apps/calculate-utilities/Manifest | 1 + ...calculate-utilities-3.2.0_alpha6-r1.ebuild | 26 + 17 files changed, 1260 insertions(+) create mode 100644 sys-apps/calculate-client/calculate-client-3.2.0_alpha6-r1.ebuild create mode 100644 sys-apps/calculate-client/files/calculate-client-3.2.0_alpha6-r1.patch create mode 100644 sys-apps/calculate-console/calculate-console-3.2.0_alpha6-r1.ebuild create mode 100644 sys-apps/calculate-console/files/calculate-console-3.2.0_alpha6-r1.patch create mode 100644 sys-apps/calculate-core/calculate-core-3.2.0_alpha6-r1.ebuild create mode 100644 sys-apps/calculate-core/files/calculate-core-3.2.0_alpha6-r1.patch create mode 100644 sys-apps/calculate-i18n/calculate-i18n-3.2.0_alpha6-r1.ebuild create mode 100644 sys-apps/calculate-i18n/files/calculate-i18n-3.2.0_alpha6-r1.patch create mode 100644 sys-apps/calculate-lib/calculate-lib-3.2.0_alpha6-r1.ebuild create mode 100644 sys-apps/calculate-lib/files/calculate-lib-3.2.0_alpha6-r1.patch create mode 100644 sys-apps/calculate-utilities/calculate-utilities-3.2.0_alpha6-r1.ebuild diff --git a/sys-apps/calculate-client/Manifest b/sys-apps/calculate-client/Manifest index 8c2775f..745da8d 100644 --- a/sys-apps/calculate-client/Manifest +++ b/sys-apps/calculate-client/Manifest @@ -1,5 +1,6 @@ AUX calculate-client-3.2.0_alpha5-r1.patch 923 SHA256 d03f7f8f871fd399e357ccdf65e8dc8576b3665c9b41e022f808728f879fffc5 SHA512 a9fdb709f2d85bad67ecb703b808580e0644fca403ddf0cec22ba0bfd9d66eebead423288f2ac3b3ceeb5542e6f6c37aea70ae8487e02aae704abab37863a4b4 WHIRLPOOL 550b4d0e7a9bc15e34a4da67533fd92c26fdde2302636a8808cf5d0018ede5106837780dc4238841093285d4da951849f4f0d241036ffc4905fdb0fe5a945f53 AUX calculate-client-3.2.0_alpha5-r2.patch 1606 SHA256 3958bba1ed3b73befebb7d1317fe1488a4568ad49ffcbdb0ebd4879052967c8d SHA512 890fd6d886eb1672b38ed0e6d5c10a8f273b7849a44736717c0f5cce9b7898a43757687ff5c64384ef36e8765ad44fa58bc060d9cbe544a309ef6171a54e1b08 WHIRLPOOL 6061dc34ad46be179064ea9d01e2c7d27442b3d4a75007057bb483a757ffa178ea3f79356c29057688742b80ef549e54492450e2214c1537e52ce45063c0c5f3 +AUX calculate-client-3.2.0_alpha6-r1.patch 995 SHA256 9dbd39647220dfd93fb759b039b583c724abcfb25910813783635a6707421c31 SHA512 3b2ccd132cf820b016c1d103bbf7e9fc66b2fd82e967da930eb5149f7b0e3e40d752371c077be9fa9e548433716a47ac0791c5eebd4976ab1d926ad9df42a137 WHIRLPOOL 2c24d021aa5fa5c696b65d5c2a747fb564d1697c8343ff8d65328dff64fec6bf176cf9cd32333e7f56a67e68c2bb25349be3f194afc532576857cdd29d1fa77a DIST calculate-client-3.2.0_alpha1.tar.bz2 30724 SHA256 7a18e17eccaf39f562cfb4d8519cb53771b072dcaf8fd0d3870459ba7d860977 SHA512 2900d0a67b895bd300a2b8b726b698c0997634229516d163ea832fd58cbefbde69675ac309b8d25be728ef9048647c8b157d8daec60b61e62046c261526f0ab9 WHIRLPOOL 41e7758b0a7ab62667ffa4926cb5e70b86d357b0bad3bee0c216aa5821e943cf6b27cf4b5ec212c6edc85fec0c6abd405037856058b3dc9766aa0cc9a6d73fdb DIST calculate-client-3.2.0_alpha2.tar.bz2 30717 SHA256 f8b77a56913ddbd8d1cd1d5b73b2559b0bb03c7d591d2e90fbff706e5c5e3f4d SHA512 46e0c32f92e6323d8acdf08cfc19c86d7d4a0c2f6f14df465a05ef9a7cef8aec357ee2e0b25dae6db83ba6315488e60cc03b1bb4c946bc135fd7041b30d55072 WHIRLPOOL a4a39cb93ff107a36c1acaee3c80d6a03312be0eda19060528afe2d3c880245778e5b765f1bc99c093ca50d83092fad0c53c55558170d29465fc8cfe446cce6f DIST calculate-client-3.2.0_alpha3.tar.bz2 30738 SHA256 547abf55a5ccfa907240545731584a5cb9147b8d3d61d7075268fe26708a2750 SHA512 6240f350779617961dd11eed65c4f30036e1517f87f58f171450f3b7b1fd46a54f2042469e07aa4b6482f5a7f1b55ad6efc1f7170810f4c1fe16428775689343 WHIRLPOOL d03ade233f1bd2af892fad8863cf89b73aa32040543be96e61baf2eb7908f03ba575357790366d1819e592799c6025a793d9661c7c54e7457e05b8f84ec4f101 @@ -13,5 +14,6 @@ EBUILD calculate-client-3.2.0_alpha4.ebuild 828 SHA256 65b79560b41367242088b853d EBUILD calculate-client-3.2.0_alpha5-r1.ebuild 972 SHA256 5995870a555358457db392cf18b1457f59bea39d7209d3d42b6fd6cdd5fae3b5 SHA512 944c2158c65321925c3776f58ca0dbca183adfe7b8208e846bf10baff735c9d2b5d912d07a98b389ecc8b090527232dac1bfd2baaf7d1624db33211aad954394 WHIRLPOOL 873388d4b5109bbc2decbf60e260f1a8434356d5de0afd094ea1db4edd79207c385df8dbdeaea22ff2f9a382c90481c8f51435fafd8f3809e533df25f9f850e7 EBUILD calculate-client-3.2.0_alpha5-r2.ebuild 972 SHA256 4f2940a3e3e0c79d18f5b3fc82b5c97ef719888343515ad3eb7b7560fd5d985f SHA512 b215d6ec70655d60db35aa94efb6ffe99f5fc8d512b08f2096ba7e9af4538ec7b8afd97c2dca7bd8d251ebffee1cbba863073e758960aeff69acc61317857dff WHIRLPOOL c66d3586ad3263dc84d55f4efb3c5a352ce0bd4918dca10c4d98696c2e9806dc36b934d34088a1748559753dd6175b024f11e0229266ddd61ebac7232bf3c423 EBUILD calculate-client-3.2.0_alpha5.ebuild 828 SHA256 f5043b208fca10e64fc8a6d88b9433d3107ab92da386c0c5e2c69805a26919a6 SHA512 dd200efcd2caead853bdf776b3ac04a248ed08f2ca47f245e683a574ee967fa0f346a40b8b34ce82a10af71d8459ec97235d0e72ee70603a5a55df87487341a0 WHIRLPOOL 472df7c480edc9f9c0fb30effda52b17d95a4a547db9acf30cc107724e009238a07fa6479524bc89e5245969be7780d5773c8d43cf962e9f35dbcc337b44f05f +EBUILD calculate-client-3.2.0_alpha6-r1.ebuild 972 SHA256 faf0027efb77d952c02fec5bbb4c291da37dc17a0fc7b1f45c68c86e801bbc65 SHA512 09c9e029d225fbe036980c8ba6e0aa5a023d6ed845e8dba7594844f182a03a53826bd01fa3c25e8e40a0f6ec759e222de7c94adfd5e8637b30f036f9f5108674 WHIRLPOOL f1146e1262d43d6d2d5d49d5101b47a755622e20ea01a412470ae0afc2474bbde6f2106ca902ff2063c65ba74be2f470f58170d4b112367e73edb2dee854c3ce EBUILD calculate-client-3.2.0_alpha6.ebuild 828 SHA256 2f7ed2e2aaad344adf47f37e5b67f6e3d59505528c979bbed19febe0bc4d3e88 SHA512 365d6065ded45945f6d2f6c68bb09e4afb888014a020bba6cc1b0ba843c2c66d2dc37979f5feea8bf8fffa3ac7a4e347c9a2668822c84d2f32aa55afa4ca524f WHIRLPOOL af3711a7bc070ca95b5115539ad50f76a8fa64fe62779657328d6a8ddc97b1dc57f0d81ef3b1d0c90e93078faeff61f4446936d92fb5eba5ec47ea6bae8a4fb9 EBUILD calculate-client-3.2.9999.ebuild 879 SHA256 f7cf1ba86978c78b80e7d47aceb7f97259e11f3fd17eb5b26ee41c9ede706cba SHA512 444ed5693a9e67cc94f8e105e2f6c2f8b09ee096926ba3ee3df1ae145185949e57596d6e9f96e4314c52fde45e8cb0fa93e42c85116044ebf04b62c8a82776e4 WHIRLPOOL 484adb514ae76df6325e3b917c01abf414981abc578b6cf27e4d2a5c880d42bbc3c713675e2ca9ce04b6a2afc5d203046ad04248a942a675242c3790aa964a5c diff --git a/sys-apps/calculate-client/calculate-client-3.2.0_alpha6-r1.ebuild b/sys-apps/calculate-client/calculate-client-3.2.0_alpha6-r1.ebuild new file mode 100644 index 0000000..578e1a4 --- /dev/null +++ b/sys-apps/calculate-client/calculate-client-3.2.0_alpha6-r1.ebuild @@ -0,0 +1,40 @@ +# 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_alpha6 + !=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_alpha6-r1.patch" +} diff --git a/sys-apps/calculate-client/files/calculate-client-3.2.0_alpha6-r1.patch b/sys-apps/calculate-client/files/calculate-client-3.2.0_alpha6-r1.patch new file mode 100644 index 0000000..5391e1b --- /dev/null +++ b/sys-apps/calculate-client/files/calculate-client-3.2.0_alpha6-r1.patch @@ -0,0 +1,27 @@ +diff --git data/cl-client-resume-remount data/cl-client-resume-remount +index 68cdadc..0efe516 100644 +--- data/cl-client-resume-remount ++++ data/cl-client-resume-remount +@@ -1,7 +1,7 @@ + #!/usr/bin/env python + #-*- coding: utf-8 -*- + +-# Copyright 2013 Calculate Ltd. http://www.calculate-linux.org ++# Copyright 2013-2014 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. +@@ -89,8 +89,11 @@ class ResourceRemounter: + print("Restoring remote mounts for user %s"%self.dv.Get('ur_login')) + # waiting for the domain + for wait in [1,2,5,10]: +- if self.check_server(True): +- break ++ try: ++ if self.check_server(True): ++ break ++ except: ++ pass + sleep(wait) + # check and remount remote resources + self.remount_remote() diff --git a/sys-apps/calculate-console/Manifest b/sys-apps/calculate-console/Manifest index 4767700..ea75d23 100644 --- a/sys-apps/calculate-console/Manifest +++ b/sys-apps/calculate-console/Manifest @@ -1,4 +1,5 @@ AUX calculate-console-3.2.0_alpha4-r1.patch 6417 SHA256 3350c0dc40cde2fabdd6144825f98185d47f8a7ae4c68c68063b9fafe651aade SHA512 8ef91403e053f7dda2ec4fc04d222f8aedaf0d2dca5d8524c21bb19070196a2b4cc48ee72acc0f9a6010796a1555d3bb8a4cf24faa8ea1be4383f5ee03a37630 WHIRLPOOL 8746a2d272fec180b6bf79c0fd41fd18fff56551ff3160862ee019e3a1f88ac80bb6b7d6d0af17120a0164eac189fb990a868326b05c1c83a3df5dc8e93465fe +AUX calculate-console-3.2.0_alpha6-r1.patch 4302 SHA256 af8fb4078dbb7fe529abdf9d3888d29fb782948cb2e2be15019aacf13b6d9392 SHA512 1ad1bdde06497dc3f35d1ede5a9a72e3866b7c5913045b65c5e6c512fa789c85069b415d873318b6cb6439f5e9cb78cba0b09cb4cf2540168fda40f39227760d WHIRLPOOL c53470f48683632bad944188e86566582d3a3c92df4dac5dc8a85930f3cb7a29b8f9708cb741d074d07b757544ec0bc63c5f78f5c7c21ef303bddeaf66be441a DIST calculate-console-3.2.0_alpha1.tar.bz2 26068 SHA256 7d100a5091b68363c326ea002bd16ad77453c1ab9146350bde0a2d31394f1a42 SHA512 1d03db28fef82ba45547e1a5ffeed8a588f7e6cc0121edc4d85140332899526f50eeae347d8ba10406929b1c71a6760d2d9152ef70e8b29335b9085d2b8c3006 WHIRLPOOL 762eca57fc707d9234f10ce8f2e4f709bd6f0be0c01299aafd1b7b16233166fb13d26a3503be77482e8cbf3c9269a3b62240e538e00a0984f782fa2cb2d59461 DIST calculate-console-3.2.0_alpha2.tar.bz2 26006 SHA256 e05f817beca947e67aa64e42bcf0f370dc4ce1a87306fee3d9b9b83fe93fd7e6 SHA512 962e2e9947326a54cc409cbd3a1e52504338be3634267ca6db48177bdf4d680673fa0b40623ebd67ac22c7e5f324bede8a0c7ef1360b3b280e0e719106d21f2d WHIRLPOOL 80bf07a3f0ae0aab276c0b42a4aff5b0df9dec416eb7e1bec9f2efba5038c89773211251f6d873ccb3d481989d64ffb37e7a0895265283f40598b06fe4d8505c DIST calculate-console-3.2.0_alpha3.tar.bz2 25996 SHA256 7918c472b42aadfb0ef133fa6d56c45f9bb2a5706a4b86937cfea6342b7c084b SHA512 a6c673054458902a188a0053c2d36d609298ee878010bed5422e32c2a7ea4b60050d68485b39ab8ee10d4c8541c92ba557fd801bbe00e4edf09b0879ed568f21 WHIRLPOOL 5704f4f831510873a3eaa74d86f7f4262aef5989deeeee2d094b2bf91c26cd6fd90fa233d215072419a58dd198d0cddb5c377f9187958a1c668fa80e7680932f @@ -11,5 +12,6 @@ EBUILD calculate-console-3.2.0_alpha3.ebuild 550 SHA256 23321b8858f599f1eb190e1a EBUILD calculate-console-3.2.0_alpha4-r1.ebuild 695 SHA256 5a368747e46ffe05fb1d41021cecd4f9d469130e0ca5a11dca5d6f7d5e9b6b6f SHA512 362fc9190dbc36135549ff35095720157e26c1d8259a1b2d8817dc0a6bd24b53d7603f794064e67aa945a6dc3b4e97c9db2b6cb5571b7ff443ae4084886ad017 WHIRLPOOL a229306a0f5b0df519456d2dc886b63c1c0401d17f8097aeb9d0645165d70525f460971600df048f027bf0992770745a9af2a277a3200f451dd9c091caa92a00 EBUILD calculate-console-3.2.0_alpha4.ebuild 550 SHA256 ed516e8802681282bb2267ecb4bd005cd4e1099892da0166d66b75605ddd02e0 SHA512 8b550b5018e4398eac1061b80bc106700f619b52eabed76fd2f3d3190e064f9965545bde7b6ccd46d340a5ce674751a59a8c0ec5bd0cac40d82d84e7fe2f0426 WHIRLPOOL 1a22ee90e0e53565e07cabad866666f91dc6251f1544ed266d627f3424526bde9c6e885d43e4e0b2bccd220219287e85806ab57103329ec3fd3c95183079d865 EBUILD calculate-console-3.2.0_alpha5.ebuild 550 SHA256 4163fb17c600d30ecc263314b9a710011f6c71cd66902484236fad15d32365e0 SHA512 f26e2964b42b3a0eef44f2c19b430eb270b8808e4442bae08501bb4c8f3cf9e9b3ee98ce686402bb78142cfa417849db482b12598a0046d4eccd7272cdb317cb WHIRLPOOL 4cce4501e53ea2d8d121f15eddfc87109c7dcf125d253ddef0b3e690fde1b076af50096604e9f1506d76bc76140a2349dbf8a19152e05857e96099a1ab713bf3 +EBUILD calculate-console-3.2.0_alpha6-r1.ebuild 695 SHA256 0c28ce93656f65efb3172f9ad395c481cb66c9245aabd7ee9425e818c187488a SHA512 e1600314dd36e9b94779bf773666e0819114ada2ce74243ce29e8471bdad349846857ebc275b0f4bb8e970cc2e272c7610c348fe46475a10fc61c2c2144ca79c WHIRLPOOL e62c390a048d647736fb4c8e18264fd145f4fe4120a839e5acb77ed2766334b6594ba5e37a23c7d2374f77bd7d1a89938bdefd09c3c8acf7f27795fb2688f0fe EBUILD calculate-console-3.2.0_alpha6.ebuild 550 SHA256 e62b9d67766463878f409f8ab9cd6495486eabdd22752681655bcde8927071a1 SHA512 2767740f1fb963c2e6b22f2ae3d29e814b7b362c5380ae4478aa28ca0606cd32ec13003ef4d2798d1ceaf5aefafc311db14a98b82340db7279d542c0a24ff9e0 WHIRLPOOL 2646477bbb6afed37a0a5b68cefa513ec7aaee90f644540ac3c418af072124dc0569ddf433262fadea0f28fafb9a914cbd2d5716ad346163a634d5376c698501 EBUILD calculate-console-3.2.9999.ebuild 574 SHA256 590be3319c98cc65e32e30bba9ef0291aab808fccfb40f872e49d02d6ea14f6a SHA512 f704b0b010d4151483d9455baa7dcd779bb535ef02c48f98761194a330fd6af084f912766291e42341f1243b3f2d82eafcaebcd9b797eaae04cfe3d9709acad9 WHIRLPOOL 7935f5935f36c5ce28d14b09b2b5366147f3ba68d569a6940095d1ebf0eaf17c81421ae3a764dd2c01a17abdcbcff30ea45c1c592223b951d38edadcdfa731aa diff --git a/sys-apps/calculate-console/calculate-console-3.2.0_alpha6-r1.ebuild b/sys-apps/calculate-console/calculate-console-3.2.0_alpha6-r1.ebuild new file mode 100644 index 0000000..f2a7355 --- /dev/null +++ b/sys-apps/calculate-console/calculate-console-3.2.0_alpha6-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" +SUPPORT_PYTHON_ABIS="1" +PYTHON_DEPEND="2:2.7" +RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*" + +inherit distutils eutils + +SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2" + +DESCRIPTION="Console client for WSDL Calculate 3" +HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2" +LICENSE="Apache-2.0" +SLOT="3" +KEYWORDS="amd64 x86" + +DEPEND="~sys-apps/calculate-core-3.2.0_alpha6" +RDEPEND="${DEPEND}" + +src_unpack() { + unpack "${A}" + cd "${S}" + + # apply revision changes + epatch "${FILESDIR}/calculate-console-3.2.0_alpha6-r1.patch" +} diff --git a/sys-apps/calculate-console/files/calculate-console-3.2.0_alpha6-r1.patch b/sys-apps/calculate-console/files/calculate-console-3.2.0_alpha6-r1.patch new file mode 100644 index 0000000..321856a --- /dev/null +++ b/sys-apps/calculate-console/files/calculate-console-3.2.0_alpha6-r1.patch @@ -0,0 +1,101 @@ +diff --git console/application/function.py console/application/function.py +index 77968b5..65517b0 100644 +--- console/application/function.py ++++ console/application/function.py +@@ -13,6 +13,7 @@ + # 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. ++from itertools import cycle + + import time, os, sys, re + from fcntl import ioctl +@@ -322,11 +323,19 @@ def get_messages(client, sid, pid): + def get_Frame(client, sid, pid): + """ get all messages, until type is not endFrame (or Error) """ + end_frame = 1 ++ spinner = cycle('/-\|') + while end_frame: + current_frame = client.service[0].get_frame(sid, pid, "console") ++ sys.stdout.write(spinner.next()) ++ sys.stdout.flush() + while current_frame in [None, [], ""]: +- time.sleep(float(client.frame_period)) ++ sys.stdout.write("\b%s"% spinner.next()) ++ sys.stdout.flush() ++ time.sleep(float(client.frame_period)/10) + current_frame = client.service[0].get_frame(sid, pid, "console") ++ sys.stdout.write('\b') ++ sys.stdout.flush() ++ + for item in current_frame[0]: + end_frame = get_message(client, item, sid, pid) + +diff --git console/application/methods_func.py console/application/methods_func.py +index 52d0aba..0bc6f7a 100644 +--- console/application/methods_func.py ++++ console/application/methods_func.py +@@ -15,14 +15,18 @@ + # limitations under the License. + + import argparse, sys +-from function import _create_obj, get_view_params, print_brief ++from calculate.core.server.api_types import ViewInfoAdapter ++from calculate.core.server.replace_class import Methods ++from function import _create_obj, get_view_params, print_brief, _print, \ ++ colorPrint + from calculate.lib.cl_lang import setLocalTranslate + setLocalTranslate('cl_console3',sys.modules[__name__]) + import urllib2 + + from calculate.core.server.methods_func import get_method_argparser, \ + collect_object, RawAndDefaultsHelpFormatter, \ +- check_result_msg, get_param_pwd, getErrorOnParam ++ check_result_msg, get_param_pwd, display_error ++ + + def parse(): + parser = argparse.ArgumentParser(add_help=False, +@@ -158,18 +162,13 @@ def call_method(client, args, unknown_args, wait_thread): + sys.stdout.flush() + print_brief(view, steps.label) + if not no_questions: +- while True: +- try: +- ask = raw_input('\n' + _('Run the process? (yes/no): ')) +- red = '\033[31m * \033[0m' +- except KeyboardInterrupt: +- ask = 'no' +- red = '\n'+'\033[31m * \033[0m' +- if ask.lower() in ['n', 'no']: +- print red + _("Manually interrupted") +- return None +- if ask.lower() in ['y', 'yes']: +- break ++ try: ++ ask = Methods().askConfirm(_("Run process?")) ++ except KeyboardInterrupt: ++ ask = "no" ++ if ask.lower() in ['n', 'no']: ++ colorPrint.printERROR(_('Manually interrupted')) ++ return None + + param_object['CheckOnly'] = False + else: +@@ -180,14 +179,9 @@ def call_method(client, args, unknown_args, wait_thread): + return None + if method_result.ReturnedMessage[0].type and \ + method_result.ReturnedMessage[0].type != "pid": ++ view = ViewInfoAdapter(view) + for error in method_result.ReturnedMessage: +- params_text = '' +- for Group in view.groups.GroupField: +- for field in Group.fields.Field: +- if field.name == error.field: +- params_text += getErrorOnParam(args,field) +- red = '\033[31m * \033[0m' +- _print ('\r' + red + params_text % error.message) ++ display_error(error, args, view.groups) + return None + wait_thread.stop() + return method_result diff --git a/sys-apps/calculate-core/Manifest b/sys-apps/calculate-core/Manifest index 5ae2556..6725d69 100644 --- a/sys-apps/calculate-core/Manifest +++ b/sys-apps/calculate-core/Manifest @@ -6,6 +6,7 @@ AUX calculate-core-3.2.0_alpha4-r4.patch 18361 SHA256 75de26bd326759971c8f380f04 AUX calculate-core-3.2.0_alpha4-r5.patch 19063 SHA256 8a04d46c14515b93d44f33cb86f61adc0c97d840250ec9b800d9ce753fea571a SHA512 b6b742012f251e018f399e52bb2dfef7cc1c2f570bc02bef1d57a6d20c840e6f3325ce79cc110f60a7adb7d6e3e8f55d96fb44fd18fd49422db6c0c3b2dca816 WHIRLPOOL af6163d19f5e7c6af050aaf65bfd671c250993212f470a87731a6e6accf512c79b9fce49ff8bd12fbdf2dfb89d4360045690821f6e5aa7e3ba36bbc14278561d AUX calculate-core-3.2.0_alpha5-r1.patch 4276 SHA256 565ca501d01696d5e3d9ac6eccb80e0cd9efcb9c61b97fcfc592387fc4929c64 SHA512 e16b2f27a706e0d388bf06a6c0fb1c9f794e09d7e5373b16f2e3ecfda9d60a499169acd7271734c12b3b08b08133451902cac7848a13c3bbc6b8603637bdd956 WHIRLPOOL a68619e06a9115e685591bfb5da55bc564d2f8b958ec78baba76d8703a68b54f30a30b5b98ea718fa5bfe4418c410d912be5790b23e46061b596779228863594 AUX calculate-core-3.2.0_alpha5-r2.patch 5506 SHA256 4c2ccc57ec1c8496b51c4a572e0a1d86982a75bb8c4e6ada329ff774de2af7eb SHA512 b2ee8ea8061c32cc0693c2124470db541544d98d2221f8b3606576bf039138d7fb3cff7bf15b0284cf1c1d7e3215d1e65ca3c027cffd47b65c99be76a3366a33 WHIRLPOOL 08722cd12ceed5646dfbddff70e80fd5fb4ce161e1284ddac206c40f43ac2a7176407ce0fa5acf8eadf91b5093a2d8e1cb034ffe5b536109015fa9fff311055f +AUX calculate-core-3.2.0_alpha6-r1.patch 28016 SHA256 d99381bd316fba8256b5eb54945124c5f32d816b06ad3d32c7d972ff0d01e71e SHA512 a60106837082dd4e4f2794f71cf69a782fcb22f823a1f9f325e14145cbb195fd79e2b0bf5cfb1de486c0bb76b7b00c4694c33c1a9a639a7022f4b34c4f08f3b5 WHIRLPOOL d96a915b3755b061667e1ce8234c480e677429b6bae118774027a4d58930a9b2c13af635638d0c3a972e6ff64a7a19cbadf6abe1d048eb9c55e0e41ecfa522e3 DIST calculate-core-3.2.0_alpha1.tar.bz2 83658 SHA256 780a4107fcf2d6ee84be721e571f595ae8eb6cebf313cf6feef9c1d64d3a6575 SHA512 906a653de9286cd4d1d922937aa6afafef9a854ebf49f0636a4ad7e5e7ae136d353fe4b8c196c037688f8df7fd3df213800d184734193058df0ebb42090866d0 WHIRLPOOL ca8fe5f238111d78a65f2d42e8f3c169b7074cd5ebd7b8a653824b23d59cdcbfbfc7146ab7d96cc34300a7d418a036729a8c7931fd020c993e97103440e90c4c DIST calculate-core-3.2.0_alpha2.tar.bz2 84591 SHA256 bed467810d02c14ac9e501a0057b652b8e610960193cf3d64c6a78acc5eb5140 SHA512 e77bf6f102c02006d559b96ca51cdb84d25ba9a4b1170c61fbe5158f2539e91acab2ae857a940b030d5b37d430822aa5e2cfe1fbe903436e284d43a3eeec3e09 WHIRLPOOL b299b1a43dbd70fb68efb6ea21b8d8beeef63985b5e0a5deb66668a76e46b7c621af19bf442bbc6cbb289a05beb59e69e3e3464fa392d4c2da56307daa960c20 DIST calculate-core-3.2.0_alpha3.tar.bz2 84808 SHA256 271d4d5752e26f0e4d435b2cad825fbeedeb146418f42f387fcdfc4ead683a0d SHA512 7dbd5a693eebd5d931f3ec8a377c613a6fbaa757bb48cfa90921fd608ce311deac32dee48d619a05f8b24781551142ca1af4d5fc437bedea4d259eaafb0aa52f WHIRLPOOL 5a2ec89684cfcbdb9afdb860b97e331d39ec4bdae5234bdafe856e2d69aa9e1367a184cce8e98a5b68ee5c108d84f6eadaeb94dfb6bde793af0cbc9be5302139 @@ -25,5 +26,6 @@ EBUILD calculate-core-3.2.0_alpha4.ebuild 1129 SHA256 5265cd458eaf572bcdc443d19f EBUILD calculate-core-3.2.0_alpha5-r1.ebuild 1271 SHA256 bb6ca565f27cfb89251a9f15fff25d7eb743bb93a3d3646268a0eb19fd85fd07 SHA512 50e812db4e005a1bc3482d89da6e7f6b7e8b60f0d9f97c29a0bc2a7ed4b073609d2cd023c532b9c92bb9f6de5415539e9960ca82344e7ed8e773aba1f95174f0 WHIRLPOOL 605c78863ae19609773e274cdd9c2e4ea0147d9d7b31f7e5cf7079a409c1d6d532a4d99d75a6ee54e79d9dc7f8c314dcca0129ee3f3702b1bc48a920630af0bc EBUILD calculate-core-3.2.0_alpha5-r2.ebuild 1271 SHA256 0bf4b67c6d9a0dd9f182f8726d71cc97433a43b33dc179007836b0998248ce6a SHA512 031c14bdc101b6fc69057df83bfcf70c8aa1df5e27e93afcd96e07b0566dfde84790c1db9bbfe072b71fbef2abd94458da88e48dc95f1da9b367bed69c9e391b WHIRLPOOL 1c239566c0d8e515b76217d8397a180c2ee386596d28eadcf5e301298290798a5462fb39e29e73be38850612bc561f3ad83b1ccb955b7aab4d24caecedc8edf4 EBUILD calculate-core-3.2.0_alpha5.ebuild 1129 SHA256 c7a2a90ddd2749bd33904e2f3cb96d63ae944b41f562d69e17fbd317af0bec16 SHA512 4a0d7f79a3472db765b0057e74186680bfc6a20e55589d5cec3947f6a52e79db361b3eea22d1e67bd4f981efa3316ac79fcf2b577df97e1b1abaa0d619fbbab9 WHIRLPOOL 70cef0293a36be5fe9d25a52f8b29b4aca288b0fc334c59d39ef4627fbdd4b9773f62719f8f61081e203385ae6709febf98faa0004d98867843abab1f9010299 +EBUILD calculate-core-3.2.0_alpha6-r1.ebuild 1271 SHA256 eeb673d23352cb9df02b93f47eaf3c2e3558a89fa94867fb1f3d1f8b5bfcf096 SHA512 ae4b2dc1f27e84c18e35fc0674ff522398f4c90965f67e278c830da707d9d00cb885b5b11deaabde32f3646e8de9929d38605cf35f14a755b1e772e19fce8b21 WHIRLPOOL ec4d78b528eafc85f1bbdc139d0ac5847b1470ca74a2d1db62b5bf00d54af937ac6c8228256cb2643180f477670efdb230834d2294a097558bb1c84e42992cdb EBUILD calculate-core-3.2.0_alpha6.ebuild 1129 SHA256 e97ed753f108f340b41475c02a65fd4a05576e6f112e677271df991a680143fd SHA512 ce1f5eb6fdade47f2dd8d2a2a306eaa8ad9b57e52ea88fe5cf5fcabd933fbdec2e7cc114a2ad8e242aacb2bf2b90f5e74c7f22dae743ff063f29c71dcc01714e WHIRLPOOL c47b85f17c567c550bfec337f5d241593fd789c441af1ecaf366f20c5c594f21367e381610a7ca1901e6fded6b1c159b16a8f5645b0d7af812679175b40b9ea8 EBUILD calculate-core-3.2.9999.ebuild 656 SHA256 39383ebc527d7155b147355108ec0b069f7cad95d5fcabc33520f0fe1ee0b971 SHA512 e20a8dea6e20615baeb56069331cdc35a7c37a05afa125c7174c5082852242da446830940c962fd890bb6627d9f5cacf0848834b75bfb1a184a6acfef17f95f8 WHIRLPOOL 3e9f06bf7e2f99a46e3c681fa6f381b7b1883bb15e05c535a7acde55f9092418d0b71d95ce4b2906e8505ea73c4157620303e4e4e4e4de430f11bfd6214b4a88 diff --git a/sys-apps/calculate-core/calculate-core-3.2.0_alpha6-r1.ebuild b/sys-apps/calculate-core/calculate-core-3.2.0_alpha6-r1.ebuild new file mode 100644 index 0000000..50493d6 --- /dev/null +++ b/sys-apps/calculate-core/calculate-core-3.2.0_alpha6-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" +SUPPORT_PYTHON_ABIS="1" +PYTHON_DEPEND="2:2.7" +RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*" + +inherit distutils eutils + +SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2" + +DESCRIPTION="The WSDL core for Calculate 3" +HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2" +LICENSE="Apache-2.0" +SLOT="3" +KEYWORDS="amd64 x86" +IUSE="minimal" + +DEPEND="~sys-apps/calculate-lib-3.2.0_alpha6 + >=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 " + 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_alpha6-r1.patch" +} diff --git a/sys-apps/calculate-core/files/calculate-core-3.2.0_alpha6-r1.patch b/sys-apps/calculate-core/files/calculate-core-3.2.0_alpha6-r1.patch new file mode 100644 index 0000000..6f41975 --- /dev/null +++ b/sys-apps/calculate-core/files/calculate-core-3.2.0_alpha6-r1.patch @@ -0,0 +1,786 @@ +diff --git core/server/api_types.py core/server/api_types.py +index eb205c1..6b29d62 100644 +--- core/server/api_types.py ++++ core/server/api_types.py +@@ -20,6 +20,7 @@ from soaplib.service import rpc + import sys + import pickle, os + from calculate.lib.datavars import SourceReadonlyVariable ++from collections import Mapping + + from calculate.lib.cl_lang import setLocalTranslate + setLocalTranslate('cl_core3',sys.modules[__name__]) +@@ -164,96 +165,6 @@ 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 +@@ -490,6 +401,7 @@ class ViewInfo(DataVarsSerializer): + #element = ['table', 'radio', 'combo', 'comboEdit', 'multichoice', \ + #'multichoice_add', 'check', 'check_tristate', 'expert', 'input'] + ++ + class ViewParams(ClassSerializer): + """ + Struct for _view methods +@@ -500,8 +412,8 @@ class ViewParams(ClassSerializer): + onlyhelp = Boolean # request params for only help + clienttype = String # type of client "gui","console" + +-################# MESSAGE #################### + ++################# MESSAGE #################### + class ReturnedMessage(ClassSerializer): + type = String + field = String +@@ -515,6 +427,7 @@ class ReturnedMessage(ClassSerializer): + self.message = message + self.expert = expert + ++ + class Message(ClassSerializer): + type = String + message = String +@@ -532,6 +445,7 @@ class Message(ClassSerializer): + self.onlyShow = onlyShow + self.default = default + ++ + class ReturnProgress(ClassSerializer): + percent = Integer + short_message = String +@@ -542,9 +456,11 @@ class ReturnProgress(ClassSerializer): + self.short_message = short_message + self.long_message = long_message + ++ + class Frame(ClassSerializer): + values = Array (Message) + ++ + # get and send client messages + class CoreWsdl: + perm_denied = [] +@@ -781,3 +697,100 @@ class CoreWsdl: + #@Dec.check_permissions() + def send_message ( self, sid, pid, text): + return self.client_send_message (sid, pid, text) ++ ++ ++class WsdlAdapter(object): ++ adapted_class = None ++ ++ def __init__(self, source): ++ self.source = source ++ ++ @classmethod ++ def from_detect(cls, source): ++ if isinstance(source, (cls.adapted_class, WsdlAdapter)): ++ return source ++ else: ++ return cls(source) ++ ++ def __getattr__(self, item): ++ return getattr(self.source, item) ++ ++ @staticmethod ++ def Array(field, field_type): ++ def wrapper(self): ++ if getattr(self.source, field): ++ return [field_type(x) ++ for x in getattr(getattr(self.source, field), ++ field_type.__name__[:-7])] ++ else: ++ return [] ++ ++ return property(wrapper) ++ ++ @staticmethod ++ def StringArray(field): ++ def wrapper(self): ++ source_field = getattr(self.source, field) ++ return source_field.string if source_field else [] ++ ++ return property(wrapper) ++ ++ ++class ChoiceValueAdapter(WsdlAdapter): ++ adapted_class = ChoiceValue ++ ++ values = WsdlAdapter.StringArray("values") ++ ++ comments = WsdlAdapter.StringArray("comments") ++ ++ onChanged = WsdlAdapter.StringArray("onChanged") ++ ++ ++class TableAdapter(WsdlAdapter): ++ adapted_class = Table ++ ++ fields = WsdlAdapter.StringArray("fields") ++ head = WsdlAdapter.StringArray("head") ++ ++ @property ++ def body(self): ++ if hasattr(self.source.body, 'stringArray'): ++ return [row.string ++ for row in self.source.body.stringArray ++ if hasattr(row, "string")] ++ return [] ++ ++ values = WsdlAdapter.Array("values", ChoiceValueAdapter) ++ ++ ++class FieldAdapter(WsdlAdapter): ++ adapted_class = Field ++ ++ choice = WsdlAdapter.StringArray("choice") ++ listvalue = WsdlAdapter.StringArray("listvalue") ++ comments = WsdlAdapter.StringArray("comments") ++ ++ @property ++ def tablevalue(self): ++ return TableAdapter(self.source.tablevalue) ++ ++ ++class GroupFieldAdapter(WsdlAdapter): ++ adapted_class = GroupField ++ ++ fields = WsdlAdapter.Array("fields", FieldAdapter) ++ ++ ++class ViewInfoAdapter(WsdlAdapter): ++ adapted_class = ViewInfo ++ ++ groups = WsdlAdapter.Array("groups", GroupFieldAdapter) ++ ++ ++class ArrayReturnedMessage(WsdlAdapter, Mapping): ++ @classmethod ++ def from_detect(cls, source): ++ if isinstance(source, (list,tuple)): ++ return source ++ else: ++ return source.ReturnedMessage +diff --git core/server/func.py core/server/func.py +index 3bde6e4..76d2645 100644 +--- core/server/func.py ++++ core/server/func.py +@@ -730,6 +730,7 @@ class Action: + result[name]=False + elsePrint(elseMessage) + if all(run_context.values()): ++ self.writeFile() + if self.group_name: + self.startGroup(str(self.group_name)) + self.group_name = None +@@ -1022,14 +1023,16 @@ class CoreWsdl(): + """ write data in file """ + from baseClass import Basic + if not os.path.exists(Basic.pids): +- os.system('mkdir %s' %Basic.pids) +- self.PID_FILE = Basic.pids + '/%d.pid'%self.pid ++ os.mkdir(Basic.pids) ++ pid_file = path.join(Basic.pids, '%d.pid' % self.pid) + try: +- _fc = open(self.PID_FILE,"w") +- pickle.dump(self.process_dict, _fc) +- _fc.close() +- except: +- print _("Failed to read the PID file %s!") %self.PID_FILE ++ with open(pid_file, 'w') as f: ++ d = {'name': self.process_dict['method_name'], ++ 'status': self.process_dict['status']} ++ pickle.dump(d, f) ++ except (IOError, OSError) as e: ++ print str(e) ++ print _("Failed to write the PID file %s!") % pid_file + + def setProgress(self, perc, short_message = None, long_message = None): + try: +diff --git core/server/gen_pid.py core/server/gen_pid.py +index 1e1a731..84c8e1a 100644 +--- core/server/gen_pid.py ++++ core/server/gen_pid.py +@@ -15,7 +15,9 @@ + # limitations under the License. + + import os, pickle, threading ++from os import path + import random ++from calculate.lib.utils.tools import ignore + + from cert_cmd import find_cert_id + +@@ -44,8 +46,12 @@ class CoreWsdl(): + self.glob_progress_dict.pop(pid) + self.glob_table_dict.pop(pid) + self.glob_frame_list.pop(pid) ++ with ignore(OSError): ++ rm_fn = path.join(self.pids, "%d.pid" % pid) ++ if path.exists(rm_fn): ++ os.unlink(rm_fn) + return 0 +- except: ++ except BaseException as e: + return 1 + + # find process id in file processes, 1 - yes, 0 - none +diff --git core/server/methods_func.py core/server/methods_func.py +index d043b60..2d3bb02 100644 +--- core/server/methods_func.py ++++ core/server/methods_func.py +@@ -22,6 +22,7 @@ from calculate.lib.cl_print import color_print + from calculate.lib.cl_lang import setLocalTranslate + setLocalTranslate('cl_core3',sys.modules[__name__]) + from itertools import * ++from api_types import ViewInfoAdapter, ArrayReturnedMessage, FieldAdapter + + colorPrint = color_print() + +@@ -234,6 +235,9 @@ def get_method_argparser(view, args, cl_core = False): + else field.name.upper() + #if ':' in data['metavar']: + # data['metavar'] = field.name.upper() ++ if "choice" in field.type: ++ data['help'] = "%s (%s)" % ( ++ data['help'], _("'list' for display possible values")) + if field.element in ['check']: + data['metavar'] = "ON/OFF" + try: +@@ -358,69 +362,66 @@ def set_table_pwd(client, param_object, field, value): + setattr (param_object, field.name, result) + return param_object + +-def check_result_msg(method_result, view, input_error_dict = {},args=None): +- password_errors = {} +- if hasattr (method_result, 'ReturnedMessage'): +- method_result = method_result.ReturnedMessage + +- if hasattr (view.groups, 'GroupField'): +- groups = view.groups.GroupField ++def display_error(error, args, groups): ++ params_text = '' ++ sys.stdout.write('\r') ++ sys.stdout.flush() ++ list_answer = False ++ if error.type != "commonerror": ++ for group in groups: ++ for field in group.fields: ++ if field.name == error.field: ++ if not args is None: ++ if (getattr(args, field.name) == "list" and ++ "choice" in field.type): ++ list_answer = True ++ params_text += getErrorOnParam(args, field) ++ else: ++ if field.opt.shortopt or field.opt.longopt: ++ params_text += _('Wrong option ') ++ params_text += ' ' + ', '.join( ++ filter(None, [field.opt.shortopt, ++ field.opt.longopt])) + '. %s' ++ if list_answer: ++ colorPrint.printSUCCESS(params_text % error.message) ++ elif error.type != "commonerror": ++ colorPrint.printERROR(params_text % error.message) + else: +- groups = view.groups ++ colorPrint.printWARNING(params_text % error.message) ++ ++ ++def check_result_msg(method_result, view, input_error_dict={}, args=None): ++ password_errors = {} ++ method_result = ArrayReturnedMessage.from_detect(method_result) ++ view = ViewInfoAdapter.from_detect(view) ++ + for error in method_result: + if error.type == 'pwderror': + password_errors[error.field] = error.message + continue + +- params_text = '' +- if error.type != "commonerror": +- for Group in groups: +- if hasattr (Group.fields, 'Field'): +- fields = Group.fields.Field +- else: +- fields = Group.fields +- for field in fields: +- if field.name == error.field: +- if not args is None: +- params_text += getErrorOnParam(args,field) +- else: +- if field.opt.shortopt or field.opt.longopt: +- params_text += _('Wrong option ') +- params_text += ' '+', '.join(filter(None, +- [field.opt.shortopt, field.opt.longopt])) \ +- + '. %s' +- +- sys.stdout.write('\r') +- sys.stdout.flush() +- if error.type != "commonerror": +- colorPrint.printERROR(params_text % error.message) +- else: +- colorPrint.printWARNING(params_text % error.message) ++ display_error(error, args, view.groups) + +- if len(password_errors) < len(method_result): +- return None +- else: ++ # если все ошибки связаны с паролем ++ if len(password_errors) == len(method_result): + if not dict([x for x in input_error_dict.items() \ +- if x not in password_errors.items()]) and \ +- not dict([x for x in password_errors.items() \ +- if x not in input_error_dict.items()]): ++ if x not in password_errors.items()]) and \ ++ not dict([x for x in password_errors.items() \ ++ if x not in input_error_dict.items()]): + return None + return password_errors ++ else: ++ return None ++ + + def get_param_pwd(check_res, view, param_object, client = None, + stdin_passwd=False): +- if hasattr (view.groups, 'GroupField'): +- groups = view.groups.GroupField +- else: +- groups = view.groups ++ view = ViewInfoAdapter.from_detect(view) + for pwd_field in check_res: +- _print (check_res[pwd_field]) +- for Group in groups: +- if hasattr (Group.fields, 'Field'): +- fields = Group.fields.Field +- else: +- fields = Group.fields +- for field in fields: ++ _print(check_res[pwd_field]) ++ for group in view.groups: ++ for field in group.fields: + if field.name == pwd_field: + if field.element == 'table': + value = get_password(getfromstdin=stdin_passwd) +@@ -434,26 +435,16 @@ def get_param_pwd(check_res, view, param_object, client = None, + setattr(param_object, pwd_field, value) + return param_object + +-def collect_object(client, param_object, view, args,wait_thread = None, +- stdin_passwd = False): ++ ++def collect_object(client, param_object, view, args, wait_thread=None, ++ stdin_passwd=False): + """ + Collect Info object by args + """ + steps = None +- if type(view.groups) == list: +- # for local call method +- groups = view.groups +- else: +- groups = view.groups[0] +- for Group in groups: +- if not Group.fields: +- continue +- if type(Group.fields) == list: +- # for local call method +- fields = Group.fields +- else: +- fields = Group.fields[0] +- for field in fields: ++ view = ViewInfoAdapter.from_detect(view) ++ for group in view.groups: ++ for field in group.fields: + if field.uncompatible: + continue + if field.element in ['check', 'check_tristate'] and \ +@@ -659,13 +650,10 @@ def collect_table(field, val_list, client, wait_thread = None, + return listToArrayArray(client, obj_body) + + def collect_obj_body(body, field): +- column = len(field.tablevalue.head) if type(field.tablevalue.head) == list\ +- else len(field.tablevalue.head.string) ++ field = FieldAdapter.from_detect(field) ++ column = len(field.tablevalue.head) + result_table = [] +- if type(field.tablevalue.values) in [list, tuple]: +- ChoiceValue = field.tablevalue.values +- else: +- ChoiceValue = field.tablevalue.values.ChoiceValue ++ ChoiceValue = field.tablevalue.values + for i in range(len(body)): + temp_row = [] + for j in range(column): +@@ -711,7 +699,7 @@ def getErrorOnParam(args,field): + Get errors for param + """ + params_text = "" +- if any("-" in x ++ if any("-" in x + for x in filter(None,(field.opt.longopt,field.opt.shortopt))): + paramName = ', '.join(filter(None, + [field.opt.shortopt, field.opt.longopt])) +@@ -725,6 +713,9 @@ def getErrorOnParam(args,field): + if "need" in field.type: + params_text += \ + _('Error in field \'%s\'. ')%field.label + " %s" ++ elif (getattr(args, field.name) == "list" and ++ "choice" in field.type): ++ params_text += "%s" + else: + params_text += _('Error in parameter ') + params_text += paramName +'. %s' +diff --git core/server/replace_class.py core/server/replace_class.py +index 6e0da47..399814e 100644 +--- core/server/replace_class.py ++++ core/server/replace_class.py +@@ -13,10 +13,12 @@ + # 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. ++import pickle + + import sys + import termios + import os ++from os import path + import re + from fcntl import ioctl + from array import array +@@ -35,9 +37,10 @@ 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 calculate.lib.utils.tools import ignore + + from methods_func import get_method_argparser, collect_object, \ +- check_result_msg, get_param_pwd, _print ++ check_result_msg, get_param_pwd, _print, display_error + from api_types import ViewInfo + from cert_cmd import parse + from methods_func import getErrorOnParam, GotErrorField +@@ -88,9 +91,23 @@ class replaceClass(): + if len(com.__class__.__bases__) > 1 and \ + hasattr(com.__class__.__bases__[1], '__init__'): + com.__class__.__bases__[1].__init__(com) +- self.method_status = 0 if getattr(com, method)(*args_proc) else 1 ++ com.method_name = method_name ++ com.method_status = 1 ++ self.method_status = 0 if getattr(com, method)(*args_proc) else 2 ++ com.method_status = self.method_status ++ self.del_pid_file(os.getpid(), com.clVars) + return 0 + ++ def del_pid_file(self, pid, clVars=None): ++ if clVars: ++ pids = clVars.Get('core.cl_core_pids_path') ++ else: ++ pids = '/tmp' ++ pid_file = path.join(pids, '%d.pid' % pid) ++ with ignore(OSError): ++ if path.exists(pid_file): ++ os.unlink(pid_file) ++ + class Common(CommonMethods): + """ class to interact with the processes """ + reClearTags = re.compile("<.*?>") +@@ -99,6 +116,8 @@ class replaceClass(): + no_questions): + self.pid = 0 + self.Num = 100000 ++ self.method_name = "" ++ self.method_status = 0 + self.color_print = color_print() + + self.no_progress = no_progress +@@ -110,13 +129,29 @@ class replaceClass(): + self.error = [] + self.warning = [] + self.no_questions = no_questions +- self.currentTaskMessage = "" ++ self.current_task_message = "" + self.spinner = None + self.terminal_print = \ + get_terminal_print(self.color_print.defaultPrint) + + def writeFile(self): +- pass ++ """ write data in file """ ++ pid = os.getpid() ++ pids = self.clVars.Get('core.cl_core_pids_path') ++ # пропустить создание файла если идет сборка пакета ++ if self.clVars.Get('cl_ebuild_phase'): ++ return ++ if not os.path.exists(pids): ++ os.mkdir(pids) ++ pid_file = path.join(pids, '%d.pid' % pid) ++ try: ++ with open(pid_file, 'w') as f: ++ d = {'name': self.method_name, ++ 'status': self.method_status} ++ pickle.dump(d, f) ++ except (IOError, OSError) as e: ++ print str(e) ++ print _("Failed to write the PID file %s!") % pid_file + + def setProgress(self, perc, short_message=None, long_message=None): + if self.no_progress: +@@ -338,7 +373,7 @@ class replaceClass(): + self.spinner.stop() + self.spinner = None + self.nextLine() +- self.currentTaskMessage = self.cleanTags(message) ++ self.current_task_message = self.cleanTags(message) + message = self.processTags(message) + self.color_print.printSUCCESS(message, printBR=False) + self.color_print.defaultPrint(" ...") +@@ -379,14 +414,14 @@ class replaceClass(): + self.spinner.stop() + self.spinner = None + self.setProgress(100, progress_message) +- if self.currentTaskMessage: ++ if self.current_task_message: + 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 = "" ++ self.current_task_message = "" + + def displayResult(self, result): + func_map = {"skip": self._printSkip, +@@ -394,10 +429,10 @@ class replaceClass(): + func_map.get(result, self._printOK)() + + def nextLine(self, clearCurrent=True): +- if self.currentTaskMessage: ++ if self.current_task_message: + self.color_print.defaultPrint('\n') + if clearCurrent: +- self.currentTaskMessage = "" ++ self.current_task_message = "" + + def askConfirm(self, message, default="yes"): + if self.no_questions: +@@ -492,10 +527,9 @@ class replaceClass(): + text1 = "%s:" % message + if not twice: + return getpass.getpass(text1) +- if twice: +- text2 = _('Repeat: ') +- pass1 = 'password' +- pass2 = 'repeat' ++ text2 = _('Repeat: ') ++ pass1 = 'password' ++ pass2 = 'repeat' + try: + while pass1 != pass2: + pass1 = getpass.getpass(text1) +@@ -532,13 +566,11 @@ class replaceClass(): + _print = get_terminal_print() + self.printDefault( + _print.foreground(TextState.Colors.WHITE)(message)) +- #self.addMessage(type='startGroup', message=message) + + def endGroup(self): + if self.spinner: + self.spinner.stop() + self.spinner = None +- pass + + + def cout_progress(string=None): +@@ -711,17 +743,6 @@ def call_method(metaObject, args, unknown_args, colorPrint): + if ask.lower() in ['n', 'no']: + colorPrint.printERROR(_('Manually interrupted')) + return None +- #while True: +- # try: +- # ask = raw_input('\n' + _('Run process? (yes/no): ')) +- # except KeyboardInterrupt: +- # ask = 'no' +- # print +- # if ask.lower() in ['n', 'no']: +- # colorPrint.printERROR(_('Manually interrupted')) +- # return None +- # if ask.lower() in ['y', 'yes']: +- # break + + setattr(param_object, 'CheckOnly', False) + try: +@@ -734,13 +755,14 @@ def call_method(metaObject, args, unknown_args, colorPrint): + return None + for ReturnedMessage in method_result: + if ReturnedMessage.type and ReturnedMessage.type != "pid": +- params_text = '' +- for Group in view.groups: +- for field in Group.fields: +- if field.name == ReturnedMessage.field: +- params_text += getErrorOnParam(args, field) +- colorPrint.printERROR('\r' + params_text % \ +- str(ReturnedMessage.message)) ++ display_error(ReturnedMessage, args, view.groups) ++ #params_text = '' ++ #for Group in view.groups: ++ # for field in Group.fields: ++ # if field.name == ReturnedMessage.field: ++ # params_text += getErrorOnParam(args, field) ++ #colorPrint.printERROR('\r' + params_text % \ ++ # str(ReturnedMessage.message)) + return None + return method_result + +@@ -941,15 +963,20 @@ class TableInfo(InformationElement): + 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() ++ try: ++ 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() ++ except Exception as e: ++ import traceback ++ traceback.print_exc() ++ raise + + + class Table(tableReport): +diff --git core/server/sid_pid_file.py core/server/sid_pid_file.py +index 173ed4f..dec11a0 100644 +--- core/server/sid_pid_file.py ++++ core/server/sid_pid_file.py +@@ -15,8 +15,11 @@ + # limitations under the License. + + import os, time ++from os import path + import pickle + from threading import Lock ++from calculate.lib.utils.tools import ignore ++ + + class CoreWsdl () : + def del_sid_pid(self, sid): +@@ -48,7 +51,10 @@ class CoreWsdl () : + time.sleep(0.1) + self.del_pid(list_sid[1]) + # delete process file +- os.unlink(self.pids + '/%d.pid' %list_sid[1]) ++ rm_fn = path.join(self.pids, "%d.pid" % list_sid[1]) ++ if path.exists(rm_fn): ++ with ignore(OSError): ++ os.unlink(rm_fn) + fd.close() + ft.close() + diff --git a/sys-apps/calculate-i18n/Manifest b/sys-apps/calculate-i18n/Manifest index c507fc9..f11287c 100644 --- a/sys-apps/calculate-i18n/Manifest +++ b/sys-apps/calculate-i18n/Manifest @@ -1,3 +1,4 @@ +AUX calculate-i18n-3.2.0_alpha6-r1.patch 2028 SHA256 b9e8577bdd11aa5e37e276bfca165816456ac43407bd509043b23740cc5e4d60 SHA512 b66a449e3b6d2f44f91b920c33e3f69d12d9659eb9973653babe5a15e5fc7c4d6ff5774957c231fdbcb435faf7042b327deb5f7c968d0f75ae412cd5938da66d WHIRLPOOL 14fd8b210ef316b82e9993320e014a79c4f263b48124ff344c87cd22f72285070667063ea6a5a299191e50f38e2e378272f80daffa93e0075ab00d936274b775 DIST calculate-i18n-3.2.0_alpha1.tar.bz2 61231 SHA256 7106c79fd6384acbcfe97f46d1334cae25a63b9c91731be963411df3223e5bdb SHA512 1653a8b65e9a38ba795fba1045be5c458a6f195f58edd6de950cbea493a0e1ae5b76ed9dd4476dc2327efde39c578761f8d1792db2957867a1ce588aa9597cf0 WHIRLPOOL 46f088ecff5f03dcc27394fb725ab82e25be09eb87f1d990a3989bbbba7aa426ff6e1eb87b1dcdd620df3aba85874cb6061dad2af361b9c61e9c8aac732a3590 DIST calculate-i18n-3.2.0_alpha2.tar.bz2 34970 SHA256 c71c744ab1d7283be43e3d598bcf08fe54027ce71ce26d3551b070a50fba41c0 SHA512 d8cff0a3ce4ad4f1cfcf7bce396f27f1498d8a8e54becad8404825c01cb91438d7888bd590a72bb6da5a87d1988a8d6fc7e7c5fc72346ecdf0dbffe6cec0b5d1 WHIRLPOOL 02b1170764e4f281b1f6a2cdc5cb9642e1f6fb49effa612466b97f2a0eab4e0c8c20dcbd5a5a89501effa696fef6a8f8e5ed559854a15fd1794caf11349d3bbb DIST calculate-i18n-3.2.0_alpha3.tar.bz2 64607 SHA256 c50117023a7f6d15fe1709df53ace756b442a8e56264c0995eaa6461193426c4 SHA512 e8c3de330a653949e769a1334529e349699245be90a9e30000999bf81e7f9ff2769e7df38220b496559fc1d3c42156b6c70fa0880e7b9c1334a5efe67877eb5e WHIRLPOOL 91954eca39d6faa72fa8423d7216ae8ab4482e91e4a7e5e8026cc76a4421e707700d6b5d16f7460d533a3447cccb0a743a70747ac5da6dc5cb7a34c8e2cc2bcb @@ -9,5 +10,6 @@ EBUILD calculate-i18n-3.2.0_alpha2.ebuild 589 SHA256 b45f5619cab0bb1bb706d601da1 EBUILD calculate-i18n-3.2.0_alpha3.ebuild 589 SHA256 8526833ac80c87e8731602895c4aa859fdbaa365e6de325b4f4b259707f3e62c SHA512 4ca589da2909d64711317b1cf7f62c4ab48027e597b1a4ec5a206d967d3c49a4c791d18d4d0e1bed4c0bb96b88cd9ec800e97ae5476fbb5b69b71073e49f56f3 WHIRLPOOL 02da6df2104aea7c94bf305f4c31a2a62399e645e079abd8df256b3c2a1f6e787d8b3a6aed41284de9b08a78dccde842fc2b125b8b22038c3fef0e397001e513 EBUILD calculate-i18n-3.2.0_alpha4.ebuild 589 SHA256 00394ac81ce10df46006aecda247d2af779009b8cae139a2713d477a3e6e67cb SHA512 de7af88fb51cd4e03d69c3fe8559da69f5289fd77ac7d2467ba87af01c8ccd9a3a71ad0c661494ec36033c5464d8612152e425f7e9506cde9dfdedaadbaf0ec8 WHIRLPOOL fa26f563e2f424a933baa9ae8831503a24985f1237d029770515fee592ca46ece05582f59b3f0bcc2f3229a87569b0798df84bb257ea611ee365ed51a537fbd8 EBUILD calculate-i18n-3.2.0_alpha5.ebuild 589 SHA256 e44ffb1768bfda4e62d27da0e92469188fb8be92c2d6cba27d18353054afe0cb SHA512 0648528f8ec9ec119582687175f1177cc44e4f9843e6c8b17c522f90365fb5fadc9ad8994c728f95580596fbc90faa5094e6accb76d6ae93eb994c2896bbbdb2 WHIRLPOOL 27dc9c92a261e11c6bbfaa9bda217d0ef6266c87ebbf4254733350a36018125611c7b171fd306419d9571a9f47482ed91da86c9eb87c6e63a9358f8b895e91a8 +EBUILD calculate-i18n-3.2.0_alpha6-r1.ebuild 731 SHA256 be88afd34ad405aa054f0e2d571272005abcdb0fae565aee4831170cb8da2826 SHA512 f23bdf7f67ca241abcfc287a86d322119a9b34cbc733658b9f95d3836d669849eaed3b0704c2f22a50b43c14974bc33bc94837b4be60c073f54283d0a819f09b WHIRLPOOL 8bd173141576e8add3622d794175db07cd8edae447d6d95bff10fc6276c65db2c83f9dd4045feaffd019daf2d33d8055a108fd5ee39e57613753ffe328750369 EBUILD calculate-i18n-3.2.0_alpha6.ebuild 589 SHA256 4f8fa37f38584c2cf677381de4eb0b29d950e267092021b261646fc399c9ced0 SHA512 38ae5bd8627cef3b67177705f1f03d379161cca364de0adc8bcffb60616f234a45ffc1eb62b56966a4b4de39f75c6d7055b51bcaa05c4460e4bfbc546fc6fbf7 WHIRLPOOL ba058adfe7ce88bd7de4286e4cdeaa306cf4ccc560ffcc170f503e13e2bd10415b8325445ee4b7f975425142525030193802f2a6dddf18d5af9c8bd66768fd52 EBUILD calculate-i18n-3.2.9999.ebuild 583 SHA256 aa60c513b0f672aa9618bfd8099fefaf49fa5ef9b24ee2645356da69563032fa SHA512 14b87ddb0f910e1b983ef465efdc56347abe01d4cdc11d6d81d593a2e65dcba1b79357d37952d7aa7f800fad8d30592db2e337d0fc6ca9807bdba618aff48528 WHIRLPOOL 14a1c4f1ef646aee28934e820763bd149e37860cce1ee34ac2229742980ec178fc43ba284b59a2f71a740cfa8e48ff7658a613b03eb0f84d4a10cefdd65450da diff --git a/sys-apps/calculate-i18n/calculate-i18n-3.2.0_alpha6-r1.ebuild b/sys-apps/calculate-i18n/calculate-i18n-3.2.0_alpha6-r1.ebuild new file mode 100644 index 0000000..14de58d --- /dev/null +++ b/sys-apps/calculate-i18n/calculate-i18n-3.2.0_alpha6-r1.ebuild @@ -0,0 +1,31 @@ +# 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_alpha6" + +DEPEND="sys-devel/gettext + ${RDEPEND}" + +src_unpack() { + unpack "${A}" + cd "${S}" + + # apply revision changes + epatch "${FILESDIR}/calculate-i18n-3.2.0_alpha6-r1.patch" +} diff --git a/sys-apps/calculate-i18n/files/calculate-i18n-3.2.0_alpha6-r1.patch b/sys-apps/calculate-i18n/files/calculate-i18n-3.2.0_alpha6-r1.patch new file mode 100644 index 0000000..f0b3b42 --- /dev/null +++ b/sys-apps/calculate-i18n/files/calculate-i18n-3.2.0_alpha6-r1.patch @@ -0,0 +1,38 @@ +diff --git ru/cl_lib3.po ru/cl_lib3.po +index d804a79..a26b3e8 100644 +--- ru/cl_lib3.po ++++ ru/cl_lib3.po +@@ -352,17 +352,17 @@ msgstr "Попытка перезаписать переменную тольк + msgid "The value of variable '{varname}' must be integer" + msgstr "Значение для {varname} должно быть целым числом" + +-msgid "Value for variable '{varname}' may be '{vartype}' only" +-msgstr "Значение для {varname} может быть только '{vartype}'" ++msgid "Value for variable '{varname}' may be {vartype} only" ++msgstr "Значение для {varname} может быть только {vartype}" + +-msgid "Values for variable '{varname}' may be '{vartype}' only" +-msgstr "Значение для '{varname}' может быть только '{vartype}'" ++msgid "Values for variable '{varname}' may be {vartype} only" ++msgstr "Значение для '{varname}' может быть только {vartype}" + + msgid "Source variable %s does not contain a list" + msgstr "Исходная переменная %s не содержит список" + +-msgid "Value for {varname} may be '{vartype}' only" +-msgstr "Значение для {varname} может быть только '{vartype}'" ++msgid "Value for {varname} may be {vartype} only" ++msgstr "Значение для {varname} может быть только {vartype}" + + msgid "Wrong entry '{entry}' for table variable '{varname}'" + msgstr "Неправильная запись '{entry}' для табличной переменной '{varname}'" +@@ -683,3 +683,9 @@ msgstr "Необходимо указать пользователя" + + msgid "User %s does not exist" + msgstr "Пользователь %s не существует" ++ ++msgid "Value for variable '{varname}' may be {vartype}" ++msgstr "Значение для {varname} может быть {vartype}" ++ ++msgid "Values for variable '{varname}' may be {vartype}" ++msgstr "Значения для {varname} может быть {vartype}" diff --git a/sys-apps/calculate-lib/Manifest b/sys-apps/calculate-lib/Manifest index ec1b8d9..ed08749 100644 --- a/sys-apps/calculate-lib/Manifest +++ b/sys-apps/calculate-lib/Manifest @@ -3,6 +3,7 @@ AUX calculate-lib-3.2.0_alpha4-r1.patch 6748 SHA256 236837ce239f3f320f6aa1be194b AUX calculate-lib-3.2.0_alpha4-r2.patch 7413 SHA256 9e49d514d21f3305cf4ad5052f3c2ab03e2afeed14a24a6ce952e4ebb689142a SHA512 cf84c413dfab87accfa47cc0aac43ecde2b3d014e2b1b23f9c547067a90c0d1cf3b3c287ddfa6564c7aa160211bd91e110c3af34daa9187a07c6cb1811e8ebf6 WHIRLPOOL dd485b0cfc6b45eb6eabd1ca056216a6374ea596c71d184e1ad2306001082954dd09d38415f7729e25527b24345ee7105d83523f01dd500723ec74898ec8040b AUX calculate-lib-3.2.0_alpha4-r3.patch 7981 SHA256 36b903823d4d2020518beccaa00ef26eeb4dba56fca2d90aeaede9d1e6063dce SHA512 8f91d8f45d505a1ba646152fb0471083bc138162aae8ad48686cb72d20b3e4544fcab3817e5b1e19561813892c8acee162cfb6662886181f872aaf7ead4b9002 WHIRLPOOL 77f16da7c30008a2ca57a91ffd92345204c53f294a3b01a73e29c8bf2abe6735d3010143231b846d57c66f941e4d2a4cade6187fe203e4d415ee681d1d6efe39 AUX calculate-lib-3.2.0_alpha4-r4.patch 8366 SHA256 dc0315ac1befc048c883bae6184ff29d9c500b518c21637253a4a5931e398bd8 SHA512 a090bb31503906e44248bdf67925a1f1410c008fbc48538bd9ca3ea3abe23465c0701c5cabd2986a023ca95b6b9ccac46f89acf2946e82162fa1001ccaaa6f0a WHIRLPOOL 9060bf90752afd6ac153876baad960ba9ab86b360738d98aa3a9d9718bc6abd208ce3474f9f11680b1ffcb3327a8e1aa4c50f928531437163829dacb08e8ecb0 +AUX calculate-lib-3.2.0_alpha6-r1.patch 4151 SHA256 4070948bf227f5fb60dc89f1794d9dcf15a9fce48a5b9b5318d9223d71364da7 SHA512 4dbfa5a48c24556979a2a73b184eecc976b8738cc05bbffccfa2792a992e9d21ed1f37bbe21e4401eb2c92678f90b692e30b25119473908b3585a2fd226f74cd WHIRLPOOL bff16327876d77abc7b37006ff06d44f17aeb8de1043fc86c59b76833c97a5de52b73a966e3174cc5ff57d347c829d3f219767855458a5e46cb4b948da7be5d8 DIST calculate-lib-3.2.0_alpha1.tar.bz2 121698 SHA256 a1c605690dbb8c9fa6bcccd1a3bd1ff6500e4566e9d9a8ddc1ef4967ea38fbb8 SHA512 30196b7cba04f218c2e3105951fdaaa1a8c916d5b2265a4a09d1cce7b317f7ec501cd2edb70ecb41f25a1ee4ecfa89e23e3255a4adbfbf3ba7715c384171d0a3 WHIRLPOOL 0e9525e2b728a98c02b0a11f70dc13fb3922fd7e5ac01b168d9aeaa8c2544707533a1ecbd6aea4dd28a7836288efd8a8393216a68176c32615af8417e1acd4fc DIST calculate-lib-3.2.0_alpha2.tar.bz2 131437 SHA256 726e062234ea0d668c1f05c8ab9a3093d25faf2825f028a0879339471d80de97 SHA512 9f7d1de80ac08b15b575ffb396ac01fbbf94cb6d57960854175256274039f83b619849d4930830682d110df7d28a789ac2b23ea5c3e5fb73dd06a48b4c28e455 WHIRLPOOL 2b5feb2d7aa97861ad2691056ecd8a8f43fc837b4f95e83b23780f53db8285950cc3a029acd83b6f287ef76d29a29c3fe896c920c633b81a235c5d124f650e24 DIST calculate-lib-3.2.0_alpha3.tar.bz2 131427 SHA256 17851382ad90e511132428fdbc3e4736ad78e6add64174b863f4470e86ad9ebc SHA512 46f2c2d9e31e88f215037935ac8b0dc0086ed98663a2174e425f77d3b9256345837c7803ae3c55dbd9ce9d38609d776b3058a128b1d12f621e64b4a2fe92d606 WHIRLPOOL 90d81f3adbda01b99b3b09f1cc1fd13d87580b0586c7a28e93968ceabf79eee7328c6fd272237d13985d9ebac2e7f0645f9b101a326b6105b36ea19c5f0e561f @@ -19,5 +20,6 @@ EBUILD calculate-lib-3.2.0_alpha4-r3.ebuild 831 SHA256 73b2a4f12533a0433348a2631 EBUILD calculate-lib-3.2.0_alpha4-r4.ebuild 831 SHA256 386989bbe8d25706366a6e4692abd29a343779d95103ba933001b0169121f24a SHA512 51929ff7c30f2fa06e7c7cbbcd017f59621dbc7e173e0122cd888bb37912d9736847cc414dc993085695cc90028aa17e3b5e4dab2d12f4dc9614cfeed0062ef1 WHIRLPOOL 2a40557669bfdc8e3892947f272e83e90943bdd7db955f5f9f890bc638ee235c09622c3f5e48a25971b1ab8d6f88f761de02d144d5bb4e7bf991ff0a53280cf5 EBUILD calculate-lib-3.2.0_alpha4.ebuild 690 SHA256 c89c29f5de3f70146e98f15035366506933f03e8a5066b1ad55aeccbebdeae2c SHA512 a7277c2e5fa64a5e5840be7fc8d3df9a31f41926386c5fe6a9bed31eeed6321af5881c218d9ce7eeb12aee518edb682b438e10397dcb815cc63645100430e43e WHIRLPOOL 8f19e4d46381e26fec81e20fa35599f4658b3891d6372c921a8b1354ad3b1821ea9c78f71caebf54610e0b5aacfb6e6ded018e155e1979322406a0ac1e823d09 EBUILD calculate-lib-3.2.0_alpha5.ebuild 690 SHA256 c89c29f5de3f70146e98f15035366506933f03e8a5066b1ad55aeccbebdeae2c SHA512 a7277c2e5fa64a5e5840be7fc8d3df9a31f41926386c5fe6a9bed31eeed6321af5881c218d9ce7eeb12aee518edb682b438e10397dcb815cc63645100430e43e WHIRLPOOL 8f19e4d46381e26fec81e20fa35599f4658b3891d6372c921a8b1354ad3b1821ea9c78f71caebf54610e0b5aacfb6e6ded018e155e1979322406a0ac1e823d09 +EBUILD calculate-lib-3.2.0_alpha6-r1.ebuild 831 SHA256 6ef8bf48d4fc1b2210c0940aa8300eef928a381e86eb90fff1e7c0862dba182a SHA512 1582bbf375bc8c5f10aa65c18aa7ab886d84cafe991ae799483c10a5025a5b4bd12b58f5a1d172e425e542d595951c495d80417782b321b8c2efaca5d697c1e1 WHIRLPOOL 43fe9b18cf7669b6869dd6ae94f75ab40affdb10993cfc50437a6b6bed06bdf20bbb5a8c663c33a557e5a3d78f60ee5a272458b74dc988ced56945d7befa67d6 EBUILD calculate-lib-3.2.0_alpha6.ebuild 690 SHA256 c89c29f5de3f70146e98f15035366506933f03e8a5066b1ad55aeccbebdeae2c SHA512 a7277c2e5fa64a5e5840be7fc8d3df9a31f41926386c5fe6a9bed31eeed6321af5881c218d9ce7eeb12aee518edb682b438e10397dcb815cc63645100430e43e WHIRLPOOL 8f19e4d46381e26fec81e20fa35599f4658b3891d6372c921a8b1354ad3b1821ea9c78f71caebf54610e0b5aacfb6e6ded018e155e1979322406a0ac1e823d09 EBUILD calculate-lib-3.2.9999.ebuild 708 SHA256 a1d64b7f014831bf6b0a38928d53cb55758b7a12e5f3e98fffd28025ffacbce1 SHA512 3873859a791941d421e2338b437521955da383ce986408f1a951305e2dd75a1a4f771c9ec2caa096c5c8ea6a1776d6d0ed99e025ffa786ba029cafdbadfa439b WHIRLPOOL 5ac1a10b53f810ab527a0ebe52bc87e8397e61375cf6e0acbed89d8f6b8385e72bf234e0fdce479c3a3f1652bb6e520710ce9356750a97d644c0db0a33f6facb diff --git a/sys-apps/calculate-lib/calculate-lib-3.2.0_alpha6-r1.ebuild b/sys-apps/calculate-lib/calculate-lib-3.2.0_alpha6-r1.ebuild new file mode 100644 index 0000000..e3b2c33 --- /dev/null +++ b/sys-apps/calculate-lib/calculate-lib-3.2.0_alpha6-r1.ebuild @@ -0,0 +1,36 @@ +# 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_alpha6-r1.patch" +} diff --git a/sys-apps/calculate-lib/files/calculate-lib-3.2.0_alpha6-r1.patch b/sys-apps/calculate-lib/files/calculate-lib-3.2.0_alpha6-r1.patch new file mode 100644 index 0000000..386f518 --- /dev/null +++ b/sys-apps/calculate-lib/files/calculate-lib-3.2.0_alpha6-r1.patch @@ -0,0 +1,84 @@ +diff --git calculate/lib/datavars.py calculate/lib/datavars.py +index b5f2d33..905f889 100644 +--- calculate/lib/datavars.py ++++ calculate/lib/datavars.py +@@ -394,13 +394,13 @@ class Variable: + if "list" in self.type: + if not type(value) in (list,tuple): + raise VariableError( +- _("Value for variable '{varname}' may be '{vartype}' only").format( ++ _("Value for variable '{varname}' may be {vartype} only").format( + varname=self.label or self.name, + vartype="list")) +- error = _("Values for variable '{varname}' may be '{vartype}' only") ++ error = _("Values for variable '{varname}' may be {vartype} only") + else: + value = repeat(value,1) +- error = _("Value for variable '{varname}' may be '{vartype}' only") ++ error = _("Value for variable '{varname}' may be {vartype} only") + if "string" in self.type: + value, valuecopy = tee(value,2) + for v in (x for x in valuecopy if not type(x) in (str,unicode)): +@@ -410,7 +410,7 @@ class Variable: + return + if "choice" in self.type: + choiceVal = self.choice() +- tipChoice = map(lambda x:'"%s"(%s)'%(x[1],x[0]) \ ++ tipChoice = map(lambda x:'"%s" [%s]'%(x[1],x[0]) \ + if type(x) in (list,tuple) else str(x), choiceVal) + if choiceVal and type(choiceVal[0]) in (tuple,list): + choiceVal = [x[0] for x in choiceVal] +@@ -418,10 +418,19 @@ class Variable: + value = repeat(value,1) + for recval in value: + for val in recval: ++ name = self.label or self.name ++ if val == "list" and "choice" in self.type: ++ if "edit" in self.type: ++ if "list" in self.type: ++ error = _("Values for variable '{varname}' may " ++ "be {vartype}") ++ else: ++ error = _("Value for variable '{varname}' may be " ++ "{vartype}") ++ self.raiseWrongChoice(name, tipChoice, val, error) + if "choice" in self.type and not "choiceedit" in self.type: + if choiceVal and val and not val in choiceVal or \ + val is None: +- name = self.label or self.name + if not choiceVal: + self.raiseNothingValue() + self.raiseWrongChoice(name,tipChoice,val,error) +diff --git calculate/lib/utils/text.py calculate/lib/utils/text.py +index 2387d92..af375b2 100644 +--- calculate/lib/utils/text.py ++++ calculate/lib/utils/text.py +@@ -377,7 +377,7 @@ def formatListOr(lst): + """Convert list to string like this: [1,2,3] -> 1,2 or 3""" + lststr = map(lambda x:str(x),lst) + return (" %s "%_("or")).join(filter(lambda x:x, +- [",".join(map(lambda x:x or "''",lststr[:-1])), ++ [", ".join(map(lambda x:x or "''",lststr[:-1])), + "".join(lststr[-1:])])) + + def getTerminalSize(): +diff --git calculate/lib/variables/env.py calculate/lib/variables/env.py +index 87d43cc..f35e3f7 100644 +--- calculate/lib/variables/env.py ++++ calculate/lib/variables/env.py +@@ -364,10 +364,11 @@ class VariableClTemplatesLocate(Variable): + metavalue = "TEMPLATES" + untrusted = True + +- descriptionMap = {'overlay':_('Overlay templates'), +- 'local':_('Local templates'), +- 'remote':_('Remote templates'), +- 'clt':_('clt templates')} ++ descriptionMap = {'overlay': _('Overlay templates'), ++ 'local': _('Local templates'), ++ 'distro': _('Distributive templates'), ++ 'remote': _('Remote templates'), ++ 'clt': _('clt templates')} + + def init(self): + self.label = _("Templates location") diff --git a/sys-apps/calculate-utilities/Manifest b/sys-apps/calculate-utilities/Manifest index de52ada..b877108 100644 --- a/sys-apps/calculate-utilities/Manifest +++ b/sys-apps/calculate-utilities/Manifest @@ -18,5 +18,6 @@ EBUILD calculate-utilities-3.2.0_alpha5-r3.ebuild 821 SHA256 c0965deeb8bfeed1af8 EBUILD calculate-utilities-3.2.0_alpha5-r4.ebuild 824 SHA256 f1eab1bb8ad2f7b267e743cba39e4e183814ef0f96c7b72136aa9bd9e3961247 SHA512 48c8a7777ca47cde51f8a9accef7b1b35aa971be612582889f80c712dc079c1a0bdd0c63749b35457cb722de1e6cc47f8595c87a595cce4b26ddc5e01aaf241f WHIRLPOOL cfac6cee9308f941feea1f2f65d2d4665fcf2e7c80749d352a9507d79e5631551803c02dec6be8e43cca117d6bbddeb681743fdce2f8891c67e00f2b7dd42a34 EBUILD calculate-utilities-3.2.0_alpha5-r5.ebuild 824 SHA256 8e5e3fe8b0d4fc0036663d6f7c502509cfbf77ce456b4288ca8f7de6232f66e9 SHA512 27bb630f3c93a00838f01402a7c36cb2e126bc79a0e91b7c38116915f70388fc5aa8cf37dcfedd0142aeff3beb74929b3f010e4d0c0b49bf494ad9ca42bb8963 WHIRLPOOL f339925adc1067f7fd68898dbf9a9c356192140ce24d2497c347714e0d9fdf1dbf5cc536b26377b65e07dd2a5c7bc53d88aa69ce35d896b0be703d2a6c8344a2 EBUILD calculate-utilities-3.2.0_alpha5.ebuild 812 SHA256 63daca77ef430fde9004129bc823f23db03d55d1da05f06a6956d5492658cefa SHA512 0dd86877552a553982a5693f5bc47606b66f15974693cb6525dd8d61a4d6e4f8d27cb7dfda19b567329deec1515095f79c7ef55dfa0d4eef87d90c9d5b9b1db3 WHIRLPOOL 2cf662e15e5a0be84ccf5f3a32ccd87e56bd07bdff938bb188c0097a7fd1a88252799e5974019c0175bb1d04b374d5b78e444d69371dc8b5655e85e858bb5690 +EBUILD calculate-utilities-3.2.0_alpha6-r1.ebuild 827 SHA256 943e1949dec30c2f0ffd5a7cd065c8101ee6e999acc09d2ebd256f67b44b13bb SHA512 a9fede957dd87532feac22f631935b2ee6933541e8b589abe892ec45960a09063b9b0009298fccb346ab74dbfd6d5889d13f9fbfe4a42b56ec086e7140d12bad WHIRLPOOL c75eea5fc5d82a42615346dbc72664dfec75dbf87ab61b2ff3cb2bbf15ae78634befa815aed95f09ae00e268b618e966815a87e309128777b3455ac08e793e0c EBUILD calculate-utilities-3.2.0_alpha6.ebuild 812 SHA256 21f5c205fbb62622da8c262be1be8f3e5d7da7b64e3c93c7b33ca04693452490 SHA512 025b503372989e498fc6b50609d3ebbf13f3376b8e66c5123e3dcebeb0722ff586212c08cf085ee9bd02e215c7ac03d9876b00f73ff1f636a14a1f5d146c3869 WHIRLPOOL 259a86930a618b530515322cf73a4cb0ab8f16a44f8531ae478f30173e1f376272afbdd3b80c6e195e65cbdf10ec19544eae990e262726a51097f01650b5d1cb EBUILD calculate-utilities-3.2.9999.ebuild 800 SHA256 acbb7a4e34387baa1ade9bf97637972fbfc97afa56367381d622198b5237e983 SHA512 9e0c74eb499157b6d3ace20d7e9da630660e46b74a6d575e222e1638c87f85660635187489b9312a45f193780c301d87c1dbb9a0f60414e178e8f54080c71ffd WHIRLPOOL 9b56f590f36d29d3518c66c453f97b14d083e36b62adb70a8916ae4e30b527431602a9edd40d703e5cb4296a01f8c982157b602651ee57a9c0ddb7a4c6aa2fe1 diff --git a/sys-apps/calculate-utilities/calculate-utilities-3.2.0_alpha6-r1.ebuild b/sys-apps/calculate-utilities/calculate-utilities-3.2.0_alpha6-r1.ebuild new file mode 100644 index 0000000..df5a473 --- /dev/null +++ b/sys-apps/calculate-utilities/calculate-utilities-3.2.0_alpha6-r1.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +DESCRIPTION="Calculate Utilities meta package" +HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2" +SRC_URI="" + +LICENSE="Apache-2.0" +SLOT="3" +KEYWORDS="amd64 x86" +IUSE="cl_consolegui cl_client cl_desktop cl_console" + +RDEPEND="${RDEPEND} + =sys-apps/calculate-install-3.2.0_alpha6 + =sys-apps/calculate-i18n-3.2.0_alpha6-r1 + =sys-apps/calculate-lib-3.2.0_alpha6-r1 + =sys-apps/calculate-core-3.2.0_alpha6-r1 + =sys-apps/calculate-update-3.2.0_alpha6 + cl_client? ( =sys-apps/calculate-client-3.2.0_alpha6-r1 ) + cl_desktop? ( =sys-apps/calculate-desktop-3.2.0_alpha6 ) + cl_consolegui? ( =sys-apps/calculate-console-gui-3.2.0_alpha6 ) + cl_console? ( =sys-apps/calculate-console-3.2.0_alpha6-r1 ) +"