Update assemble

atratsevskiy
parent 42e43f5d94
commit 7652c0aa81

@ -2,9 +2,11 @@ AUX calculate-assemble-2.2.28-downgrade_check.patch 1384 RMD160 ef3a6cd9e0b01131
AUX calculate-assemble-2.2.28-python2.7_install.patch 963 RMD160 e660a7adf10ef67c3d4a9b215c8dfa136953c09b SHA1 bcb676e475b4a35284b419a050b4651b18a87f6b SHA256 6f209e6ff89788db4266719d3046a69c19e9142c3dc5433352fc7d9bf26780fb
AUX calculate-assemble-2.2.28-python_updater.patch 1007 RMD160 2af36b804109f1ed0bedc1c7fc1e3cc1472309af SHA1 06185ffe506c58ae21b5cff41035acc3d0d77b2a SHA256 aca1c137e6a01de48dd4341cf66d588f34efc849d0fcd957bac9de9223a47534
AUX calculate-assemble-2.2.28-update_world_bdeps.patch 696 RMD160 aa058b4258ebecad7d8e17aaf1b55cd2b9e62029 SHA1 27b476ea9afac6dffc39da8377e97739c1c15365 SHA256 b994dc5edb71bf85f55db5fb01328372cd9589735cab1ea3711947511f6d3b1a
AUX calculate-assemble-2.2.29-resolve_install_deps.patch 6080 RMD160 c48ff2185d4e79577ffca03548f1d6c37c3bc361 SHA1 72e6c5cc1d543f1f7f381b8b7da8d6acaf1d1ef2 SHA256 9b3d598804ec5cd5725132b827ef09ba6ded8e2c9adc81bf42d5ab44e78bcc85
DIST calculate-assemble-2.2.28.tar.bz2 26649 RMD160 b1d93606159e539aeb462100f16f74c00fcaa58b SHA1 50e258ea83d6e45042d02e538202fe88c294964a SHA256 ee49670a9de34721b5f228e65430cdde0ab4e6d9f63c74b8f6b72fb487911ff8
DIST calculate-assemble-2.2.29.tar.bz2 26801 RMD160 bdcad3c4f67c2030522005e5240a80f44e407aaa SHA1 cd4163a19664d7aaf164b644e5246305117534d6 SHA256 667ea38456ed7b66d3b20e01bc1390372c8c4e4e32c3c8b19ae6329a56f3da80
EBUILD calculate-assemble-2.2.28-r5.ebuild 959 RMD160 00f88d26bb1ce8fc96b678daafc4f5270f5dae3b SHA1 ebf4ffdbfcc9d1adba61a5489152a5d9d6a5ef52 SHA256 1a9ffdbadab94582121fd6b9babcffa1c7dccd3918691384a6c02a10bb49f0d7
EBUILD calculate-assemble-2.2.29-r1.ebuild 628 RMD160 5f23e5779b3c29abf9488619634ecd51545d7e2d SHA1 314ea94cac979a823076084d0ed9a2a8e04acffd SHA256 581aee82e1df4f7cde5df109a67fc99dcb4e7e4567b37fa074705275ebb557f8
EBUILD calculate-assemble-2.2.29.ebuild 481 RMD160 17a1e11611512e000a947b55766673d6f74f8e15 SHA1 65964cc682d13c74e2f0c4941c07422f5a1a730d SHA256 ffd8934651250abbf7adde8ce2218391c1f684ee2da24c0bf429f79dc4719783
EBUILD calculate-assemble-2.2.9999.ebuild 498 RMD160 2c78ad8ec93daa2714f37760bf62f1071160ba4b SHA1 31812083d2ac1e171b95e02519888690a747a706 SHA256 0371109c66629a5895716c2e5c867a3bb15437d9bbec95b9c5fe387de8bea62e
MISC ChangeLog 16531 RMD160 80f48b2586d89deeb11f886bd04f748fb0ed7912 SHA1 272ed7e7e96bd24c0d887a98086de3c4aa13376f SHA256 1030550948678eea2ed6b524372f6673ecaf508f89057b3a0419a3f2a1c986f0

@ -0,0 +1,27 @@
# Copyright 1999-2012 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 utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.29"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# resolve install depends
epatch "${FILESDIR}/calculate-assemble-2.2.29-resolve_install_deps.patch"
}

@ -0,0 +1,152 @@
commit 2e6c1c9d7e7f7f45366e81cf5a0a9ab744300b30
Author: Хирецкий Михаил <mh@calculate.ru>
Date: Fri Jun 22 10:11:30 2012 +0400
Move need for fill vars function from install
diff --git a/pym/cl_fill_assemble.py b/pym/cl_fill_assemble.py
index 8467c6c..5df5d55 100644
--- a/pym/cl_fill_assemble.py
+++ b/pym/cl_fill_assemble.py
@@ -15,6 +15,7 @@
# limitations under the License.
import os
+import sys
import re
import cl_overriding
import operator
@@ -22,13 +23,19 @@ from cl_vars_share import varsShare
from os import path
from cl_distr import DistributiveRepository
from cl_template import iniParser
-from cl_fill_install import fillVars as installFillVars
from cl_vars import Data as libData
from cl_utils import (_toUNICODE,isMount,pathJoin,listDirectory,readFile,
- readLinesFile,getProgPath)
+ readLinesFile,getProgPath,getUdevDeviceInfo)
from datetime import datetime
+from os import readlink,access,R_OK
+from cl_datavars import glob_attr
-class fillVars(installFillVars):
+from cl_lang import lang
+tr = lang()
+tr.setLocalDomain('cl_builder')
+tr.setLanguage(sys.modules[__name__])
+
+class fillVars(object, glob_attr):
def get_ac_assemble_prepare(self):
"""Need perform templates for assemble:prepare"""
if not self.Get('cl_action') in ('setup','make','break'):
@@ -209,7 +216,13 @@ class fillVars(installFillVars):
devices, [] )
return disks
- get_os_assemble_makeopts = installFillVars.get_os_install_makeopts
+ def get_os_assemble_makeopts(self):
+ """Get makeopts for make.conf file"""
+ cpunum = self.Get('hr_cpu_num')
+ if cpunum == 1:
+ return "-j1"
+ else:
+ return "-j%d"%(cpunum+1)
def get_os_assemble_gentoo_arch(self):
"""Get gentoo arch by arch machine"""
@@ -382,3 +395,95 @@ class fillVars(installFillVars):
if getProgPath(mkfsUtil):
return fs
return "ext2"
+
+ #########################################################
+ # Import from depricated install
+ #########################################################
+
+ def get_os_device_hash(self):
+ """Generate hash information about device"""
+ def onlyDisk(devpath):
+ """Check by udevadm that devpath is device (disk)"""
+ prop = getUdevDeviceInfo(devpath)
+ return prop.get("ID_TYPE","")=="disk" and \
+ prop.get("DEVTYPE","")=="disk"
+
+ # get usb device by '/dev/disk/by-id'(usb devices contain 'usb' in name)
+ diskIdPath = '/dev/disk/by-id'
+ if path.exists(diskIdPath):
+ usbdevices = \
+ map(lambda x: readlink(path.join(diskIdPath,x)).rpartition('/')[2],
+ filter(lambda x: x.startswith('usb-'),listDirectory(diskIdPath)))
+ else:
+ usbdevices = []
+ # get devices from /sys/block directories(discard mem,sr,loop and other)
+ sysBlockPath = '/sys/block'
+ devices = map(lambda x:path.join(sysBlockPath,x),
+ filter(lambda x: onlyDisk(path.join(sysBlockPath,x)),
+ filter(lambda x: not self.reWrongDevice.search(x),
+ listDirectory(sysBlockPath))))
+ device_hash = {}
+ # filling hash
+ for mapnum,device in enumerate(sorted(devices,key=self.separateDevice)):
+ # get information by udev
+ props = getUdevDeviceInfo(device)
+ if not "DEVNAME" in props:
+ continue
+ # DEVNAME - /dev/(device_name)
+ device = props['DEVNAME']
+ device_hash[device] = {}
+ # get partition table
+ # (if PART_TABLE_TYPE absent then get by child partition)
+ device_hash[device]['table'] = props.get('ID_PART_TABLE_TYPE',
+ self.getTableByChild(device))
+ # enumerate disk for legecy grub
+ device_hash[device]['map'] = mapnum
+ # if device is usb device
+ if path.basename(device) in usbdevices:
+ # check for usb flash (removeable fiel in sysfs contains "1")
+ removablePath = '/sys/block/%s/removable'%path.basename(device)
+ if os.access(removablePath,R_OK) and \
+ open(removablePath,'r').read().strip() == "1":
+ devtype = "flash"
+ else:
+ devtype = "usb-hdd"
+ else:
+ devtype = "hdd"
+ # set detect device type (hdd,flash or usb-hdd)
+ device_hash[device]['type'] = devtype
+ return device_hash
+
+
+ def separateDevice(self,device):
+ return map(lambda x: int(x) if x.isdigit() else x,
+ re.findall('\d+|\D+',device))
+
+ def getAttributeFromHash(self,var,attr):
+ hash = self.Get(var)
+ return map(lambda x: hash[x][attr] if attr in hash[x] else "",
+ sorted(hash.keys(),
+ key=self.separateDevice))
+
+ reWrongDevice = re.compile("|".join(['^fd','^ram','^loop']))
+
+ def getTableByChild(self,device):
+ """Get table by child partitions"""
+ syspath = getUdevDeviceInfo(name=device).get('DEVPATH','')
+ if not syspath.startswith('/sys'):
+ syspath = pathJoin('/sys',syspath)
+ shortnameDevice = path.basename(device)
+ childs = filter(lambda x:x.startswith(shortnameDevice),
+ listDirectory(syspath))
+ if childs:
+ child = pathJoin(syspath,childs[0])
+ return getUdevDeviceInfo(path=child).get('ID_PART_ENTRY_SCHEME','')
+ return ""
+
+ def get_os_device_dev(self):
+ """Devices"""
+ return sorted(self.Get('os_device_hash').keys(),
+ key=self.separateDevice)
+
+ def get_os_device_type(self):
+ """Device type (hdd,cdrom,usb-flash)"""
+ return self.getAttributeFromHash('os_device_hash','type')

@ -8,6 +8,7 @@ EBUILD calculate-utilities-2.2.28-r28.ebuild 872 RMD160 88ae3fe02208b7f6423ab6c4
EBUILD calculate-utilities-2.2.28-r29.ebuild 872 RMD160 fdf1bec718847b255330625ce0528618e9b6ccdb SHA1 90c335b3e6490a581f388a76676ca04a7b2b17ea SHA256 bb2af4726d22b294117a5394e2e424ecb16f9f960c527a2fd23917fec23d0b48
EBUILD calculate-utilities-2.2.28-r30.ebuild 873 RMD160 0e72023e82f3af9be5926dcedb644c295ba756dd SHA1 77c9d5746a8bbd14b5149d025bed278b2b2dc9c9 SHA256 71d524f6293cc785b2a0279911a7676ca674680af47fa63c03848c4111034cb3
EBUILD calculate-utilities-2.2.29-r1.ebuild 780 RMD160 0d96931fc9dff9877337dae9a2cbda15135dc6b6 SHA1 6172627ff0c5707d1d0bc2b92624b1bde96441bd SHA256 4bc0236f75dc0d1d4ca815991342e7b7225122c92f8bbf77cb19a5b4f42682ef
EBUILD calculate-utilities-2.2.29-r2.ebuild 783 RMD160 6e9d68a21186d2140f142a38eb680cd37b072e0f SHA1 62dddb2c26c6f7eeaa24a0e635a6b8fd2a30687f SHA256 a035144575277cf0323464ce4a1702bd403fd5d055361edc36dae38126963d95
EBUILD calculate-utilities-2.2.29.ebuild 777 RMD160 6fdff08ca0f396df7d47de35a31da4b7a1e7e8a7 SHA1 c029e2a5e88a2eb625604d50d7a1fc5b07a3fd0a SHA256 d4df15af0c92421568962faba7b1dcd99e44062a7dfa1a591fa47a7daa29cc88
EBUILD calculate-utilities-2.2.9999.ebuild 842 RMD160 f2c0fdc1068614b71a37f2226dcde4883ebd2876 SHA1 99f673a52934f552589baf6d12ed9bffc03b8ebd SHA256 56d97b7d2ce11d23b25d9036b4e2ee196b547ce1d11b0cc349a8205515b66bf1
EBUILD calculate-utilities-3.0.0_alpha5-r2.ebuild 573 RMD160 117b236c49975a49fd927b37088825c3c587f321 SHA1 8924f08f266157eb749821f70a97cb3d5bf8d73c SHA256 710d755d8fce836946b51df95f19afaa7e1ab9fa4d29df852069b77530adfe52

@ -0,0 +1,34 @@
# Copyright 1999-2012 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_server
"
RDEPEND="${RDEPEND}
!sys-apps/calculate-templates
!<sys-apps/calculate-install-3
=sys-apps/calculate-lib-2.2.29
=sys-apps/calculate-i18n-2.2.29
cl_assemble? ( =sys-apps/calculate-assemble-2.2.29-r1 )
cl_builder? ( =sys-apps/calculate-builder-2.2.29-r1 )
cl_client? ( =sys-apps/calculate-client-2.2.29 )
cl_desktop? ( =sys-apps/calculate-desktop-2.2.29 )
cl_server? ( =sys-apps/calculate-server-2.1.15-r6 )
"
Loading…
Cancel
Save