diff --git a/sys-apps/calculate-console/files/calculate-console-3.2.0_alpha4-r1.patch b/sys-apps/calculate-console/files/calculate-console-3.2.0_alpha4-r1.patch new file mode 100644 index 0000000..f05b1f8 --- /dev/null +++ b/sys-apps/calculate-console/files/calculate-console-3.2.0_alpha4-r1.patch @@ -0,0 +1,152 @@ +diff --git console/application/function.py console/application/function.py +index 0e6f548..77968b5 100644 +--- console/application/function.py ++++ console/application/function.py +@@ -21,10 +21,12 @@ import termios + import subprocess + from OpenSSL import crypto + import shlex ++from calculate.core.server.func import shortTraceback + from calculate.lib.utils.colortext import get_terminal_print + from sudsds import MethodNotFound + from calculate.core.server.cert_cmd import getHwAddr, getIpLocal +-from calculate.core.server.replace_class import printTable,Methods ++from calculate.core.server.replace_class import (printTable, Methods, ++ print_brief_group) + + from calculate.core.client.progressbar import Bar,Percentage,ETA,ProgressBar + from calculate.lib.cl_lang import setLocalTranslate +@@ -97,133 +99,6 @@ def get_ip_mac_type(client_type = None): + results.append ('console') + return results + +-def print_brief_group(Fields, group_name): +- print_group_flag = False +-# if group_name: +-# _print ('\b'+group_name) +- uncompatible_count = 0 +- for field in Fields: +- if field.uncompatible: +- uncompatible_count += 1 +- continue +- if field.element in ['input', 'openfile']: +- value = field.value if field.value else '' +- if not print_group_flag: +- _print ('\b'+group_name) +- print_group_flag = True +- colorPrint._printSUCCESS('%s: %s' %(field.label, value)) +- +- elif field.element in ['combo', 'comboEdit', 'radio', 'file']: +- if hasattr (field.comments, 'string') and field.value in \ +- field.choice.string: +- value = map(lambda x: field.comments.string[x] \ +- if len(field.comments.string) > x \ +- else field.choice.string[x], +- map(lambda x: field.choice.string.index(x), \ +- [field.value])) +- value = ', '.join(value) +- else: +- value = field.value if field.value else '' +- if not print_group_flag: +- _print ('\b'+group_name) +- print_group_flag = True +- colorPrint._printSUCCESS('%s: %s' %(field.label, value)) +- +- elif field.element in ['multichoice', 'multichoice_add',\ +- 'selecttable', 'selecttable_add']: +- if hasattr (field.comments, 'string') and \ +- hasattr (field.listvalue, 'string'): +- value = map(lambda x: field.comments.string[x] \ +- if len(field.comments.string) > x \ +- else field.choice.string[x], +- map(lambda x: field.choice.string.index(x), \ +- field.listvalue.string)) +- value = ', '.join(value) +- elif hasattr (field.listvalue, 'string'): +- value = ', '.join(field.listvalue.string) +- else: +- value = field.value if field.value else '' +- if not print_group_flag: +- _print ('\b'+group_name) +- print_group_flag = True +- colorPrint._printSUCCESS('%s: %s' %(field.label, value)) +- +-# elif field.element == 'label': +-# print field.label +- +- elif field.element == 'error': +- if not print_group_flag: +- _print ('\b'+group_name) +- print_group_flag = True +- colorPrint.printERROR(field.label) +- +- elif field.element in ['check', 'check_tristate']: +- if field.value == 'on': +- value = _('yes') +- elif field.value == 'off': +- value = _('no') +- elif field.value == 'auto': +- value = _('auto') +- else: +- value = field.value +- if not print_group_flag: +- _print ('\b'+group_name) +- print_group_flag = True +- colorPrint._printSUCCESS('%s: %s' %(field.label, value)) +- +- elif field.element == 'table' and field.type != 'steps': +- if hasattr (field.tablevalue.head, 'string'): +- head = field.tablevalue.head.string +- else: head = None +- +- body = [] +- if hasattr (field.tablevalue.body, 'stringArray'): +- for row in field.tablevalue.body.stringArray: +- if hasattr(row, 'string'): +- body.append(row.string) +- else: body = [[]] +- +- # if empty table +- if not filter (None, map(lambda x: x, body)): +- body = [['']*len(head)] +- res = printTable(body, head) +- sys.stdout.flush() +- sys.stdout.write(res) +- continue +- +- ChoiceValue = field.tablevalue.values.ChoiceValue +- for row in xrange(len(ChoiceValue)): +- if ChoiceValue[row].typefield in ['check', 'check_tristate']: +- for i in xrange(len(body)): +- if body[i][row] == 'on': +- body[i][row] = _('yes') +- if body[i][row] == 'off': +- body[i][row] = _('no') +- if body[i][row] == 'auto': +- body[i][row] = _('auto') +- if ChoiceValue[row].typefield == 'password': +- for i in xrange(len(body)): +- if body[i][row]: +- body[i][row] = '***' +- +- data = [] +- for body_row in body: +- data.append(map(lambda x: x if x else '', body_row)) +- +- if not print_group_flag: +- _print ('\b'+group_name) +- print_group_flag = True +- colorPrint._printSUCCESS('%s: ' %(field.label)) +- res = printTable(data, head) +- sys.stdout.write(res+"\n") +- sys.stdout.flush() +- +- else: +- uncompatible_count += 1 +- +-# if uncompatible_count == len (Fields) and group_name: +-# colorPrint._printSUCCESS(_('Not used')) +- + def print_brief(view, brief_label): + for Group in view.groups.GroupField: + if Group.name: diff --git a/sys-apps/calculate-core/Manifest b/sys-apps/calculate-core/Manifest index dee67d1..7162c55 100644 --- a/sys-apps/calculate-core/Manifest +++ b/sys-apps/calculate-core/Manifest @@ -1,4 +1,5 @@ AUX calculate-core-3.2.0_alpha1-r1.patch 3909 SHA256 95338af9088ff7a8b535836c542c73aaaaeda2ae51c4fc070dee64ca015d65fe SHA512 743627d58a4c0c1ec0b57753fa5df320bbdec9102d4e6e3df63abe4e55323e4fac2de26ea22f69cb348f50070618eff5fb9b6848df0679bf73260a238507f4e0 WHIRLPOOL b186232ae83f4b40156bae4a0a66e1cde6b25768a329f7d7144cf4a4c6eee92e11319849cacb0ec2689a1f9801a96c1ae621505143c6bbc6979dd23c6fb4cade +AUX calculate-core-3.2.0_alpha4-r1.patch 16117 SHA256 cf06430288a9074388dfb92dcfc930691819a8233023b6560256a0da4086c52b SHA512 b6705837520166f21f3b920e110e1a653039a9e964fec333dc46fce36c4d1a55b6c2096f88c8a932f7105cfd2e517d482623217deeec12079f49eab16384b555 WHIRLPOOL 60ce776de8a1b3e8187e81c63b89551a3db3ab1baaac1394f9537f639ee01170be9d85b39a5f0b75df03ddb8c90bcdc244af23c9f4c1468b9322db06df0628f3 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 @@ -7,5 +8,6 @@ EBUILD calculate-core-3.2.0_alpha1-r1.ebuild 1273 SHA256 63976ef94c626d3f9103514 EBUILD calculate-core-3.2.0_alpha1.ebuild 1131 SHA256 08d7216cdc3618ae7a73f5cbce36a32d5e6aad3dbcbe4fd2eb94e5232dbe7d30 SHA512 dbe84720706bfda967d1c7758b476b83187c226894766b81c1e76012d20791d06bceefbccb5fcd92c884c7f6bd601f8e81d4af5caeb4f3adc58fab392bbd3108 WHIRLPOOL 415f3aab9b586620f68c4909d387267848053adc686fc675f9a666d8f19b93844af07d9402c2a27348f7c67b8e23f76485c5ed65b122129e064ff1bcc0c85030 EBUILD calculate-core-3.2.0_alpha2.ebuild 1129 SHA256 0778b2b2cfa7d8a3b915d3db8ad6bfa3de60d3f268732e3488182818adc05983 SHA512 b6f6da14537a3fc3ebe12426b20080b5b19f884b387527bec8511bdabdcef4b2cac4fda48a3847dfbb2787b0ba8e19762b9b842cf1b779958467948ccf674c43 WHIRLPOOL 53158020860e2be6691e1aafb2f47fa74ae120d8408c728af305c4f50e47d24817581efa3b82bfd7e36c5a41166cfae3d677344a3f92b91b4e77fc902a118605 EBUILD calculate-core-3.2.0_alpha3.ebuild 1129 SHA256 59a9203c3139b158fdfdd48d2d594048f8dacd8612e71c4ef26842c7d70edb53 SHA512 07ae01440c1f274145c876b20586db3fda50b4630a238521956239d887a9dcafc38ffa468821d9126bb4f8c3daae3b2f5d7092a8beefda44e1a715a8efd6413e WHIRLPOOL c13d3d6ca6642793ed2ac38a5b9cedd9535337ca1edfa18c941e92be26ddf4fde2fad9d6c143316dc08311415cc423b81a42e7b141c76aca4f73930a4994d7b5 +EBUILD calculate-core-3.2.0_alpha4-r1.ebuild 1271 SHA256 f8a79b4bec6d2549705ecddd0353e5ad83d375b3f836fefe48cff36a8fcbb75a SHA512 4614f7dfd4ab99bf2e38095bf02f7fcf5522b630423ab88e9e40ab95793590dd97e1cfb6bb0215cceebcf06c367bcb84b0457bab6c4a7f708dee3799ed22b220 WHIRLPOOL a6096d6e3289a22a20cd0f35ebeda9cc20820e80f39fa6c51a5711123973cb9f70bc720627561438f078c78c56129aac664ef8e9cf439ad22d53c302f4f79ed5 EBUILD calculate-core-3.2.0_alpha4.ebuild 1129 SHA256 5265cd458eaf572bcdc443d19fceaef043ed57855890f0a017810bbbc835523e SHA512 6265973cb9b86ad68d0c2fc6cffceb14e0713fe2b6140c4daff5d18b71286572996332bd6e6b3679238e6e12cedd76f2d0e0b65fd7e0394426bc39ae65bb8d07 WHIRLPOOL d3f62367e9277aae8123efc10a91f4d614568e365ebeceabc22a3782dbbb3711ea3e8686ec8864c2f2f2856a945c66e5125fbb20d1fd07c169d1925e49e7f99d 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_alpha4-r1.ebuild b/sys-apps/calculate-core/calculate-core-3.2.0_alpha4-r1.ebuild new file mode 100644 index 0000000..3cca64c --- /dev/null +++ b/sys-apps/calculate-core/calculate-core-3.2.0_alpha4-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_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 " + 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" +} diff --git a/sys-apps/calculate-core/files/calculate-core-3.2.0_alpha4-r1.patch b/sys-apps/calculate-core/files/calculate-core-3.2.0_alpha4-r1.patch new file mode 100644 index 0000000..5ac6d78 --- /dev/null +++ b/sys-apps/calculate-core/files/calculate-core-3.2.0_alpha4-r1.patch @@ -0,0 +1,453 @@ +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 +- diff --git a/sys-apps/calculate-install/files/calculate-install-3.2.0_alpha4-r1.patch b/sys-apps/calculate-install/files/calculate-install-3.2.0_alpha4-r1.patch new file mode 100644 index 0000000..b011173 --- /dev/null +++ b/sys-apps/calculate-install/files/calculate-install-3.2.0_alpha4-r1.patch @@ -0,0 +1,12 @@ +diff --git install/variables/distr.py install/variables/distr.py +index 5c23c17..001b5cd 100644 +--- install/variables/distr.py ++++ install/variables/distr.py +@@ -143,6 +143,7 @@ class DistroRepository(Linux): + + def listdistr(pathname): + if path.exists(path.join(pathname,'etc/make.profile')) or \ ++ path.exists(path.join(pathname,'etc/portage/make.profile')) or \ + path.exists(path.join(pathname,'livecd')) or \ + pathname.startswith('/dev/'): + return [pathname] diff --git a/sys-apps/calculate-lib/Manifest b/sys-apps/calculate-lib/Manifest index 8169a23..05e8edf 100644 --- a/sys-apps/calculate-lib/Manifest +++ b/sys-apps/calculate-lib/Manifest @@ -1,4 +1,5 @@ AUX calculate-lib-3.2.0_alpha1-r1.patch 1248 SHA256 6b1b3d062a082ca34c708d9700d0501225cd18a6a255ed16517b3815e619f536 SHA512 d77196c708e76fd2cb261fe6ac6d66249ceffd567a730a51b075a667c416e6c481302917874cc4dc2b982b0495695486580e79af0fa96ed54bada581badd6a37 WHIRLPOOL 0fe7e95183e80c5bd1e62b6615f7ed022ef9edd077ab6dc8c75b41afcee451544de3b653436d68b41e5ed30e29621697c5a739ca4c355e0a4c7abc2862f083ab +AUX calculate-lib-3.2.0_alpha4-r1.patch 6748 SHA256 236837ce239f3f320f6aa1be194b0a5eac34247ea3bcbbb35a4bd1d8c7b1c84e SHA512 4120021db63a44072f472928ad459553aee5f84a52a78afa90387801df7c4dd1832afae771962ee2f9aaf22ffc33faecefa276ee6631080ae8f2db8621321ab9 WHIRLPOOL 8839d8a96f30c6ddbf6221f0a7cb235cf7866c1158030943c2dcc51e5c89e06f1e7a97d4a8aff2170a4f7dd9327831bfe7962d86c7b3b618d479248d6169acf3 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 @@ -7,5 +8,6 @@ EBUILD calculate-lib-3.2.0_alpha1-r1.ebuild 833 SHA256 4d398b3dacd343bc0e41c4417 EBUILD calculate-lib-3.2.0_alpha1.ebuild 692 SHA256 565d13cfdd515cb534e56bdcb3c00e7182194d12c8de259851ec9fc5230b28a3 SHA512 a437100783152c3413c4184e90c5820f56529d1cee2e11dc4f0e88acfe3d3267b0fb85a3a9b04193709447f10dc4815d8c49e612ffe02e497a22acef11d68d95 WHIRLPOOL 3411233d326b21fe63e17106f425fec71a21c4cb77bee3d201b97a81870d76fa8a842e96515573b30aba88bb9209301607d8bc982f16b2406b70f9a84c8b4ee9 EBUILD calculate-lib-3.2.0_alpha2.ebuild 690 SHA256 c89c29f5de3f70146e98f15035366506933f03e8a5066b1ad55aeccbebdeae2c SHA512 a7277c2e5fa64a5e5840be7fc8d3df9a31f41926386c5fe6a9bed31eeed6321af5881c218d9ce7eeb12aee518edb682b438e10397dcb815cc63645100430e43e WHIRLPOOL 8f19e4d46381e26fec81e20fa35599f4658b3891d6372c921a8b1354ad3b1821ea9c78f71caebf54610e0b5aacfb6e6ded018e155e1979322406a0ac1e823d09 EBUILD calculate-lib-3.2.0_alpha3.ebuild 690 SHA256 c89c29f5de3f70146e98f15035366506933f03e8a5066b1ad55aeccbebdeae2c SHA512 a7277c2e5fa64a5e5840be7fc8d3df9a31f41926386c5fe6a9bed31eeed6321af5881c218d9ce7eeb12aee518edb682b438e10397dcb815cc63645100430e43e WHIRLPOOL 8f19e4d46381e26fec81e20fa35599f4658b3891d6372c921a8b1354ad3b1821ea9c78f71caebf54610e0b5aacfb6e6ded018e155e1979322406a0ac1e823d09 +EBUILD calculate-lib-3.2.0_alpha4-r1.ebuild 831 SHA256 edd3d3445555f8482283f1afcb7c74de1e76034f7f3d682b0b83a47f782ad0b8 SHA512 f0fe1fbdd5576e27ccdd407f1234589b143410e75dfc762ae7608a162dd5ade63c3d31dc5a1bfbc86a26f04a8cb40286dbcbcc2f5c6b88da6a22dfae398c9ed0 WHIRLPOOL 62e69309a12642d3c453cac64598d544c9a76d167a6cf268d4c23e532237c6f6b41d71b4611f4953b8d9180806c4d5a259316d2365ba7dada9bc240d4f54a4bc EBUILD calculate-lib-3.2.0_alpha4.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_alpha4-r1.ebuild b/sys-apps/calculate-lib/calculate-lib-3.2.0_alpha4-r1.ebuild new file mode 100644 index 0000000..a0901c5 --- /dev/null +++ b/sys-apps/calculate-lib/calculate-lib-3.2.0_alpha4-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_alpha4-r1.patch" +} diff --git a/sys-apps/calculate-lib/files/calculate-lib-3.2.0_alpha4-r1.patch b/sys-apps/calculate-lib/files/calculate-lib-3.2.0_alpha4-r1.patch new file mode 100644 index 0000000..e097afe --- /dev/null +++ b/sys-apps/calculate-lib/files/calculate-lib-3.2.0_alpha4-r1.patch @@ -0,0 +1,152 @@ +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)) diff --git a/sys-apps/calculate-update/Manifest b/sys-apps/calculate-update/Manifest index c39aca5..5e1247a 100644 --- a/sys-apps/calculate-update/Manifest +++ b/sys-apps/calculate-update/Manifest @@ -1,6 +1,7 @@ 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 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 @@ -11,5 +12,6 @@ EBUILD calculate-update-3.2.0_alpha2.ebuild 623 SHA256 e0fdd7f36ffb80057fe77efb7 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.ebuild 623 SHA256 51f176a0b12ff53b612634c391e3504059bb8f5bfba20325e86efda1cd0f2787 SHA512 f693242808a683f9bfb895dd4a5330b9bb50a27d51ab51a272619724a03ad5a531cc23434abbaae6773f974dc5d699f1aee7d9062d2b19076335ccbe4bd7febd WHIRLPOOL 39ce52a3ae9fe1f7bca4b00a96929a58cb50cdd9c0a22f801bd9b8fdafbece62f9033c48f9e3a549136d4b838f4ace423710cbd63e2e3b7da9fa72fa81802255 EBUILD calculate-update-3.2.9999.ebuild 530 SHA256 9558d49a6b95f73c67f79c835e4003725ba7ae7e0492ea336737da16fe2f5005 SHA512 466bce621f4073bfbf4d34063cbb54077910baa5e40637d5d8d23044edccc9d79bb764db25e05b68969f1bd63573a1c0bc04676f45a6bbeca173503df6887767 WHIRLPOOL 0107e9b7746739a9be77664aa9e6907c9e511ac0422721d709fe63ffb4a55246a2d6c494280bd3b72e50d8e1aecb7f811cfdd112c482168bd9fa17c4ff0d5eaf diff --git a/sys-apps/calculate-update/calculate-update-3.2.0_alpha4-r1.ebuild b/sys-apps/calculate-update/calculate-update-3.2.0_alpha4-r1.ebuild new file mode 100644 index 0000000..7d3989a --- /dev/null +++ b/sys-apps/calculate-update/calculate-update-3.2.0_alpha4-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" +SUPPORT_PYTHON_ABIS="1" +PYTHON_DEPEND="2:2.7" +RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*" + +inherit distutils eutils + +SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2" + +DESCRIPTION="The program of update Calculate Linux" +HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2" +LICENSE="Apache-2.0" +SLOT="3" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="~sys-apps/calculate-core-3.2.0_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" +} diff --git a/sys-apps/calculate-update/files/calculate-update-3.2.0_alpha4-r1.patch b/sys-apps/calculate-update/files/calculate-update-3.2.0_alpha4-r1.patch new file mode 100644 index 0000000..ebbd88d --- /dev/null +++ b/sys-apps/calculate-update/files/calculate-update-3.2.0_alpha4-r1.patch @@ -0,0 +1,65 @@ +diff --git update/emerge_parser.py update/emerge_parser.py +index 50d53aa..3095b7e 100644 +--- update/emerge_parser.py ++++ update/emerge_parser.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. ++import hashlib + + import os + from os import path +@@ -531,6 +532,10 @@ class MtimeCheckvalue(object): + return self.get_check_values(self.fname) + + ++class Md5Checkvalue(MtimeCheckvalue): ++ def value_func(self, fn): ++ return hashlib.md5(readFile(fn)).hexdigest() ++ + class GitCheckvalue(object): + def __init__(self, rpath): + self.rpath = rpath +@@ -550,9 +555,9 @@ class EmergeCache(object): + # список файлов проверяемый по mtime на изменения + check_list = [MtimeCheckvalue('/etc/make.conf', + '/etc/portage', +- '/var/lib/portage/world', +- '/var/lib/portage/world_sets', +- '/etc/make.profile')] ++ '/etc/make.profile'), ++ Md5Checkvalue('/var/lib/portage/world', ++ '/var/lib/portage/world_sets')] + + def __init__(self): + self.files_control_values = {} +diff --git update/update.py update/update.py +index 5d8936c..cb8b0b5 100644 +--- update/update.py ++++ update/update.py +@@ -467,7 +467,7 @@ class Update: + emerge.uninstalling.add_observer(self._printUninstallPackage) + try: + emerge.run() +- except EmergeError as e: ++ except EmergeError: + self.emerge_cache.drop_cache() + if emerge.emerging_error: + self.printPre( +diff --git update/variables/update.py update/variables/update.py +index 0f79468..a000e45 100644 +--- update/variables/update.py ++++ update/variables/update.py +@@ -117,8 +117,10 @@ class VariableClUpdateSystemProfile(ReadonlyVariable): + """ + def get(self): + try: ++ make_profile = self.Get('cl_make_profile') + return path.normpath( +- path.join('/etc',os.readlink('/etc/make.profile'))) ++ path.join(path.dirname(make_profile), ++ os.readlink(make_profile))) + except: + raise VariableError(_("Failed to determine system profile")) + diff --git a/sys-apps/calculate-utilities/Manifest b/sys-apps/calculate-utilities/Manifest index 0c6034c..178af09 100644 --- a/sys-apps/calculate-utilities/Manifest +++ b/sys-apps/calculate-utilities/Manifest @@ -4,5 +4,6 @@ EBUILD calculate-utilities-3.2.0_alpha2.ebuild 812 SHA256 ecaf29e49f955fe030e492 EBUILD calculate-utilities-3.2.0_alpha3-r1.ebuild 815 SHA256 d979d77520dc609ec65f9474d4bc59d983af0e8e22ea786818c85b0b78e9c51b SHA512 8ef15428e292abf22ec2ad210b20e94aa38e485270437eb0ffdd19ed8e047647fdfa1c365b068853e147e9f5eee2b966efcf9a38dc1840aa4846134a512c27fe WHIRLPOOL 04f2fff91652552075617ccf1ad82fcb3b1cb8796649c55a2a0058043a16dc75dafde3bdd394869da3772976bf4398801bb15c19c3ea50c4e5d5d39301e92f2b EBUILD calculate-utilities-3.2.0_alpha3-r2.ebuild 815 SHA256 4d3859770e84dcb76f2cb800c9b198acd7336cdad0f293ec50035c3b00aa3839 SHA512 df293f106eea06c0b8a5cbf533a71cc149aa83647d49df811bb0db8ead9598a22106c005fa3b6d4172bdb94c6440dbcf545aa573842f7607e9fb6b7990e378ad WHIRLPOOL 6d0da416b53f1a04b35b17048d9ad4c25d377a2c7da26ad7d2e3ee55da53b72d0e3d87b480138d798426b38557d1a882804af5a2be4680692eb9725eb38e3706 EBUILD calculate-utilities-3.2.0_alpha3.ebuild 812 SHA256 7aa150fabd4171e2dd45f6892b0596ad7bf3394c629b6f3f383b8c5fd8bf86b7 SHA512 34f08c147d7b3d3f8164ab3d21fdc5ca1e2f82c2a6880a3b93f7ab0771d8b874ed388b311148e69bb9cf4d716542f3d98dbbed7c38422a5b4739299fad5897b0 WHIRLPOOL 20deaa70b41be90e1e1b3d6e54117e6ca26fa394b155d3f3ab4d2d5c617467ce58b76762e31b71f73a969bab361924127832ec2b790c397bedd5045baf20cd1c +EBUILD calculate-utilities-3.2.0_alpha4-r1.ebuild 821 SHA256 5dce13bb317b2ae448edb8f61db57a442f21e7a15cdeb90f550ea1cf98d00f9d SHA512 dc8c2c4a3651a0d4b928acc4b47e1a2cd817ec5145207c9eb8ffd9765691ad1fc8bdbe0e44d977bdf1e2c3663a2762ecb6b65cb9e05e5c5793e22293a6add303 WHIRLPOOL 107d63d512a784e296bccd0fbac94904f26df2e4d9a867c8e1cbe347eec183922d7c5addfebc2f896456b866ff59eee93f4951d6c12c7bbb809ab75c007c574e EBUILD calculate-utilities-3.2.0_alpha4.ebuild 812 SHA256 c3528f2fcb9980d90b8948fe672a64c0a899364a4a8f7a8290990536f7f31631 SHA512 ffad0effd883749802e6dc12779054010949aa2eccf68ee3560f5239c2b45f683cc5ae00d7582fec7d1d0382a35fc6a73411abf1aa58e43417e26b52130885a8 WHIRLPOOL 56d339c417b70eb53d942d533e56bc530e85fdc4f3bf6c8c30ff07af69e0bd98d373d6dbb27b944af4c8e9d596cd1b75424699391cd49b21a48a3ae8bc014fa1 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_alpha4-r1.ebuild b/sys-apps/calculate-utilities/calculate-utilities-3.2.0_alpha4-r1.ebuild new file mode 100644 index 0000000..946d771 --- /dev/null +++ b/sys-apps/calculate-utilities/calculate-utilities-3.2.0_alpha4-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_alpha4 + =sys-apps/calculate-i18n-3.2.0_alpha4 + =sys-apps/calculate-lib-3.2.0_alpha4-r1 + =sys-apps/calculate-core-3.2.0_alpha4-r1 + =sys-apps/calculate-update-3.2.0_alpha4-r1 + cl_client? ( =sys-apps/calculate-client-3.2.0_alpha4 ) + cl_desktop? ( =sys-apps/calculate-desktop-3.2.0_alpha4 ) + cl_consolegui? ( =sys-apps/calculate-console-gui-3.2.0_alpha4 ) + cl_console? ( =sys-apps/calculate-console-3.2.0_alpha4 ) +"