parent
8b6b6f097a
commit
875565261a
@ -0,0 +1,39 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="minimal"
|
||||
|
||||
DEPEND="~sys-apps/calculate-templates-2.2.15
|
||||
app-portage/layman
|
||||
!minimal? ( sys-boot/grub
|
||||
sys-apps/gptfdisk
|
||||
sys-fs/dosfstools
|
||||
sys-fs/squashfs-tools
|
||||
sys-block/parted )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# fix some bugs
|
||||
epatch "${FILESDIR}/calculate-install-2.2.15-fix_some_bugs.patch"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "For configure calculate-install perform:"
|
||||
einfo " cl-install --install"
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
diff --git a/pym/cl_distr.py b/pym/cl_distr.py
|
||||
index 6f8ee5b..dca1b97 100644
|
||||
--- a/pym/cl_distr.py
|
||||
+++ b/pym/cl_distr.py
|
||||
@@ -759,6 +759,11 @@ class PartitionDistributive(Distributive):
|
||||
def _mountPartition(self,partition,directory,opts=""):
|
||||
"""Mount partition to directory"""
|
||||
self._makeDirectory(directory)
|
||||
+ if "ntfs" in opts:
|
||||
+ source_dir = isMount(partition)
|
||||
+ if source_dir:
|
||||
+ self._mountToDirectory(source_dir,directory,"-o bind")
|
||||
+ return
|
||||
self._mountToDirectory(partition,directory,opts)
|
||||
|
||||
def _umountPartition(self,directory):
|
||||
diff --git a/pym/cl_fill_install.py b/pym/cl_fill_install.py
|
||||
index f602f23..aaaf2a4 100644
|
||||
--- a/pym/cl_fill_install.py
|
||||
+++ b/pym/cl_fill_install.py
|
||||
@@ -864,12 +864,12 @@ class fillVars(object, glob_attr):
|
||||
def get_os_install_x11_video_drv(self):
|
||||
"""Video driver used by xorg"""
|
||||
if self.Get('os_install_root_type') == 'usb-hdd':
|
||||
- avialable_drivers = getAvailableX11Drivers()
|
||||
+ available_drivers = getAvailableX11Drivers()
|
||||
videoVal = self.getValueFromCmdLine("calculate","video")
|
||||
videoVal = {'i915':'intel'}.get(videoVal,videoVal)
|
||||
- if videoVal in list_avialable_drivers:
|
||||
+ if videoVal in available_drivers:
|
||||
return videoVal
|
||||
- return self.getVideoByDefault(list_avialable_drivers)
|
||||
+ return self.getVideoByDefault(available_drivers)
|
||||
else:
|
||||
return self.Get('os_x11_video_drv')
|
||||
|
||||
diff --git a/pym/cl_install.py b/pym/cl_install.py
|
||||
index 2593f06..2f72aa7 100644
|
||||
--- a/pym/cl_install.py
|
||||
+++ b/pym/cl_install.py
|
||||
@@ -830,40 +830,22 @@ class cl_install(color_print, SignalInterrupt):
|
||||
return instnextres
|
||||
return curnextres
|
||||
|
||||
+ def printInstallTables(self):
|
||||
+ """Print install report"""
|
||||
+ title, headerList, dataList = self.generateTableData()
|
||||
+ tableObj = tableReport("", headerList, dataList)
|
||||
+ tableObj.printReport(False)
|
||||
+ title, headerList, dataList = self.generateTableBindData()
|
||||
+ if dataList:
|
||||
+ tableObj = tableReport(title, headerList, dataList)
|
||||
+ tableObj.printReport(False)
|
||||
+
|
||||
def printInfo(self,update=False):
|
||||
self.printSUCCESS(_("Installation") + " Calculate Linux")
|
||||
- self.defaultPrint("%s\n"%_("System information"))
|
||||
- self.printSUCCESS(_("Computer name")+": %s"%
|
||||
- self.clVars.Get('os_install_net_hostname'))
|
||||
- self.printSUCCESS(_("Domain name")+": %s"%
|
||||
- self.clVars.Get('os_install_net_domain'))
|
||||
- self.printSUCCESS(_("Network devices")+": %s"%
|
||||
- self.clVars.Get("os_net_interfaces_info"))
|
||||
- self.printSUCCESS(_("Installed system")+": %s %s"%
|
||||
- (self.clVars.Get('os_linux_name'),
|
||||
- self.clVars.Get('os_linux_ver')))
|
||||
- self.defaultPrint("%s\n"%_("Hardware"))
|
||||
- self.printSUCCESS(_("Machine hardware name")+": %s"%
|
||||
- self.clVars.Get('os_install_arch_machine'))
|
||||
- self.printSUCCESS(_("Quantity processors")+": %s"%
|
||||
- self.clVars.Get('hr_cpu_num'))
|
||||
- self.printSUCCESS(_("Videocard vendor")+": %s"%
|
||||
- self.clVars.Get('hr_video'))
|
||||
- self.printSUCCESS(_("{0} video driver").format("Xorg")+": %s"%
|
||||
- self.clVars.Get('os_install_x11_video_drv'))
|
||||
- self.printSUCCESS(_("Screen resolution")+": %s"%
|
||||
- self.clVars.Get('os_install_x11_resolution'))
|
||||
- self.defaultPrint("%s\n"%_("Localization"))
|
||||
- self.printSUCCESS(_("Language")+": %s"%
|
||||
- self.clVars.Get('os_install_locale_lang'))
|
||||
- self.printSUCCESS(_("Keymap")+": %s"%
|
||||
- self.clVars.Get('os_install_locale_xkbname'))
|
||||
- self.printSUCCESS(_("Timezone")+": %s"%
|
||||
- self.clVars.Get('os_install_clock_timezone'))
|
||||
-
|
||||
- self.defaultPrint("%s\n"%_("Location"))
|
||||
+ clGet = self.clVars.Get
|
||||
+ installedSystem = "%s %s"%(clGet('os_linux_name'),
|
||||
+ clGet('os_linux_ver'))
|
||||
mbrDevice = self.clVars.Get('os_install_mbr')
|
||||
- addonMbrInfo = ""
|
||||
if not mbrDevice in ("","off"):
|
||||
pathVendor = "/sys/block/%s/device/vendor"%mbrDevice
|
||||
pathModel = "/sys/block/%s/device/model"%mbrDevice
|
||||
@@ -871,30 +853,67 @@ class cl_install(color_print, SignalInterrupt):
|
||||
addonMbrInfo = " (%s %s)"% \
|
||||
(open(pathVendor,'r').read().strip(),
|
||||
open(pathModel,'r').read().strip())
|
||||
- self.printSUCCESS(_("Master boot record")+" (MBR): /dev/%s%s"%
|
||||
- (self.clVars.Get('os_install_mbr'),addonMbrInfo))
|
||||
+ else:
|
||||
+ addonMbrInfo = ""
|
||||
+ mbrdisk = "/dev/%s%s"%(clGet('os_install_mbr'),addonMbrInfo)
|
||||
else:
|
||||
- self.printSUCCESS(_("Master boot record")+
|
||||
- " (MBR): %s"%_("not changed"))
|
||||
-
|
||||
- title, headerList, dataList = self.generateTableData()
|
||||
- tableObj = tableReport("", headerList, dataList)
|
||||
- tableObj.printReport(False)
|
||||
- title, headerList, dataList = self.generateTableBindData()
|
||||
- if dataList:
|
||||
- tableObj = tableReport(title, headerList, dataList)
|
||||
- tableObj.printReport(False)
|
||||
-
|
||||
- self.defaultPrint("%s\n"%_("Network services"))
|
||||
- #self.printSUCCESS(_("Authentification")+": %s"%
|
||||
- # "<needed>")
|
||||
- self.printSUCCESS(_("PROXY")+": %s"%
|
||||
- (self.clVars.Get('os_install_proxy') or _("none")))
|
||||
- self.printSUCCESS(_("NTP")+": %s"%
|
||||
- (self.clVars.Get('os_install_ntp') or _("none")))
|
||||
-
|
||||
- self.defaultPrint("%s\n"%_("Perform pre-install checkups"))
|
||||
+ mbrdisk = _("not changed")
|
||||
+
|
||||
+ flash = clGet('os_install_root_type')=="flash"
|
||||
+ usbhdd = clGet('os_install_root_type')=="usb-hdd"
|
||||
+ hdd = clGet('os_install_root_type')=="hdd"
|
||||
+
|
||||
+ printData = [
|
||||
+ [(_("System information"),True),
|
||||
+ (_("Computer name"),clGet('os_install_net_hostname'),not flash),
|
||||
+ (_("Domain name"),clGet('os_install_net_domain'),not flash),
|
||||
+ (_("Network devices"),clGet('os_net_interfaces_info'),hdd),
|
||||
+ (_("Installed system"),installedSystem,True)
|
||||
+ ],
|
||||
+ [(_("Hardware"),hdd),
|
||||
+ (_("Machine hardware name"),
|
||||
+ clGet('os_install_arch_machine'),True),
|
||||
+ (_("Quantity processors"),clGet('hr_cpu_num'),True),
|
||||
+ (_("Videocard vendor"),clGet('hr_video'),True),
|
||||
+ (_("{0} video driver").format("Xorg"),
|
||||
+ clGet('os_install_x11_video_drv'),True),
|
||||
+ (_("Screen resolution"),clGet('os_install_x11_resolution'),True)
|
||||
+ ],
|
||||
+ [(_("Localization"),not flash),
|
||||
+ (_("Language"),
|
||||
+ clGet('os_install_locale_lang'),True),
|
||||
+ (_("Keymap"),clGet('os_install_locale_xkbname'),True),
|
||||
+ (_("Timezone"),clGet('os_install_clock_timezone'),True),
|
||||
+ ],
|
||||
+ [(_("Location"),True),
|
||||
+ (_("Master boot record")+" (MBR)",mbrdisk,True),
|
||||
+ (self.printInstallTables,None,True)
|
||||
+ ],
|
||||
+ [(_("Network services"),hdd),
|
||||
+ (_("PROXY"),
|
||||
+ clGet('os_install_proxy') or _("none"),True),
|
||||
+ (_("NTP"),clGet('os_install_ntp') or _("none"),True)
|
||||
+ ],
|
||||
+ [(_("Perform pre-install checkups"),True)]
|
||||
+ ]
|
||||
+
|
||||
+ for section in printData:
|
||||
+ sectionname,condition = section[0]
|
||||
+ # skip section
|
||||
+ if not (callable(condition) and condition() or \
|
||||
+ not callable(condition) and condition ):
|
||||
+ continue
|
||||
+ self.defaultPrint("%s\n"%sectionname)
|
||||
+ for label, data, cond in section[1:]:
|
||||
+ if not (callable(cond) and cond() or \
|
||||
+ not callable(cond) and cond ):
|
||||
+ continue
|
||||
+ if callable(label):
|
||||
+ label()
|
||||
+ else:
|
||||
+ self.printSUCCESS(label+": %s"%data)
|
||||
|
||||
+ # preinstall checkups
|
||||
subname = self.clVars.Get('os_install_linux_subname')
|
||||
subname = (" %s"%subname) if subname else ""
|
||||
buildvar = self.clVars.Get('os_install_linux_build')
|
||||
@@ -1453,6 +1472,8 @@ class cl_install(color_print, SignalInterrupt):
|
||||
|
||||
Perform grub installation to disk, which has root partition
|
||||
"""
|
||||
+ if not path.exists('/sbin/grub'):
|
||||
+ raise DistributiveError(_("Cann't install bootloader"))
|
||||
grubProcess = process("/sbin/grub",
|
||||
"--device-map=%s/boot/grub/device.map"%target.getDirectory(),
|
||||
"--batch",stderr=STDOUT)
|
@ -0,0 +1,36 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=3
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="
|
||||
cl_assemble
|
||||
cl_builder
|
||||
cl_client
|
||||
cl_desktop
|
||||
cl_installgui
|
||||
cl_server
|
||||
"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-2.2.15-r1
|
||||
=sys-apps/calculate-templates-2.2.15-r1
|
||||
=sys-apps/calculate-lib-2.2.15
|
||||
|
||||
cl_assemble? ( =sys-apps/calculate-assemble-2.2.15 )
|
||||
cl_builder? ( =sys-apps/calculate-builder-2.2.15 )
|
||||
cl_client? ( =sys-apps/calculate-client-2.2.15 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-2.2.15 )
|
||||
cl_installgui? ( =app-misc/calculate-install-gui-2.2.15 )
|
||||
|
||||
cl_server? ( =sys-apps/calculate-server-2.1.13-r3 )
|
||||
"
|
||||
|
Loading…
Reference in new issue