atratsevskiy
parent b65b0286b5
commit 511459b55c

@ -22,6 +22,7 @@ AUX calculate-lib-3.1.1_alpha2-r1.patch 1801 SHA256 e0fa0a7db2cd8d8fe290d04cbd60
AUX calculate-lib-3.1.1_alpha2-r2.patch 2386 SHA256 2e4616804916e9054fe51e799ecd4a355d8b3ce404c91328b45c4ee2a53be561 SHA512 0c0b49e7c43de8655e6df49805e4cf8e4ee621f6b7f134cc42dc5ac4be4a753f16036c0d7db4763a81ff620a9d3145b892b2c3b47f5863929c0ddf0e8db585e5 WHIRLPOOL 5d6017a88a0a4a12ca4d85a572452ba8ca6dd80292dc009ff3768d4dfbdc39b32b3c293f7df9ffbc3a83cfdb5b412a579b1e80064b2e8ab5163834dacad6304f
AUX calculate-lib-3.1.1_alpha2-r3.patch 4920 SHA256 3d3490321e45744947d70ac1668ae939b1a62fd7644fd2e7a4a9de1b4395bc44 SHA512 9cd94862a5cedb624e5d1e4787464bebfadbef638bd9f678fd24f16d3905d46c1c36f419e5ec63946830058ba74d0d04eeaa69fc62e2aaa59ab4639a134ab5c3 WHIRLPOOL b762a30632f3753c38c8d870d56dc65b7679e3f3308e854259d03f2b977c9d07398f9f730ebe0eefa1f7c8580b5c3e394411edb4488b16e210f4532990e8df41
AUX calculate-lib-3.1.1_alpha2-r4.patch 6797 SHA256 6067424bac12b0dd2c113e98038db7157705d48669c8574e93dc4308bf217e18 SHA512 bb4f49192ea410be808867e6f3124a6b859c4818a8262f486af03b93fa18cbb1d7b8d705595fd1c441fbd40a47d8919164b2bbb0cdb8677303fcaf0f8b1caab1 WHIRLPOOL d378bba2b0831fd776fbea8fae2597268c2c863597178eab31148b87e91032f2501e932244e596ad24146beb68843fd95cf12cd2c438380ce58903aae1866966
AUX calculate-lib-3.1.1_alpha2-r5.patch 7229 SHA256 ca651e451bbb8353b7a8f35eed6beeeb0a7ec3521b3d3186e8c2e00ba9f75609 SHA512 b436c23c3404a811b144d9bdb060a65db5c1ea641864ac424398a736bd6135bbf42f75c44e8f9b8931ef50ab57a5f2e4892ea018baa0d6ce89ae231acde4aee8 WHIRLPOOL 1fd69fb0a444c34f13323a883b28e5932c3d3bd5004c27997e0101b46bbde69871fec07a7a79b522fd40ecfda68a16980e2eaf3b811b0b2c3001b9e024f24db8
DIST calculate-lib-2.1.11.tar.bz2 61687 SHA256 62976c08d4fb4810389ace6f5a99abb5a962f6c8d9053ff943d0669480fb5599 SHA512 e3bc2168a55367cf19ad3a27921b53e5e845643238bf171209ab29752c91b5d4d338a2120774764ac1c79abd93f2deff8680f8faa1407940984ea9fd6a199e67 WHIRLPOOL 0ced92ea493dd8db02b0ae1514ebbb51ee76dc6f441b4a38c984c39da2121fb81dd1f2e840c4c5b71a117a12817a2a269d85676288202aa9801f69727e3338dc
DIST calculate-lib-2.2.29.tar.bz2 120378 SHA256 fc79bf29059ffb1519b6356cba34ebecb2e8c3222a29735f479254c371d363a3 SHA512 dc3c2c20cf0c5389b412b0cd2cba316b3d2367e981e147b3a94b6502ba329b598c7ccad5cd3462b3d7e884d05574c99b0e2e39df63e51d22221b86b783cb0925 WHIRLPOOL b3cdf6010c48d7a86a9f5a0c72effa8f0cc8ec0186fa28977132211dcaa5a3fe4a20ad3ec0b556478a9def1dc0e7c15404e3ab38080f986a4620634ee6570462
DIST calculate-lib-2.2.30.tar.bz2 120055 SHA256 a5aa07e5c5e02d27a8b9fad8c0e4bd0562d40d7a2753c2b57a18d99bd0dd6cb2 SHA512 7e8920f5fd855f05aba6576d5e4751ecf71a3e4107b46671d9a4be8557e1dd616adefad728b6a9ca87656dca6fd17d52bce41462b7fc906d20118e97607f1b1b WHIRLPOOL 0e8441484ee7d91c9926ab2deed8357272fecb2156e5dad45f865f6b13aff6c43868323dececc859ce7824bedd8794cec25b857be30afa83c44a81bcbcf510d2
@ -78,6 +79,7 @@ EBUILD calculate-lib-3.1.1_alpha2-r1.ebuild 821 SHA256 1189d428581e6cde80b3a0877
EBUILD calculate-lib-3.1.1_alpha2-r2.ebuild 821 SHA256 cd223474f7f4cd3c87f1cf6d75f7fda61fd6d33461e27f3a753710b7217840a7 SHA512 48a12926e36b8513b9feb1444f95f3b9ed80fac69329e9f0f17c97e42cab4cb11f44f1d678a6690e4a68268c07d8dad48b5cd05b04f7ac0034ce82e748dfe24c WHIRLPOOL 0d14e28c63383bfaeabf59d87d891d3a32ca4b9fd4e88af0743d27af24e1198781a2b435ab62be7c609f3debbad3b57fed8cde0a58d5a8890bbbed0a19bbdb80
EBUILD calculate-lib-3.1.1_alpha2-r3.ebuild 821 SHA256 c417d3904830c64de5978e26ef11f3b40b16d05c8fade33b299c3ff6e38c6bd1 SHA512 be152bf60027668ab3e49cdd15ff4e06f7599956db497f883d7c6c018dbfbb3a723b5c0b6b25de1eb1661474179a26f8ae5fd8d9e1a13eaf8bc8dae7c2024b9c WHIRLPOOL 93f32e6461d387fccb814b2332411c006c9a58e9280c8d96fb02ba4a5712c2e41203480512486fd11800faf8fce80546c27cdeb5c09f5e58d895e5dd11bcd5f9
EBUILD calculate-lib-3.1.1_alpha2-r4.ebuild 821 SHA256 c562f85ff455b300a04674f3b5e8d88efd85e3a09a28d1f62e18138b32326ff5 SHA512 442d202a23d9f6db5d3c18ebf367821ddb3c28b6a70c194403f5e7df250e2477b415a518b8117e0dfc3d927057ee9bc79958259b19581fbdfc9954bf31f29c87 WHIRLPOOL cd3cf784d4cf68cdf6d0be541377b9fb43342e60cdc7e6b41beb153fc2c2b1d2141468bd43534758265cf4349f83fc4b79360388ca955c9490481e8af68a8f57
EBUILD calculate-lib-3.1.1_alpha2-r5.ebuild 821 SHA256 86863fe32ddcb0408d1376f7473878840c72e974aef825eca557c9b3ad38f926 SHA512 8c27740d76608c60f6a04ac425f3f9dc7c0559d1c43d3fa1157534c841caf6d6d9212e25ccfbabe164f1a710ab4e4d67ec484f5b8372f99c30c0adade281cfde WHIRLPOOL 4019fa57dae313436c2174a5aa1825a534ecc99f4332e3b43675cd67a0c442210ee6d6635d12c9b6e95e82d73d1e128e8019bdd6ec5bedd7f64a984b2722c06c
EBUILD calculate-lib-3.1.1_alpha2.ebuild 681 SHA256 6a6332013e5a56db775c6490b63b60f959528660b0982e6a414f1614c0b0ffa5 SHA512 19a71823543fe843a05a548207509ee4dcffa784c61e23c56cf17d2c651effbfc63914beb03f0977b804c5cc647407eecdcbdaed4d7478783bec46eee72a50fb WHIRLPOOL 5ffd414c804671057fe2a7a2176999eee0a75574a5043332d3c01f08b93635773800e6b5d9901993e4fbf7f95d175659d621be9231d08f8bdada2654e45f8e1d
EBUILD calculate-lib-3.1.9999.ebuild 708 SHA256 a1d64b7f014831bf6b0a38928d53cb55758b7a12e5f3e98fffd28025ffacbce1 SHA512 3873859a791941d421e2338b437521955da383ce986408f1a951305e2dd75a1a4f771c9ec2caa096c5c8ea6a1776d6d0ed99e025ffa786ba029cafdbadfa439b WHIRLPOOL 5ac1a10b53f810ab527a0ebe52bc87e8397e61375cf6e0acbed89d8f6b8385e72bf234e0fdce479c3a3f1652bb6e520710ce9356750a97d644c0db0a33f6facb
MISC ChangeLog 29851 SHA256 16ca15c794bce78eefc487ed372c3d4960078fbd4c5fe4524211688d0146ef97 SHA512 be6bdf290f391529dce0deb67bf9d367e42e407601dd581f7c08d082399b5860cff2a76d4d64dd876154d51e84f34499db06c715145ac64f78d168aae7e78dbf WHIRLPOOL 2561ccd1eefe3423d97c67aff5c0fe6c8ca624e527fb885b042c8e812194bb1635d7e7d7d86c534562eb780c6b9144d92e24893f2d0696cf8a34a6a912a45788

@ -0,0 +1,35 @@
# 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=""
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.1.1_alpha2-r5.patch"
}

@ -0,0 +1,165 @@
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
index 24ad307..10c0f04 100644
--- calculate/lib/cl_template.py
+++ calculate/lib/cl_template.py
@@ -2799,6 +2799,33 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
else:
return ""
+ def funcPkgw(self, funArgv, resS, localVars, textTemplateTmp, nameTemp):
+ """Функция шаблона pkgw(), возвращает аргумент если программа установлена"""
+ # Название программы
+ nameProg = funArgv.replace(" ","")
+ origProg = nameProg
+ # Замена функции в тексте шаблона
+ replace = ""
+ if "/" in nameProg:
+ category, spl, nameProg = nameProg.partition("/")
+ nameProg, spl, slot = nameProg.partition(":")
+ if not category in self.installCategory:
+ self.getInstallPkgGentoo(category=category)
+ self.installCategory.append(category)
+ replace = self.pkg(nameProg, slot=slot or None)
+ else:
+ if not self.flagAllPkgScan:
+ self.getInstallPkgGentoo()
+ templateFunction.flagAllPkgScan = True
+ nameProg,spl,slot = nameProg.partition(":")
+ replace = self.pkg(nameProg,
+ slot=slot)
+ if replace:
+ replace = origProg
+ textTemplateTmp = textTemplateTmp[:resS.start()] + replace +\
+ textTemplateTmp[resS.end():]
+ return textTemplateTmp
+
def funcPkg(self, funArgv, resS, localVars, textTemplateTmp, nameTemp):
"""Функция шаблона pkg(), выдает номер версии программы"""
# Название программы
@@ -2810,6 +2837,7 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
nameProg, spl, slot = nameProg.partition(":")
if not category in self.installCategory:
self.getInstallPkgGentoo(category=category)
+ self.installCategory.append(category)
replace = self.pkg(nameProg, slot=slot or None)
else:
if not self.flagAllPkgScan:
@@ -2894,6 +2922,31 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
textTemplateTmp[resS.end():]
return textTemplateTmp
+ def funcIn(self, funArgv, resS, localVars, textTemplateTmp, nameTemp):
+ """
+ Function in for check value in variable
+ """
+ terms = funArgv.replace(" ","").split(",")
+ # Название локальной переменной
+ nameLocVar = terms[0]
+ flagFoundVar = False
+ try:
+ value = self.objVar.Get(nameLocVar)
+ flagFoundVar = True
+ except:
+ pass
+ if flagFoundVar:
+ if value in terms[1:]:
+ replace = "1"
+ else:
+ replace = ""
+ else:
+ self.raiseErrTemplate(_("error: variable %s does not exist")\
+ %str(nameLocVar))
+ textTemplateTmp = textTemplateTmp[:resS.start()] + replace +\
+ textTemplateTmp[resS.end():]
+ return textTemplateTmp
+
def funcPush(self, funArgv, resS, localVars, textTemplateTmp, nameTemp):
"""локальная функция записывает значение переменной
@@ -3658,7 +3711,8 @@ re.M|re.S)
def executeTemplate(self, code, execPath):
"""Execute template"""
- p = process(execPath,lang=self.objVar.Get('os_locale_locale'))
+ p = process(execPath,lang=self.objVar.Get('os_locale_locale'),
+ envdict=os.environ)
if "/bin/bash" in code.partition('\n')[0]:
p.write("""function translate() {
gettext -d cl_template "$*"
diff --git calculate/lib/datavars.py calculate/lib/datavars.py
index 02b1d4a..1791281 100644
--- calculate/lib/datavars.py
+++ calculate/lib/datavars.py
@@ -33,9 +33,9 @@ from types import StringTypes
def addStdConfig(fileLst,prefix='/'):
stdPath = path.join(prefix,
- "/var/lib/layman/calculate/profiles/calculate.env")
+ "var/lib/layman/calculate/profiles/calculate.env")
if not stdPath in map(os.path.abspath,fileLst):
- return fileLst + [stdPath]
+ return [stdPath] + fileLst
return fileLst
def itemgetter(*args,**kwargs):
@@ -757,9 +757,10 @@ class SimpleDataVars:
searchProfile(iniFile,'calculate.env'),prefix=self.systemRoot),""))
else:
config = cl_template.iniParser(iniFile)
+ importVars = config.getAreaVars("main")
for varname in self.allVars.keys():
if not varname in self.cache:
- val = self.unserialize("string",config.getVar('main',varname))
+ val = self.unserialize("string",importVars.get(varname,''))
if val:
self.cache[varname] = val.encode('utf-8')
diff --git calculate/lib/format/world.py calculate/lib/format/world.py
index 69bfc4f..7d93488 100644
--- calculate/lib/format/world.py
+++ calculate/lib/format/world.py
@@ -22,7 +22,7 @@ class world(objShare):
"""Класс для обработки конфигурационного файла типа procmail
"""
- _comment = ""
+ _comment = "#"
configName = "world"
configVersion = "0.1"
sepFields = "\n"
@@ -66,15 +66,15 @@ class world(objShare):
for k in txtLines:
textLine = k + endtxtLines[z]
z += 1
- #findComment = self.reComment.search(textLine)
+ findComment = self.reComment.search(textLine)
if not textLine.strip():
field.br = textLine
fields.append(field)
field = fieldData()
- #elif findComment:
- # field.comment = textLine
- # fields.append(field)
- # field = fieldData()
+ elif findComment:
+ field.comment = textLine
+ fields.append(field)
+ field = fieldData()
else:
pars = textLine.strip()
field.name = pars
diff --git calculate/lib/variables/linux.py calculate/lib/variables/linux.py
index be3bbb2..79890fe 100644
--- calculate/lib/variables/linux.py
+++ calculate/lib/variables/linux.py
@@ -240,8 +240,8 @@ class LinuxDataVars(SimpleDataVars):
VariableOsLinuxBuild(systemRoot=systemRoot))
makeprofile = path.join(systemRoot,'etc/make.profile')
if os.path.exists(makeprofile):
- inifile = path.join('/etc',os.readlink('/etc/make.profile'))
- self.flIniFileFrom(makeprofile)
+ inifile = path.join(systemRoot,'etc',os.readlink('/etc/make.profile'))
+ self.flIniFileFrom(inifile)
inifile = "etc/calculate/calculate.env"
self.flIniFileFrom(path.join(systemRoot,inifile))
iniFile = "etc/calculate/calculate3.env"

@ -83,6 +83,7 @@ EBUILD calculate-utilities-3.1.1_alpha2-r4.ebuild 815 SHA256 12c8d2ca9c3813aaa2a
EBUILD calculate-utilities-3.1.1_alpha2-r5.ebuild 815 SHA256 9564585c5246c43680f53cde260fd42778e1623d51c379b2d5c27590f7173297 SHA512 944e6d28beccbb82a3b633f93b8c6beb93b24554619e27feb1fefeef28364e78e8294ebd776e144cd8e5d8c80708f1fb6168c2ee49b0bd04eb2e2ddf42366bcf WHIRLPOOL b5cdbe8e5588b430818da660c1faa9445c2d271e7530b59b68829ea90454f7579f5eb530d7f09b5ff739874f2701262f10f247f04cc4b9e062f5396b0ec615eb
EBUILD calculate-utilities-3.1.1_alpha2-r6.ebuild 815 SHA256 181acdf84ef736dc2f963ea172b23b7f27f34b698adb97d33541126fcc6ed937 SHA512 976b9e77c9389eac3f4439d8870c1390091c8867ccd581f17d4ff016e00f67bb97b05590edcdf5b143e1009dfbbdd36520196d7f0748e9b2195306d54cc112b0 WHIRLPOOL 055fa3b4472ed4117863d7145abd39fe07e741d2e9faad208781059202e31e7d82275cd1dd8766651e193b8d9e5659968f3f67a48871f6ba63dbdf19ef90f67d
EBUILD calculate-utilities-3.1.1_alpha2-r7.ebuild 815 SHA256 9453a1c643c029fb1e1439eafadf57f8e454c4a5e2a9c3af6cbc4e0c28699f95 SHA512 bb976b0cf31a6f737f85f8f4576f3fdd3ff96f7ca11d68ed5423ed40236a20601c890bfe1a8cdad37bef85d3c8e7c73b9f260f369e2a7819669b2ef34be1557a WHIRLPOOL 0c2c13f609d7a37d338e3b84f6bfb261e5ce3aa37acfe118f93d9340c6a749fb0060c1c728b76d70ec8a99f304f1fe554eb31059e9b9727984d39034061446f2
EBUILD calculate-utilities-3.1.1_alpha2-r8.ebuild 815 SHA256 17629e9dc309bacb1179aaa817eb1b5793b5ac1330fd5e4bbaeda396ffe4d011 SHA512 9b04df5e4883d6e081b67c7a272880e7309ceba3e26dce5182e5537bd7bcb70ffff5bdbf9c57e0be8507d33d662a1e3a38d33ef74fb56711ba3882cd7cedfdd1 WHIRLPOOL 30ef394a32b307860c07016def36cafe84a56c922fa7f9d936a1811d454716dbdd84da92476a100d7547b8d3652af28d26eb4fb722c767ddef6ce8da4c54edd4
EBUILD calculate-utilities-3.1.1_alpha2.ebuild 803 SHA256 53958a1bbe7d32ce748f6b28e38e9c72f98a8af00d9351583452a33863ed79d5 SHA512 f00e42a7c2bd52162c448d5f927409f7d35f593e93ea6a964bdda169f2f0663420c433d5ec8e123b3e8e39b248f7e34459d09c1008f8f1b77cd9fbf7631b2ef3 WHIRLPOOL ad34c29f862404f9c41caedecee41587420f87058296783ae8ab0e954f7e2012ab0f9658a46f698c12ba7e8723b34b6d01b3ea62ec4f769e45448f03b38e9266
EBUILD calculate-utilities-3.1.9999.ebuild 800 SHA256 9de4807341cb552ef8d4f702e9c4a0ca10c52c9d532cc2eb741cea29b92f09b5 SHA512 b35ed4d49c4943a5ad375e646bece419271900c50301153408b30dede0fe834e098baaa42a21c130730c0bc32ba09decc588277da6782d2010c18c9d8df679ae WHIRLPOOL 78e2c5ee8ef8356c4fc0275f920177778925278cad78585ed37c08048241f775030e59a0ced0696fba6379741fe865dc339d190c46b5f2173097328a73c64a24
MISC ChangeLog 38731 SHA256 7e70a0bc1f3b34c0011f3874773a698a4bb96eb6d3dad10903575156bb8578bc SHA512 2de466ea990b9eac702b81fd097c3f5d06d1f4db1a4bd1d1b7380b45e551f6fd62c16564ecfc810246157d3ef1113ae373041580e70981d44752e50ed6134bc0 WHIRLPOOL 5ca0cee1ad0e9419f91ec11a9629b9a29db9fcbed4f5ae0aef1f8a2170ff58112c8580d61884c56ee410a0abc201fa8f4419cea35077fc8bb84e733f6fa6f4db

@ -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=""
IUSE="cl_consolegui cl_client cl_desktop cl_console"
RDEPEND="${RDEPEND}
=sys-apps/calculate-install-3.1.1_alpha2-r3
=sys-apps/calculate-i18n-3.1.1_alpha2
=sys-apps/calculate-lib-3.1.1_alpha2-r5
=sys-apps/calculate-core-3.1.1_alpha2
=sys-apps/calculate-update-3.1.1_alpha2-r1
cl_client? ( =sys-apps/calculate-client-3.1.1_alpha2 )
cl_desktop? ( =sys-apps/calculate-desktop-3.1.1_alpha2-r1 )
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.1_alpha2 )
cl_console? ( =sys-apps/calculate-console-3.1.1_alpha2 )
"
Loading…
Cancel
Save