Исправления утилит alpha4

mhiretskiy
Mike khiretskiy 10 years ago
parent 1626b0f13c
commit 0b0d13130a

@ -2,6 +2,7 @@ AUX calculate-core-3.2.0_alpha1-r1.patch 3909 SHA256 95338af9088ff7a8b535836c542
AUX calculate-core-3.2.0_alpha4-r1.patch 16117 SHA256 cf06430288a9074388dfb92dcfc930691819a8233023b6560256a0da4086c52b SHA512 b6705837520166f21f3b920e110e1a653039a9e964fec333dc46fce36c4d1a55b6c2096f88c8a932f7105cfd2e517d482623217deeec12079f49eab16384b555 WHIRLPOOL 60ce776de8a1b3e8187e81c63b89551a3db3ab1baaac1394f9537f639ee01170be9d85b39a5f0b75df03ddb8c90bcdc244af23c9f4c1468b9322db06df0628f3
AUX calculate-core-3.2.0_alpha4-r2.patch 16188 SHA256 cd2ea5c818f9fa80db9e2164c35f563bc5a53710c8773e8699872bc133637b98 SHA512 441f08285dbd2ef813645df5c71ff1bf9442aeff39b965436c63ac596e3ba551cb5e9dee6e040655b440a171a893716dc8689891d3a25757fd2cc34b7142a907 WHIRLPOOL bd3006df43f4505006bb3e7f2b5520fda45e18a1e0a580ca48a6b5296b09e02cb78557ce614ad826945dabe085195d84522a054a301c8d3220beede84474fd94
AUX calculate-core-3.2.0_alpha4-r3.patch 16585 SHA256 f51cecc73fd1085e65922a6c17168baf667833a8edcb5d89fbe82dcc88d87716 SHA512 768a3d8a14248755157cdf015e058efee9ae1ab3d018b4a94a081ae154ce15509ebc952cda01ca753a4d31695d2e2d114d118d74a16dc3c0e7ecb9d2dfd03742 WHIRLPOOL 0b9091130641b14c2f06ca4afe61aefc4557126289db59f5e550b2fda1a5298dff3823bdff88d8b5eacad76b0b1bf09f5eba7a6ddb71a2f01a2041ab75530a46
AUX calculate-core-3.2.0_alpha4-r4.patch 18361 SHA256 75de26bd326759971c8f380f04ec69071811eef6232a6b8c46b842734ab7e36f SHA512 52516c14935340d38a3b03ed980b8aa5d58129300f384b63081041634fecdb46ada91ab43d555b437c12a448d8352854a7d26241dc8d8f562157064f2ff46628 WHIRLPOOL 0978882b8fb860d54a922e193aa5dba71b5834a30ac35452f6493a816139b38749107b6b4a1d0a3ec3dc50dd0a6448e784db4a14f84381c5445ab57a7915fc8a
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
@ -13,5 +14,6 @@ EBUILD calculate-core-3.2.0_alpha3.ebuild 1129 SHA256 59a9203c3139b158fdfdd48d2d
EBUILD calculate-core-3.2.0_alpha4-r1.ebuild 1271 SHA256 f8a79b4bec6d2549705ecddd0353e5ad83d375b3f836fefe48cff36a8fcbb75a SHA512 4614f7dfd4ab99bf2e38095bf02f7fcf5522b630423ab88e9e40ab95793590dd97e1cfb6bb0215cceebcf06c367bcb84b0457bab6c4a7f708dee3799ed22b220 WHIRLPOOL a6096d6e3289a22a20cd0f35ebeda9cc20820e80f39fa6c51a5711123973cb9f70bc720627561438f078c78c56129aac664ef8e9cf439ad22d53c302f4f79ed5
EBUILD calculate-core-3.2.0_alpha4-r2.ebuild 1271 SHA256 527901c373e6bc466bb2651f42fe339871037046f4e1c9b91eddddfd17b97a2b SHA512 74d0638e7072cdf64f646696c313e563404fc1096cf24b71bf42d0d288c4da106b27c8ea4b0f84e6a1c0a97fd3fd9dae4ce69868608e894216f944bb1296b17c WHIRLPOOL 42f765c5f85388eb05ffa83d6f67c584e99ac6ab4426f53e50544f9560bdcbdd81bb1036df382ad29dda69240aed85a9bc83b328a95e34c0dd662e0f9c3b35a8
EBUILD calculate-core-3.2.0_alpha4-r3.ebuild 1271 SHA256 0ce1729ff0a879ed40c4254d380f75239dbad7c5de4be59a4658cc7c58d2846e SHA512 d19f6f95c97604d46d69175ea0f0589270cde657b5f024bb80ed18f21e7ea271a8dd09566b7520a75345b125419f6efa2ca46f7ac3987cdb25d4f89a864e3a07 WHIRLPOOL 9398a93b877c21ed99ee94a5bf206d198a2720f28cfa6183a68b1cad4e60edf3cac4cd77fdf2456657be46699f76f03aba10ecc62fc4c848e6385cf9e1ed3d72
EBUILD calculate-core-3.2.0_alpha4-r4.ebuild 1271 SHA256 951eca9ef8a4e21138f1fe91ba44d71b3d3390550fe36e5624d5b91d8ed8873b SHA512 b6d4d4678f3292516da6d99afea353e1437a5502391746f2ff334af7f259567a8ed3b1ad092a7dc3d50b05bd014576bcdff064283e284a06427ac3afed9eb408 WHIRLPOOL bb2fd032dc4e66bb2c571a6d914c12f38867d0d64236eca212ca6387fdb9a375493393b654079cabce4f04c3339983df0bae5593233b7a4a02a49b457307e843
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

@ -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 <username>"
einfo "For run calculate-core perform:"
einfo " /etc/init.d/calculate-core start"
einfo "Add calcualte core to autorun:"
einfo " rc-update add calculate-core boot"
}
src_unpack() {
unpack "${A}"
cd "${S}"
# apply revision changes
epatch "${FILESDIR}/calculate-core-3.2.0_alpha4-r4.patch"
}

@ -0,0 +1,500 @@
diff --git core/server/api_types.py core/server/api_types.py
index 3863d53..eb205c1 100644
--- core/server/api_types.py
+++ core/server/api_types.py
@@ -164,6 +164,97 @@ class Table(DataVarsSerializer):
self.onClick = onClick
self.addAction = addAction
+class ChoiceValueAdapter(object):
+ def __init__(self, choicevalue):
+ self.choicevalue = choicevalue
+
+ @property
+ def values(self):
+ return self.choicevalue.values.string
+
+ @property
+ def comments(self):
+ return self.choicevalue.comments.string
+
+ @property
+ def onChanged(self):
+ return self.choicevalue.onChanged.string
+
+ def __getattr__(self, item):
+ return getattr(self.choicevalue, item)
+
+ @classmethod
+ def from_detect(cls, choicevalue):
+ if isinstance(choicevalue, ChoiceValue):
+ return choicevalue
+ else:
+ return cls(choicevalue)
+
+class TableAdapter(object):
+ def __init__(self, table):
+ self.table = table
+
+ @property
+ def fields(self):
+ return self.table.fields.string
+
+ @property
+ def head(self):
+ return self.table.head.string
+
+ @property
+ def body(self):
+ if hasattr(self.table.body,'stringArray'):
+ return [row.string
+ for row in self.table.body.stringArray
+ if hasattr(row, "string")]
+ return []
+
+ @property
+ def values(self):
+ return [ChoiceValueAdapter(x) for x in self.table.values.ChoiceValue]
+
+ def __getattr__(self, item):
+ return getattr(self.table, item)
+
+ @classmethod
+ def from_detect(cls, table):
+ if isinstance(table, Table):
+ return table
+ else:
+ return cls(table)
+
+class FieldAdapter(object):
+ def __init__(self, field):
+ self.field = field
+
+ @property
+ def choice(self):
+ return self.field.choice.string
+
+ @property
+ def listvalue(self):
+ return self.field.listvalue.string
+
+ @property
+ def comments(self):
+ return self.field.comments.string
+
+ @property
+ def tablevalue(self):
+ return TableAdapter(self.field.tablevalue)
+
+ def __getattr__(self, item):
+ return getattr(self.field, item)
+
+ @classmethod
+ def from_detect(cls, field):
+ if isinstance(field, Field):
+ return field
+ else:
+ return cls(field)
+
+
class Option(DataVarsSerializer):
shortopt = String
longopt = String
diff --git core/server/replace_class.py core/server/replace_class.py
index 23c5282..6901ef6 100644
--- core/server/replace_class.py
+++ core/server/replace_class.py
@@ -34,6 +34,7 @@ from calculate.lib.utils.colortext.output import BaseOutput
from calculate.lib.cl_print import color_print
from calculate.lib.datavars import VariableError
from calculate.lib.cl_lang import setLocalTranslate
+from calculate.core.server.api_types import FieldAdapter
from methods_func import get_method_argparser, collect_object, \
check_result_msg, get_param_pwd, _print
@@ -44,7 +45,7 @@ from func import shortTraceback, CommonMethods
setLocalTranslate('cl_core3', sys.modules[__name__])
-from itertools import cycle
+from itertools import cycle, izip, ifilter
import time
@@ -411,9 +412,9 @@ class replaceClass():
yes_color, no_color = Colors.GREEN, Colors.LIGHT_RED
else:
yes_color, no_color = Colors.LIGHT_RED, Colors.GREEN
- yes = _print.foreground(yes_color).bold("Yes")
- no = _print.foreground(no_color).bold("No")
- white_message = _print.foreground(Colors.WHITE).bold(
+ yes = _print.foreground(yes_color)("Yes")
+ no = _print.foreground(no_color)("No")
+ white_message = _print.foreground(Colors.WHITE)(
message)
ask = raw_input(white_message + ' (%s/%s): ' % (yes, no))
except KeyboardInterrupt:
@@ -445,7 +446,7 @@ class replaceClass():
useGetChar = False
else:
useGetChar = True
- message = _print.foreground(Colors.WHITE).bold(message)
+ message = _print.foreground(Colors.WHITE)(message)
while True:
outMessage = message + ' (%s): ' % \
@@ -531,7 +532,7 @@ class replaceClass():
def startGroup(self, message):
_print = get_terminal_print()
self.printDefault(
- _print.foreground(TextState.Colors.WHITE).bold(message))
+ _print.foreground(TextState.Colors.WHITE)(message))
#self.addMessage(type='startGroup', message=message)
def endGroup(self):
@@ -766,159 +767,179 @@ def print_brief(view, brief_label):
print_brief_group(Group.fields, Group.name)
-def print_brief_group(Fields, group_name):
- print_group_flag = False
- # if group_name:
- # _print ('\b'+group_name)
- uncompatible_count = 0
- colorPrint = color_print()
- _colorprint = get_terminal_print(_print)
- for field in Fields:
- if field.uncompatible:
- uncompatible_count += 1
- continue
- if field.element in ['input', 'openfile']:
- value = field.value if field.value else ''
- if not print_group_flag:
- if group_name:
- print_group_flag = True
- _colorprint.bold.foreground(
- TextState.Colors.WHITE)(group_name)
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
-
- elif field.element in ['combo', 'comboEdit', 'radio', 'file']:
- if field.choice:
- if not field.choice[0]:
- field.choice.pop(0)
- if field.comments:
- if not field.comments[0]:
- field.comments.pop(0)
- if field.comments and field.choice:
- if not field.value in field.choice:
- field.choice.append(field.value)
- value = map(lambda x: field.comments[x] \
- if len(field.comments) > x else field.choice[x],
- map(lambda x: field.choice.index(x),
- filter(lambda x: x in field.choice,
- [field.value])))
- value = ', '.join(value)
- else:
- value = field.value if field.value else ''
- if not print_group_flag:
- if group_name:
- print_group_flag = True
- #_print('\b' + group_name)
- _colorprint.bold.foreground(
- TextState.Colors.WHITE)(group_name)
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
-
- elif field.element in ['multichoice', 'multichoice_add', \
- 'selecttable', 'selecttable_add']:
- if field.choice:
- if not field.choice[0]:
- field.choice.pop(0)
- if field.comments:
- if not field.comments[0]:
- field.comments.pop(0)
- if field.listvalue:
- if not field.listvalue[0]:
- field.listvalue.pop(0)
- if field.choice:
- value = map(lambda x: field.comments[x] \
- if len(field.comments) > x \
- else field.choice[x],
- map(lambda x: field.choice.index(x), \
- field.listvalue))
+class Display(object):
+ def __init__(self):
+ self._print = get_terminal_print(color_print().defaultPrint)
+
+ def print_info(self, label, value):
+ GREEN = TextState.Colors.GREEN
+ self.display_asterisk(GREEN)
+ self._print("%s: " % label)
+ WHITE = TextState.Colors.WHITE
+ self._print.foreground(WHITE)(value)
+ self._print("\n")
+
+ def print_label(self, label):
+ GREEN = TextState.Colors.GREEN
+ self.display_asterisk(GREEN)
+ self._print("%s: " % label)
+ self._print("\n")
+
+ def display_asterisk(self, color):
+ self._print(" ")
+ self._print.foreground(color).bold("*")
+ self._print(" ")
+
+ def print_error(self, message):
+ RED = TextState.Colors.RED
+ self.display_asterisk(RED)
+ self._print(message)
+ self._print("\n")
+
+ def print_table(self, data, head):
+
+ sys.stdout.write('%s\n' % printTable(data, head))
+
+ def print_group(self, label):
+ #WHITE = TextState.Colors.WHITE
+ #self._print.foreground(WHITE).bold(label)
+ #self._print.underline(label)
+ self._print(label)
+ self._print("\n")
+
+
+class InformationElement(object):
+ def __init__(self, field, display):
+ self.value = ""
+ self.label = ""
+ self.display = display
+
+ @classmethod
+ def from_field(cls, field, display):
+ if field.type == 'steps':
+ return None
+ map_elements = {'input': ValueInfo,
+ 'openfile': ValueInfo,
+ 'combo': ChoiceInfo,
+ 'comboEdit': ChoiceInfo,
+ 'radio': ChoiceInfo,
+ 'file': ChoiceInfo,
+ 'multichoice': MultiChoiceInfo,
+ 'multichoice_add': MultiChoiceInfo,
+ 'selecttable': MultiChoiceInfo,
+ 'selecttable_add': MultiChoiceInfo,
+ 'error': ErrorInfo,
+ 'check': CheckInfo,
+ 'check_tristate': CheckInfo,
+ 'table': TableInfo
+ }
+ if field.element in map_elements:
+ return map_elements[field.element](field, display)
+ return None
+
+ def show(self):
+ self.display.print_info(self.label, self.value)
+
+
+class ValueInfo(InformationElement):
+ def __init__(self, field, display):
+ super(ValueInfo, self).__init__(field, display)
+ self.value = field.value or ''
+ self.label = field.label
+
+class CheckInfo(InformationElement):
+ def __init__(self, field, display):
+ super(CheckInfo, self).__init__(field, display)
+ self.label = field.label
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
+ self.value = map_answer.get(field.value, field.value)
+
+class ChoiceInfo(InformationElement):
+ def __init__(self, field, display):
+ super(ChoiceInfo, self).__init__(field, display)
+ self.label = field.label or ''
+ if field.choice and field.comments:
+ map_comment = dict(zip(field.choice, field.comments))
+ self.value = map_comment.get(field.value, field.value) or ''
+ else:
+ self.value = field.value if field.value else ''
+
+
+class MultiChoiceInfo(InformationElement):
+ def __init__(self, field, display):
+ super(MultiChoiceInfo, self).__init__(field, display)
+ self.label = field.label or ''
+ if field.listvalue:
+ value = field.listvalue
+ # удалить пустой первый элемент (особенности wsdl)
+ if value and not value[0]:
+ value.pop(0)
+ if field.choice and field.comments:
+ map_comment = dict(zip(field.choice, field.comments))
else:
- value = []
- value = ', '.join(value)
- if field.listvalue and not value:
- value = ', '.join(field.listvalue)
- elif not value:
- value = field.value if field.value else ''
- if not print_group_flag:
- if group_name:
- print_group_flag = True
- #_print('\b' + group_name)
- _colorprint.bold.foreground(
- TextState.Colors.WHITE)(group_name)
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
-
- # elif field.element == 'label':
- # print field.label
-
- elif field.element == 'error':
- if not print_group_flag:
- if group_name:
- print_group_flag = True
- _colorprint.bold.foreground(
- TextState.Colors.WHITE)(group_name)
- colorPrint.printERROR(field.label)
-
- elif field.element in ['check', 'check_tristate']:
- if field.value == 'on':
- value = _('yes')
- elif field.value == 'off':
- value = _('no')
- elif field.value == 'auto':
- value = _('auto')
+ map_comment = {}
+ self.value = ", ".join([map_comment.get(x, x) or '' for x in value])
+ else:
+ self.value = field.value or ""
+
+
+class ErrorInfo(InformationElement):
+ def __init__(self, field, display):
+ super(ErrorInfo, self).__init__(field, display)
+ self.label = field.label
+
+ def show(self):
+ self.display.print_error(self.label)
+
+
+class TableInfo(InformationElement):
+ """
+ Табличная информация
+ """
+
+ def map_row(self, row, typedata):
+ map_answer = {'on':_('yes'), 'off': _("no"), 'auto': _('auto')}
+ for cell, typefield in izip(row, typedata):
+ if typefield in ['check', 'check_tristate']:
+ yield map_answer.get(cell, cell) or ""
+ elif "password" in typefield:
+ yield "***"
else:
- value = field.value
- if not print_group_flag:
- if group_name:
- print_group_flag = True
- _colorprint.bold.foreground(
- TextState.Colors.WHITE)(group_name)
- colorPrint.printSUCCESS('%s: %s' % (field.label, value))
-
- elif field.element == 'table' and field.type != 'steps':
- head = field.tablevalue.head
-
- body = []
- for row in field.tablevalue.body:
- if not row[0]:
- row.pop(0)
- body.append(row)
-
- # if empty table
- if not filter(None, map(lambda x: x, body)):
- body = [[''] * len(head)]
- res = printTable(body, head)
- sys.stdout.flush()
- sys.stdout.write(res + "\n")
- continue
- ChoiceValue = field.tablevalue.values
- for row in xrange(len(ChoiceValue)):
- if ChoiceValue[row].typefield in ['check', 'check_tristate']:
- for i in xrange(len(body)):
- if body[i][row] == 'on':
- body[i][row] = _('yes')
- if body[i][row] == 'off':
- body[i][row] = _('no')
- if body[i][row] == 'auto':
- body[i][row] = _('auto')
- if "password" in ChoiceValue[row].typefield:
- for i in xrange(len(body)):
- if body[i][row]:
- body[i][row] = '***'
- data = []
- for body_row in body:
- data.append(map(lambda x: x if x else '', body_row))
- if not print_group_flag:
- if group_name:
- print_group_flag = True
- _colorprint.bold.foreground(
- TextState.Colors.WHITE)(group_name)
- colorPrint.printSUCCESS(field.label + ': ')
- res = printTable(data, head)
- sys.stdout.flush()
- sys.stdout.write(res + "\n")
+ yield cell or ""
+
+ def __init__(self, field, display):
+ super(TableInfo, self).__init__(field, display)
+ self.label = field.label
+ self.head = field.tablevalue.head
+
+ # удаление первого элемента строки (для wsdl)
+ body = [x[1:] if x and not x[0] else x for x in field.tablevalue.body]
+
+ if not filter(None, map(lambda x: x, body)):
+ self.body = None
else:
- uncompatible_count += 1
+ type_values = [x.typefield for x in field.tablevalue.values]
+ self.body = [list(self.map_row(x, type_values)) for x in body]
+
+ def show(self):
+ if self.body:
+ self.display.print_label(self.label)
+ self.display.print_table(self.body, self.head)
-# if uncompatible_count == len (Fields) and group_name:
-# colorPrint.printSUCCESS(_('Not used'))
+def print_brief_group(Fields, group_name):
+ display = Display()
+ show_group = True
+ for element in ifilter(None,
+ (InformationElement.from_field(
+ FieldAdapter.from_detect(x),
+ display)
+ for x in Fields if not x.uncompatible)):
+ if show_group:
+ display.print_group(group_name)
+ show_group = False
+ element.show()
+
class Table(tableReport):
def __init__(self, *args, **kwargs):
@@ -953,4 +974,3 @@ def printTable(data, header=None):
except Exception as e:
print str(e)
raise
-
diff --git core/variables/certificate.py core/variables/certificate.py
index 7cbf9fe..8b1c0cf 100644
--- core/variables/certificate.py
+++ core/variables/certificate.py
@@ -204,7 +204,7 @@ class VariableClCertGroups(Variable):
(OpenSSL.SSL.FILETYPE_PEM, cert)
com = certobj.get_extension(certobj.get_extension_count()-1). \
get_data()
- groups = com.split(':')[1]
+ groups = com.rpartition(':')[2]
groups_list = groups.split(',')
return groups_list
except (OpenSSL.crypto.Error,IOError) as e:

@ -4,6 +4,7 @@ AUX calculate-update-3.2.0_alpha3-r2.patch 1651 SHA256 2d8bc30666b5327d8212bac72
AUX calculate-update-3.2.0_alpha4-r1.patch 2410 SHA256 5e69ded9db0e676d142674e53dc5b84d90120e58474fdd43a27b7024f4888a92 SHA512 51ee3eb4fe96cfbf44c9f706a0eaca34b732bf54f865d3ef6d36d24c56ad9b01f2d3b43201e058acc800cfa8ed2171aa2266469647492109d495cd3db6cff04f WHIRLPOOL d381f59f2a8f1a4fbf9d6f390b28cf43b7e124c3062cc90e85eff40bc3470b39a169b8e7ff94d07049c6a2ef18d83622dab2c8b7c8b8906e53d644f2349a1a79
AUX calculate-update-3.2.0_alpha4-r2.patch 6582 SHA256 57e9b6f162ca9f1c1e9295cc4dbbb9410617d9f2a04ed528189ace9e72e27bf8 SHA512 3d39899a85386bc223023fd60ddbacc9823d15f5319c379d4f1b71a1ef930f9ac375dbd527599cdecc9c4f54435afffe63a9e223a0f18b3683d6f3818c6e637d WHIRLPOOL 96fe4a57bf47a866f8be4365bc9ae1b06525e34076a0a6a2c04e96d7558b79302c7b14e62044b8fa305a5b4c3108795b5fe2ab700c221fbe922635ac25d20b48
AUX calculate-update-3.2.0_alpha4-r3.patch 6988 SHA256 148483a99fa374a3f0e75fbc9ea5cd024171fc9ef973fa200bbcb8d997f71935 SHA512 0c79191712b2cb1aa1c2a3f3cdd4a4d9ae144ae5c1749707cc4dcf6fadbdbe638436136698228c979338ab365d4b7c54d17151697ad844af9ecc697f484853e5 WHIRLPOOL 4be6ce6f917065702052bbbd97ae9ee67afc59a2a1554772e163a5a40f525f33667db2754e4a1358b3f75de0373946a07a448079674806d703121002dca7c38b
AUX calculate-update-3.2.0_alpha4-r4.patch 19180 SHA256 7e01cd3e5c02f7490fc11f301f8a5a2dd52ea6901918dab580429139ac9ea024 SHA512 72ceb57d48e9ca17646fef56f785adbe929007664d569b8c27e15dd4433a7dbc94e8942a18af333bb8a319fe50d2c4329c2c8fdebd0c9774923fcba9df694aa0 WHIRLPOOL ef0d5bf3161a4450a5f240ddeef502fab0bdb605d1f8d3852f99dfd8db893e74d5ba000252adb1af398609b421c22d6a37e76719d43dd8bda79f5c5535eb879b
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
@ -17,5 +18,6 @@ EBUILD calculate-update-3.2.0_alpha3.ebuild 623 SHA256 9747a7f19c9cd545b38f74f28
EBUILD calculate-update-3.2.0_alpha4-r1.ebuild 767 SHA256 f12912de4c0bfea487c8b1a135fc9293cb8550f9443f10d59cdf514ea50aed1e SHA512 d021b334806c95424614c2bc0c702bb3bd75f17b12a7ea41361d053627b187564eab65be08c1418ac0de186d2bb97d96c7824760f4c52d14dd68faacea216fe9 WHIRLPOOL ae97441c8478a13f4cddbbbf8c1f16d0fab9ed40b5af565701beae2f9db7ee8a0c93b717a6654045b11e2c001313a77c7f04b42e12cdb3fa4b0a06246a880b5f
EBUILD calculate-update-3.2.0_alpha4-r2.ebuild 767 SHA256 710e26f93755be8a5a6faf2857bd4fc5c29b55a2034a4dc9e18c20ba1e993eb2 SHA512 0ad565fd9f7240bd2347dadb12574ef1916e6946c20f0f414312a48229a7e128edd6dce545faa6aa20f69c8ece4d184b108e2afabb568f36801dd0f279e5c119 WHIRLPOOL 8267f5128363b52e4870298685e38375585329cb21d9e5b8f9e36a4362c58e90bffb8e6d8d8b871bb0fb85ccf323354174f11574dc28fbb71941c7a1f7dd87d8
EBUILD calculate-update-3.2.0_alpha4-r3.ebuild 767 SHA256 f5dc6601800363d095a93e8726a8758aa3e42a010623a1a0aa973b18e9d05c47 SHA512 57d9f397a1e3ba3f89ce15ce7daebc2cb5f93e6d9600d31a23076cae6e27a3209468c983bbd5eca6b618b344beefe98d68c343d7b8123f101d704fc00f521eb4 WHIRLPOOL f512e66ad18047a6cbe49cbfc8085a11b18b07d34cdde28257d024017e981b4f7bc24573c518ab4e330c1e7d395728d3c1d0357c713ad32130ac0c372c39d2da
EBUILD calculate-update-3.2.0_alpha4-r4.ebuild 767 SHA256 8e9a3d77977a81cc529baa562a436d630da8709d9c00488e9cb750e83279f826 SHA512 b78245627614453aa9631ac12f548c1f4b531b81d8e770b8aa297c7af167e06944b10451bd976fe57ec22cd94cdcf114ddba419a5cdac5b2a1cced726d520a82 WHIRLPOOL 0a0d3cfb6e1c7098a393891d623d114cc1badee121e4bc414a23e701b9b9af784fe45997207335fe83833c8fbb248e2a3a1af91c932d41672375b84d1b7767cd
EBUILD calculate-update-3.2.0_alpha4.ebuild 623 SHA256 51f176a0b12ff53b612634c391e3504059bb8f5bfba20325e86efda1cd0f2787 SHA512 f693242808a683f9bfb895dd4a5330b9bb50a27d51ab51a272619724a03ad5a531cc23434abbaae6773f974dc5d699f1aee7d9062d2b19076335ccbe4bd7febd WHIRLPOOL 39ce52a3ae9fe1f7bca4b00a96929a58cb50cdd9c0a22f801bd9b8fdafbece62f9033c48f9e3a549136d4b838f4ace423710cbd63e2e3b7da9fa72fa81802255
EBUILD calculate-update-3.2.9999.ebuild 530 SHA256 9558d49a6b95f73c67f79c835e4003725ba7ae7e0492ea336737da16fe2f5005 SHA512 466bce621f4073bfbf4d34063cbb54077910baa5e40637d5d8d23044edccc9d79bb764db25e05b68969f1bd63573a1c0bc04676f45a6bbeca173503df6887767 WHIRLPOOL 0107e9b7746739a9be77664aa9e6907c9e511ac0422721d709fe63ffb4a55246a2d6c494280bd3b72e50d8e1aecb7f811cfdd112c482168bd9fa17c4ff0d5eaf

@ -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-r4.patch"
}

@ -0,0 +1,477 @@
diff --git update/emerge_parser.py update/emerge_parser.py
index 50d53aa..597ba55 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
@@ -159,9 +160,9 @@ class EmergeInformationBlock(object):
def __contains__(self, item):
if self.result is None:
- return 0
+ return False
else:
- return item in self.result
+ return item in str(self)
def _get_text(self, result):
"""
@@ -448,6 +449,34 @@ class EmergeingErrorBlock(EmergeInformationBlock):
raise EmergeError(_("Emerge %s is failed") % self.package)
+class RevdepPercentBlock(NotifierInformationBlock):
+ """
+ Блок определния статуса revdep-rebuild
+ """
+ token = "Collecting system binaries"
+ end_token = [re.compile("Assigning files to packages|"
+ "All prepared. Starting rebuild")]
+ re_block = re.compile("\[\s(\d+)%\s\]")
+ action = None
+
+ def notify(self, observer, groups):
+ percent = int(groups[0])
+ observer(percent)
+
+ def get_block(self, child):
+ expect_result = [self.re_block]+self.end_token
+ try:
+ while True:
+ index = child.expect(expect_result)
+ if index == 0:
+ for observer in self.observers:
+ self.notify(observer, child.match.groups())
+ else:
+ self.result = child.match
+ break
+ except pexpect.EOF:
+ self.result = ""
+
class EmergeParser(object):
"""
Парсер вывода emerge
@@ -531,6 +560,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 +583,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..1a9a6d9 100644
--- update/update.py
+++ update/update.py
@@ -20,6 +20,7 @@ from os import path
from calculate.lib.utils.tools import AddonError
from calculate.lib.utils.colortext.palette import TextState
from calculate.lib.utils.colortext import get_color_print
+from calculate.update.emerge_parser import RevdepPercentBlock
import pexpect
from package_tools import Git, Layman,\
@@ -240,6 +241,9 @@ class Update:
return False
def _printEmergePackage(self, pkg, binary=False, num=1, max_num=1):
+ """
+ Вывод сообщения сборки пакета
+ """
self.endTask()
_print = self.color_print
if max_num > 1:
@@ -256,6 +260,9 @@ class Update:
self.startTask(_("Emerging%s %s") % (part, _print(str(pkg))))
def _printInstallPackage(self, pkg, binary=False):
+ """
+ Вывод сообщения установки пакета
+ """
self.endTask()
_print = self.color_print
if self.is_binary_pkg(pkg,binary):
@@ -266,6 +273,9 @@ class Update:
_print(str(pkg)))
def _printUninstallPackage(self, pkg, num=1, max_num=1):
+ """
+ Вывод сообщения удаления пакета
+ """
self.endTask()
_print = self.color_print
if max_num > 1:
@@ -279,23 +289,33 @@ class Update:
self.startTask(_("Unmerging%s %s") % (part, _print.bold(str(pkg))))
def emergelike(self, cmd, *params):
+ """
+ Запуск команды, которая подразумевает выполнение emerge
+ """
cmd_path = getProgPath(cmd)
if not cmd_path:
raise UpdateError(_("Failed to find %s command") % cmd)
with EmergeParser(
emerge_parser.CommandExecutor(cmd_path, params)) as emerge:
- emerge.emerging.add_observer(self._printEmergePackage)
- emerge.installing.add_observer(self._printInstallPackage)
- emerge.uninstalling.add_observer(self._printUninstallPackage)
- try:
- emerge.run()
- except EmergeError:
- if emerge.emerging_error:
- self.printPre(
- self._emerge_translate(emerge.emerging_error.log))
- else:
- self.printPre(self._emerge_translate(emerge.prepare_error))
- raise
+ self._startEmerging(emerge)
+ return True
+
+ def revdep_rebuild(self, cmd, *params):
+ """
+ Запуск revdep-rebulid
+ """
+ cmd_path = getProgPath(cmd)
+ if not cmd_path:
+ raise UpdateError(_("Failed to find %s command") % cmd)
+ with EmergeParser(
+ emerge_parser.CommandExecutor(cmd_path, params)) as emerge:
+ revdep = RevdepPercentBlock(emerge)
+ self.addProgress()
+ revdep.add_observer(self.setProgress)
+ revdep.action = lambda x: (
+ self.endTask(), self.startTask(_("Assigning files to packages"))
+ if "Assign" in revdep else None)
+ self._startEmerging(emerge)
return True
def _display_pretty_package_list(self, pkglist, remove_list=False):
@@ -323,7 +343,7 @@ class Update:
else:
size = ""
mult = _print.bold("*")
- self.printDefault(" {mult} {fullname} {shortname}{size}".format(
+ self.printDefault(" {mult} {fullname} {shortname}{size}".format(
mult=mult, fullname=fullname, shortname=shortname, size=size))
def _display_install_package(self, emerge):
@@ -332,6 +352,7 @@ class Update:
"""
# подробный список пакетов
_print = self.color_print
+ highlight = TextState.Colors.WHITE
if self.clVars.Get('cl_verbose_set') == 'on':
self.printPre(str(emerge.install_packages))
else:
@@ -345,9 +366,9 @@ class Update:
self._display_pretty_package_list(
emerge.install_packages.remove_list, remove_list=True)
if str(emerge.download_size) != "0 kB":
- self.printSUCCESS(_print(
- _("{size} will be downloaded").format(
- size=emerge.download_size)))
+ self.printSUCCESS(_("{size} will be downloaded").format(
+ size=_print.foreground(highlight)(
+ str(emerge.download_size))))
def _display_remove_list(self, emerge):
"""
@@ -364,6 +385,9 @@ class Update:
self._display_pretty_package_list(pkglist, remove_list=True)
def getCacheOnWorld(self, params, packages, check=False):
+ """
+ Получить список обновляемых пакетов @world из кэша
+ """
if "@world" in packages:
from calculate.update.utils.cl_update import ClUpdateAction
elog = EmergeLog(
@@ -379,6 +403,10 @@ class Update:
return params, packages
def updateCache(self, pkg_list):
+ """
+ Обновить кэш. Оставить отметку в emerge.log о том, выполнено действие
+ premerge
+ """
self.emerge_cache.set_cache(pkg_list)
from calculate.update.utils.cl_update import ClUpdateAction
elog = EmergeLog(
@@ -393,7 +421,7 @@ class Update:
param = [param, "-pv"]
if not packages:
- self.printSUCCESS(_("The system is up to date"))
+ self.printSUCCESS(_("Installed packages are up to date"))
return True
with EmergeParser(EmergeCommand(list(packages),
extra_params=param)) as emerge:
@@ -422,6 +450,9 @@ class Update:
return True
def _emerge_translate(self, s):
+ """
+ Перевести текст из emerge
+ """
return RegexpLocalization('cl_emerge').translate(str(s))
def setUpToDateCache(self):
@@ -431,6 +462,25 @@ class Update:
self.updateCache(PackageList([]))
return True
+ def _startEmerging(self, emerge):
+ """
+ Настроить и выполнить emerge
+ """
+ emerge.command.send("yes\n")
+ emerge.emerging.add_observer(self._printEmergePackage)
+ emerge.installing.add_observer(self._printInstallPackage)
+ emerge.uninstalling.add_observer(self._printUninstallPackage)
+ try:
+ emerge.run()
+ except EmergeError:
+ self.emerge_cache.drop_cache()
+ if emerge.emerging_error:
+ self.printPre(
+ self._emerge_translate(emerge.emerging_error.log))
+ else:
+ self.printPre(self._emerge_translate(emerge.prepare_error))
+ raise
+
def emerge(self, param, *packages):
"""
Выполнить сборку пакета
@@ -449,32 +499,12 @@ class Update:
emerge.question.action = lambda x: False
emerge.run()
if not emerge.install_packages.list:
- #self.printSUCCESS(_("Nothing to merge"))
return True
- #if ask_emerge:
- # self.printPre(str(emerge.install_packages))
except EmergeError:
self.emerge_cache.drop_cache()
self.printPre(self._emerge_translate(emerge.prepare_error))
raise
- #if (ask_emerge and self.askConfirm(
- # _("Would you like to merge these packages?")) == 'no'):
- # raise KeyboardInterrupt
- emerge.command.send("yes\n")
-
- emerge.emerging.add_observer(self._printEmergePackage)
- emerge.installing.add_observer(self._printInstallPackage)
- emerge.uninstalling.add_observer(self._printUninstallPackage)
- try:
- emerge.run()
- except EmergeError as e:
- self.emerge_cache.drop_cache()
- if emerge.emerging_error:
- self.printPre(
- self._emerge_translate(emerge.emerging_error.log))
- else:
- self.printPre(self._emerge_translate(emerge.prepare_error))
- raise
+ self._startEmerging(emerge)
return True
def depclean(self):
@@ -494,14 +524,7 @@ class Update:
if (self.askConfirm(
_("Would you like to unmerge these packages?")) == 'no'):
return False
- emerge.command.send("yes\n")
-
- emerge.uninstalling.add_observer(self._printUninstallPackage)
- try:
- emerge.run()
- except EmergeError:
- self.printPre(self._emerge_translate(emerge.emerging_error.log))
- raise
+ self._startEmerging(emerge)
return True
def update_task(self, task_name):
@@ -510,10 +533,10 @@ class Update:
"""
def decor(f):
- def wrapper(self, *args, **kwargs):
+ def wrapper(*args, **kwargs):
logger = EmergeLog(EmergeLogNamedTask(task_name))
logger.mark_begin_task()
- ret = f(self, *args, **kwargs)
+ ret = f(*args, **kwargs)
if ret:
logger.mark_end_task()
return ret
diff --git update/utils/cl_update.py update/utils/cl_update.py
index 111b369..033a3bd 100644
--- update/utils/cl_update.py
+++ update/utils/cl_update.py
@@ -58,6 +58,7 @@ class ClUpdateAction(Action):
'python_updater': "update python modules",
'perl_cleaner': "update perl modules",
'kernel_modules': "update kernel modules",
+ 'depclean': "depclean",
'xorg_modules': "update xorg modules",
'preserved_libs': "update preserved libs",
'revdep': "revdep rebuild"}
@@ -76,8 +77,12 @@ class ClUpdateAction(Action):
'condition': lambda Get:Get('cl_update_pretend_set') == 'off',
'depend': Tasks.result("premerge", eq='yes')
},
+ {'name': 'update_other',
+ 'condition': lambda Get: ( Get('cl_update_pretend_set') == 'off' and
+ Get('cl_update_sync_only_set') == 'off')
+ },
{'name': 'update:update_portage',
- 'group': __("Updating portage"),
+ 'group': __("Updating Portage"),
'tasks': [
{'name': 'update:update_portage_pkg',
'message': __("Updating {0}").format(
@@ -88,7 +93,7 @@ class ClUpdateAction(Action):
]
},
{'name': 'update:update_python',
- 'group': __("Updating python"),
+ 'group': __("Updating Python"),
'tasks': [
{'name': 'update:update_python_pkg',
'message': __('Updating {0}').format(
@@ -97,7 +102,7 @@ class ClUpdateAction(Action):
'condition': need_upgrade('dev-lang/python$')
},
{'name': 'update:python_updater',
- 'message': __('Updating python modules'),
+ 'message': __('Updating Python modules'),
'method': 'Update.emergelike("python-updater")',
'condition': was_installed('dev-lang/python$',
log_names['python_updater']),
@@ -115,7 +120,7 @@ class ClUpdateAction(Action):
'condition': need_upgrade('dev-lang/perl$')
},
{'name': 'update:perl_cleaner',
- 'message': __('Updating perl modules'),
+ 'message': __('Updating Perl modules'),
'method': 'Update.emergelike("perl-cleaner", "all")',
'condition': was_installed('dev-lang/perl$',
log_names['perl_cleaner']),
@@ -136,7 +141,7 @@ class ClUpdateAction(Action):
]
},
{'name': 'update:update_world',
- 'group': __("Updating all packages"),
+ 'group': __("Updating packages"),
'tasks': [
{'name': 'update:update_world',
'message': __("Calculating dependencies"),
@@ -144,52 +149,54 @@ class ClUpdateAction(Action):
}
]
},
- {'name': 'update:depclean',
+ {'name': 'update_other:depclean',
'group': __("Cleaning system from needless packages"),
'tasks': [
- {'name': 'update:update_depclean',
+ {'name': 'update_other:update_depclean',
'message': __("Emerge depclean"),
'method': 'Update.depclean()',
+ 'condition': was_installed('.*', log_names['depclean']),
+ 'decoration': 'Update.update_task("%s")' % log_names['depclean']
},
]
},
- {'name': 'update:update_modules',
+ {'name': 'update_other:update_modules',
'group': __("Rebuilding dependent modules"),
'tasks': [
- {'name': 'update:module_rebuild',
- 'message': __('Updating kernel modules'),
+ {'name': 'update_other:module_rebuild',
+ 'message': __('Updating Kernel modules'),
'method': 'Update.emerge("@module-rebuild")',
'condition': was_installed('sys-kernel/.*source',
log_names['kernel_modules']),
'decoration': 'Update.update_task("%s")' % log_names[
'kernel_modules']
},
- {'name': 'update:x11_module_rebuild',
- 'message': __('Updating xorg-server modules'),
+ {'name': 'update_other:x11_module_rebuild',
+ 'message': __('Updating X.Org server modules'),
'method': 'Update.emerge("@x11-module-rebuild")',
'condition': was_installed('x11-base/xorg-server',
log_names['xorg_modules']),
'decoration': 'Update.update_task("%s")' % log_names[
'xorg_modules']
},
- {'name': 'update:preserved_rebuild',
+ {'name': 'update_other:preserved_rebuild',
'message': __('Updating preserved libraries'),
'method': 'Update.emerge("@preserved-rebuild")',
'condition': was_installed('.*', log_names['preserved_libs']),
'decoration': 'Update.update_task("%s")' % log_names[
'preserved_libs']
},
- {'name': 'update:revdev_rebuild',
- 'message': __('Executing {0}').format("revdep-rebuild"),
- 'method': 'Update.emergelike("revdep-rebuild")',
+ {'name': 'update_other:revdev_rebuild',
+ 'message': __('Checking reverse dependencies'),
+ 'method': 'Update.revdep_rebuild("revdep-rebuild")',
'condition': was_installed('.*', log_names['revdep']),
'decoration': 'Update.update_task("%s")' % log_names['revdep']
},
- {'name': 'update:set_upto_date_cache',
- 'method': 'Update.setUpToDateCache()'
- }
]
},
+ {'name': 'update:set_upto_date_cache',
+ 'method': 'Update.setUpToDateCache()'
+ }
]
# список задач для дейсвия
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"))

@ -9,5 +9,6 @@ EBUILD calculate-utilities-3.2.0_alpha4-r2.ebuild 827 SHA256 5bc052d0127a8d9eb83
EBUILD calculate-utilities-3.2.0_alpha4-r3.ebuild 827 SHA256 55e3c689f7b9f63d44d5ee4463f2a9ca5e935961b47b999d6936244a2f3cca07 SHA512 7ad917b33b415a442c5022f81df4f81fb83c0a68ce5ab68bc2709fc3b051f693aa6a9768640759a7aaa70dcabe6870f4a43dea4943d526e9e52c54ea9d7f595c WHIRLPOOL 5062f3f2e6523c59e2bf48298a789024af5c81a969f1b182d481fb3b830a811ae9cf4aeefea49025c3baa33970b2d11deb56b547f6838c70597c80489ef3cefb
EBUILD calculate-utilities-3.2.0_alpha4-r4.ebuild 827 SHA256 af1f37610602ad63affaabdb89a4fc86176712346021b82dfae9cbed3c525dc0 SHA512 83569e0abda57714131f63e0bd6188e9f26fe76d0246de6ed4e9e72dcd6568e1f35bf6da5680a283fc4c57caf64d0eca8bd59cef33d9643dcf828948a0746037 WHIRLPOOL 1636428c5177413bd18d461d5724d5e75dd60edf1fe573c53e0f0a3ba6147167ceddf4b3b86b38745b5fb51b1a6d1ec4ca9ef90e33a698c936480ce61c5d6f60
EBUILD calculate-utilities-3.2.0_alpha4-r5.ebuild 827 SHA256 788046721074b571d1da3ddcebdff9b512c7f4e53535a38ad7271b41a7bc60e2 SHA512 ce858fa8da3fa4bff0ce56b22b4a09f0d323cf755da48b957622e4268c67f4382beab9160f4416050885838fe3d43dc54e9275526e695e9042f11728bf34fa55 WHIRLPOOL 814f7cbb331444df618d1a5a8b106612118616f172fa7462c5070021cf7832daf385482e23d281eb745938045f6ef0bd8ee0a87483d627568fd17729695f12c1
EBUILD calculate-utilities-3.2.0_alpha4-r6.ebuild 827 SHA256 567baddea480a7bc2f14796ec1751b525d79d844dc6c231708d28052bcbd635d SHA512 9fbc4bf9103efba1dfd62cdcfd0eb8f1d2f7ba77be7c8daa4a4014929efe38f7627309b19fdfd5e90a2d5bc55b964096d5a16a56488e060ae1843850c453fb34 WHIRLPOOL b99b8964c5d565846ef88f7fce6a85611383efa9b2fd799f44d0894a707fff69956d0e7a2e95f544be3e0feb642845b5846d4468d5cc01804483c115fd0f6518
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

@ -0,0 +1,26 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
DESCRIPTION="Calculate Utilities meta package"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
SRC_URI=""
LICENSE="Apache-2.0"
SLOT="3"
KEYWORDS="amd64 x86"
IUSE="cl_consolegui cl_client cl_desktop cl_console"
RDEPEND="${RDEPEND}
=sys-apps/calculate-install-3.2.0_alpha4-r1
=sys-apps/calculate-i18n-3.2.0_alpha4
=sys-apps/calculate-lib-3.2.0_alpha4-r3
=sys-apps/calculate-core-3.2.0_alpha4-r4
=sys-apps/calculate-update-3.2.0_alpha4-r4
cl_client? ( =sys-apps/calculate-client-3.2.0_alpha4 )
cl_desktop? ( =sys-apps/calculate-desktop-3.2.0_alpha4 )
cl_consolegui? ( =sys-apps/calculate-console-gui-3.2.0_alpha4 )
cl_console? ( =sys-apps/calculate-console-3.2.0_alpha4-r1 )
"
Loading…
Cancel
Save