parent
b8966b2cad
commit
fdf4b3d327
@ -0,0 +1,45 @@
|
|||||||
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
EAPI="3"
|
||||||
|
SUPPORT_PYTHON_ABIS="1"
|
||||||
|
PYTHON_DEPEND="2:2.7"
|
||||||
|
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||||
|
|
||||||
|
inherit distutils eutils
|
||||||
|
|
||||||
|
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||||
|
|
||||||
|
DESCRIPTION="The program of installation Calculate Linux"
|
||||||
|
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="3"
|
||||||
|
KEYWORDS="amd64 x86"
|
||||||
|
IUSE="pxe minimal"
|
||||||
|
|
||||||
|
DEPEND="~sys-apps/calculate-core-3.1.4_beta1
|
||||||
|
!<sys-apps/calculate-install-2.2.29
|
||||||
|
app-portage/layman
|
||||||
|
>=sys-fs/udev-197
|
||||||
|
!app-misc/livecd-tools
|
||||||
|
sys-apps/iproute2[-minimal]
|
||||||
|
!minimal? ( sys-boot/grub
|
||||||
|
sys-apps/gptfdisk
|
||||||
|
>=sys-apps/util-linux-2.19.1
|
||||||
|
sys-fs/dosfstools
|
||||||
|
sys-fs/squashfs-tools
|
||||||
|
sys-block/parted )
|
||||||
|
pxe? ( sys-apps/calculate-server
|
||||||
|
net-ftp/tftp-hpa
|
||||||
|
net-misc/dhcp
|
||||||
|
net-fs/nfs-utils )"
|
||||||
|
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
src_unpack() {
|
||||||
|
unpack "${A}"
|
||||||
|
cd "${S}"
|
||||||
|
|
||||||
|
# apply revision changes
|
||||||
|
epatch "${FILESDIR}/calculate-install-3.1.4_beta1-r3.patch"
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
diff --git install/cl_install.py install/cl_install.py
|
||||||
|
index a225a7a..1b7af1b 100644
|
||||||
|
--- install/cl_install.py
|
||||||
|
+++ install/cl_install.py
|
||||||
|
@@ -154,7 +154,8 @@ class Install(color_print):
|
||||||
|
"""Check that system has grub2 in current and installed system"""
|
||||||
|
if self.clVars.Get('os_grub2_path'):
|
||||||
|
return bool(
|
||||||
|
- filter(lambda x:x.startswith('grub-1.99'),
|
||||||
|
+ filter(lambda x:x.startswith('grub-1.99') or \
|
||||||
|
+ x.startswith('grub-2'),
|
||||||
|
listDirectory('/var/db/pkg/sys-boot')))
|
||||||
|
return False
|
||||||
|
|
||||||
|
diff --git install/variables/disk.py install/variables/disk.py
|
||||||
|
index 1682186..f2f661e 100644
|
||||||
|
--- install/variables/disk.py
|
||||||
|
+++ install/variables/disk.py
|
||||||
|
@@ -338,7 +338,7 @@ class VariableOsDiskMount(ReadonlyVariable,DeviceHelper):
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
disk_hash = self.Get('os_disk_dev')
|
||||||
|
- fstab = FStab('/etc/fstab')
|
||||||
|
+ fstab = FStab('/etc/fstab',devs=disk_hash)
|
||||||
|
rootdev = self.Get('os_root_dev')
|
||||||
|
return map(lambda x: '/' if x == rootdev else fstab.getBy(eq=x) or "",
|
||||||
|
self.Get('os_disk_dev'))
|
||||||
|
@@ -364,7 +364,7 @@ class VariableOsDiskFormat(ReadonlyVariable):
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
"""Get current disk filesystem"""
|
||||||
|
- fstab = FStab('/etc/fstab')
|
||||||
|
+ fstab = FStab('/etc/fstab',devs=self.Get('os_disk_dev'))
|
||||||
|
def getFormat(device):
|
||||||
|
prop = getUdevDeviceInfo(name=device)
|
||||||
|
return prop.get('FSTAB_TYPE') or \
|
||||||
|
@@ -543,7 +543,7 @@ class VariableOsDiskOptions(ReadonlyVariable):
|
||||||
|
type = "list"
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
- fstab = FStab('/etc/fstab')
|
||||||
|
+ fstab = FStab('/etc/fstab',devs=self.Get('os_disk_dev'))
|
||||||
|
def getFormat(device):
|
||||||
|
return fstab.getBy(what=fstab.OPTS,eq=device)
|
||||||
|
return map(getFormat,
|
||||||
|
@@ -566,7 +566,7 @@ class VariableOsBindPath(ReadonlyVariable):
|
||||||
|
type = "list"
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
- fstab = FStab('/etc/fstab')
|
||||||
|
+ fstab = FStab('/etc/fstab',devs=self.Get('os_disk_dev'))
|
||||||
|
return fstab.getBy(what=fstab.NAME,where=fstab.OPTS,
|
||||||
|
_in="bind",allentry=True)
|
||||||
|
|
||||||
|
@@ -577,7 +577,7 @@ class VariableOsBindMountpoint(ReadonlyVariable):
|
||||||
|
type = "list"
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
- fstab = FStab('/etc/fstab')
|
||||||
|
+ fstab = FStab('/etc/fstab',devs=self.Get('os_disk_dev'))
|
||||||
|
return fstab.getBy(what=fstab.DIR,where=fstab.OPTS,
|
||||||
|
_in="bind",allentry=True)
|
||||||
|
|
||||||
|
diff --git install/variables/system.py install/variables/system.py
|
||||||
|
index 04d6455..088169b 100644
|
||||||
|
--- install/variables/system.py
|
||||||
|
+++ install/variables/system.py
|
||||||
|
@@ -490,12 +490,12 @@ class VariableOsGrub2Path(Variable):
|
||||||
|
"""
|
||||||
|
def get(self):
|
||||||
|
# find grub2-install
|
||||||
|
- grubInstall = getProgPath('/sbin/grub2-install')
|
||||||
|
+ grubInstall = getProgPath('/usr/sbin/grub2-install')
|
||||||
|
if grubInstall:
|
||||||
|
return grubInstall
|
||||||
|
# find grub-install and check, that this is grub2-install (ver 1.99)
|
||||||
|
- grubInstall = self.getProgPath('/sbin/grub-install')
|
||||||
|
- if grubInstall and filter(lambda x:"1.99" in x,
|
||||||
|
+ grubInstall = getProgPath('/usr/sbin/grub-install')
|
||||||
|
+ if grubInstall and filter(lambda x:"1.99" in x or "2.00" in x,
|
||||||
|
process(grubInstall,'-v')):
|
||||||
|
return grubInstall
|
||||||
|
return ""
|
@ -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="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.1.4_beta1-r3.patch"
|
||||||
|
}
|
@ -0,0 +1,132 @@
|
|||||||
|
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||||
|
index 2790486..563cb7f 100644
|
||||||
|
--- calculate/lib/cl_template.py
|
||||||
|
+++ calculate/lib/cl_template.py
|
||||||
|
@@ -2221,7 +2221,7 @@ class _file(_error):
|
||||||
|
return F_CONF
|
||||||
|
|
||||||
|
|
||||||
|
- def openFiles(self, nameFileTemplate, nameFileConfig):
|
||||||
|
+ def openFiles(self, nameFileTemplate, nameFileConfig, typeFormat=None):
|
||||||
|
"""Открывает шаблон и конфигурационный файл"""
|
||||||
|
self.textConfig = ""
|
||||||
|
self.textTemplate = ""
|
||||||
|
@@ -2231,7 +2231,7 @@ class _file(_error):
|
||||||
|
self.nameFileConfig = os.path.abspath(nameFileConfig)
|
||||||
|
self.nameFileTemplate = os.path.abspath(nameFileTemplate)
|
||||||
|
self.F_TEMPL = self.openTemplFile(self.nameFileTemplate)
|
||||||
|
- if not self.executeType:
|
||||||
|
+ if not self.executeType and typeFormat != "diff":
|
||||||
|
self.F_CONF = self.__openConfFile(self.nameFileConfig)
|
||||||
|
if self.F_TEMPL and self.F_CONF:
|
||||||
|
self.textTemplate = self.F_TEMPL.read()
|
||||||
|
@@ -4572,8 +4572,11 @@ gettext -d cl_template "$*"
|
||||||
|
pkgContents.writeContents()
|
||||||
|
self.filesApply = map(lambda x:autoUpdateDict.get(x,x),self.filesApply)
|
||||||
|
if filter(lambda x:"._cfg" in x, self.filesApply):
|
||||||
|
- self.printWARNING(_("Some config files need updating. Perform dispatch-conf."))
|
||||||
|
- if self.dispatchConf and self.objVar.Get('cl_dispatch_conf') == 'dispatch':
|
||||||
|
+ self.printWARNING(_("Some config files need updating. "
|
||||||
|
+ "Perform dispatch-conf."))
|
||||||
|
+ if self.dispatchConf and \
|
||||||
|
+ self.objVar.Get('cl_dispatch_conf') == 'dispatch' and \
|
||||||
|
+ self.objVar.Get('cl_ebuild_phase') == '':
|
||||||
|
self.dispatchConf(self.filesApply)
|
||||||
|
|
||||||
|
def scanningTemplates(self, scanDir, prefix=None, flagDir=False,
|
||||||
|
@@ -4610,7 +4613,7 @@ gettext -d cl_template "$*"
|
||||||
|
if stat.S_ISREG(statInfo):
|
||||||
|
if not self.processingFile(absPath, prefix, optDir):
|
||||||
|
ret = False
|
||||||
|
- break
|
||||||
|
+ continue
|
||||||
|
elif stat.S_ISDIR(statInfo):
|
||||||
|
# Обработка директории
|
||||||
|
retDir = self.processingDirectory(absPath, prefix,
|
||||||
|
@@ -4639,6 +4642,7 @@ gettext -d cl_template "$*"
|
||||||
|
self.stop = e.status()
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
+ self.clearErrors()
|
||||||
|
self.printWARNING(str(e))
|
||||||
|
finally:
|
||||||
|
self.objVar.defaultModule = prevModule
|
||||||
|
@@ -5431,7 +5435,7 @@ gettext -d cl_template "$*"
|
||||||
|
preReturn(pathProg)
|
||||||
|
return ([], False)
|
||||||
|
if not flagSymlink:
|
||||||
|
- self.openFiles(nameFileTemplate, pathOldFile)
|
||||||
|
+ self.openFiles(nameFileTemplate, pathOldFile,objHeadNew.fileType)
|
||||||
|
if self.getError():
|
||||||
|
return ([], False)
|
||||||
|
if not objHeadNew.params.has_key("chown"):
|
||||||
|
@@ -5656,9 +5660,8 @@ gettext -d cl_template "$*"
|
||||||
|
self.textTemplate = objTempl.processingFile(self.textConfig,
|
||||||
|
self.objVar.Get('cl_root_path'))
|
||||||
|
if objTempl.getError():
|
||||||
|
- self.setError(_("Failed to use patch ") + \
|
||||||
|
+ raise TemplatesError(_("Failed to use patch ") + \
|
||||||
|
nameFileTemplate)
|
||||||
|
- return False
|
||||||
|
elif formatTemplate == 'diff':
|
||||||
|
self.printSUCCESS(_("Applying patch")+ " " + \
|
||||||
|
os.path.basename(nameFileTemplate))
|
||||||
|
@@ -5979,6 +5982,7 @@ class scanDirectoryClt:
|
||||||
|
self.stop = e.status()
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
+ self.clearErrors()
|
||||||
|
self.printWARNING(str(e))
|
||||||
|
return True
|
||||||
|
|
||||||
|
diff --git calculate/lib/format/diff.py calculate/lib/format/diff.py
|
||||||
|
index 1f45e8e..210f7ec 100644
|
||||||
|
--- calculate/lib/format/diff.py
|
||||||
|
+++ calculate/lib/format/diff.py
|
||||||
|
@@ -43,6 +43,11 @@ class diff(_error):
|
||||||
|
patchDryRun.write(self.text)
|
||||||
|
if patchDryRun.success():
|
||||||
|
break
|
||||||
|
+ patchDryRun = process('/usr/bin/patch','-R','--dry-run',
|
||||||
|
+ '-p%d'%i,cwd=rootPath,)
|
||||||
|
+ patchDryRun.write(self.text)
|
||||||
|
+ if patchDryRun.success():
|
||||||
|
+ return ""
|
||||||
|
else:
|
||||||
|
self.setError(_("Patching failed"))
|
||||||
|
return False
|
||||||
|
diff --git calculate/lib/utils/device.py calculate/lib/utils/device.py
|
||||||
|
index 1ae7a07..3e7e181 100644
|
||||||
|
--- calculate/lib/utils/device.py
|
||||||
|
+++ calculate/lib/utils/device.py
|
||||||
|
@@ -23,9 +23,9 @@ from os import path
|
||||||
|
from calculate.lib.cl_lang import setLocalTranslate
|
||||||
|
setLocalTranslate('cl_lib3',sys.modules[__name__])
|
||||||
|
|
||||||
|
-def getUUIDDict(revers=False):
|
||||||
|
+def getUUIDDict(revers=False,devs=[]):
|
||||||
|
"""Get dict UUID -> dev"""
|
||||||
|
- blkidProcess = process("/sbin/blkid","-s","UUID","-c","/dev/null")
|
||||||
|
+ blkidProcess = process("/sbin/blkid","-s","UUID","-c","/dev/null",*devs)
|
||||||
|
if revers:
|
||||||
|
datafunc = lambda x,y: (y,x)
|
||||||
|
else:
|
||||||
|
diff --git calculate/lib/utils/files.py calculate/lib/utils/files.py
|
||||||
|
index a61deb9..cd94e92 100644
|
||||||
|
--- calculate/lib/utils/files.py
|
||||||
|
+++ calculate/lib/utils/files.py
|
||||||
|
@@ -722,12 +722,12 @@ class FStab(object):
|
||||||
|
fstab_file = '/etc/fstab'
|
||||||
|
NAME, DIR, TYPE, OPTS, FREQ, PASSNO = range(0,6)
|
||||||
|
|
||||||
|
- def __init__(self,fstab_file=None):
|
||||||
|
+ def __init__(self,fstab_file=None,devs=[]):
|
||||||
|
if fstab_file:
|
||||||
|
self.fstab_file = fstab_file
|
||||||
|
self.cache = []
|
||||||
|
self.rotateCache = []
|
||||||
|
- self.dictUUID = getUUIDDict()
|
||||||
|
+ self.dictUUID = getUUIDDict(devs=devs)
|
||||||
|
self.rebuildCache()
|
||||||
|
|
||||||
|
def rebuildCache(self):
|
@ -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.1.4_beta1-r3
|
||||||
|
=sys-apps/calculate-i18n-3.1.4_beta1
|
||||||
|
=sys-apps/calculate-lib-3.1.4_beta1-r3
|
||||||
|
=sys-apps/calculate-core-3.1.4_beta1-r3
|
||||||
|
=sys-apps/calculate-update-3.1.4_beta1
|
||||||
|
cl_client? ( =sys-apps/calculate-client-3.1.4_beta1 )
|
||||||
|
cl_desktop? ( =sys-apps/calculate-desktop-3.1.4_beta1-r1 )
|
||||||
|
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.4_beta1 )
|
||||||
|
cl_console? ( =sys-apps/calculate-console-3.1.4_beta1 )
|
||||||
|
"
|
Loading…
Reference in new issue