parent
ecee67d7eb
commit
5fff4f4a5c
@ -0,0 +1,4 @@
|
||||
# Calculate comment=# format=samba cl_ver>=2.2.28.1
|
||||
[main]
|
||||
os_linux_build = #-os_builder_linux_build-#
|
||||
os_linux_filesnum = #-os_builder_linux_filesnum-#
|
@ -0,0 +1,31 @@
|
||||
# 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 utilities for builder tasks of Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND=">=sys-kernel/calckernel-3.4.18
|
||||
~sys-apps/calculate-install-2.2.28
|
||||
!<sys-apps/calculate-1.4.0_p20100921
|
||||
app-cdr/cdrkit
|
||||
sys-fs/squashfs-tools"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# add file counter
|
||||
epatch "${FILESDIR}/calculate-builder-2.2.28-filesnum_variable.patch"
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
diff --git a/pym/cl_builder.py b/pym/cl_builder.py
|
||||
index 0454986..d6477c7 100644
|
||||
--- a/pym/cl_builder.py
|
||||
+++ b/pym/cl_builder.py
|
||||
@@ -14,7 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
-__version__ = "2.2.28"
|
||||
+__version__ = "2.2.28.1"
|
||||
__app__ = "calculate-builder"
|
||||
|
||||
import os
|
||||
@@ -242,6 +242,7 @@ class cl_builder(color_print):
|
||||
# run dispatch conf interactive
|
||||
os.system("chroot %s /bin/bash -c '/usr/sbin/dispatch-conf'"%
|
||||
distrPath)
|
||||
+ self.printByResult(True);
|
||||
|
||||
def prepareSourceDistributive(self,distr):
|
||||
"""Unmount all bind,proc mount points from source distribute"""
|
||||
diff --git a/pym/cl_fill_builder.py b/pym/cl_fill_builder.py
|
||||
index 00ce478..fbaf6df 100644
|
||||
--- a/pym/cl_fill_builder.py
|
||||
+++ b/pym/cl_fill_builder.py
|
||||
@@ -23,7 +23,7 @@ from os import access, R_OK,W_OK
|
||||
from os import path
|
||||
from cl_distr import Distributive
|
||||
from cl_utils import getTupleVersion,genpassword,pathJoin,_toUNICODE, \
|
||||
- getFilesCount,getCmdLineParam
|
||||
+ getFilesCount,getCmdLineParam,countFiles
|
||||
from operator import itemgetter
|
||||
from types import ListType
|
||||
from cl_datavars import iniParser
|
||||
@@ -276,6 +276,11 @@ class fillVars(object, varsShare):
|
||||
self.detectOtherShortname(systemRoot) or \
|
||||
"Linux"
|
||||
|
||||
+ def get_os_builder_linux_filesnum(self):
|
||||
+ """Files number in image system"""
|
||||
+ systemRoot = self.Get('cl_builder_path')
|
||||
+ return str(countFiles(systemRoot))
|
||||
+
|
||||
def get_os_builder_linux_ver(self):
|
||||
"""Build system ver"""
|
||||
linuxShortName = self.Get("os_builder_linux_shortname")
|
||||
diff --git a/pym/cl_vars_builder.py b/pym/cl_vars_builder.py
|
||||
index 8be43e7..44e4965 100644
|
||||
--- a/pym/cl_vars_builder.py
|
||||
+++ b/pym/cl_vars_builder.py
|
||||
@@ -117,6 +117,9 @@ class Data:
|
||||
# build system build
|
||||
os_builder_linux_build = {'mode':'r','value':''}
|
||||
|
||||
+ # filesnum in build system
|
||||
+ os_builder_linux_filesnum = {'mode':'r'}
|
||||
+
|
||||
# build system arch
|
||||
os_builder_arch_machine = {}
|
||||
|
@ -0,0 +1,47 @@
|
||||
# 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 library for Calculate 2"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="2.2"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="minimal"
|
||||
DEPEND="!<sys-apps/calculate-lib-2.1.8-r1
|
||||
!=sys-apps/calculate-lib-2.1.9
|
||||
!=sys-apps/calculate-lib-2.1.10
|
||||
!minimal? ( dev-python/py-smbpasswd )
|
||||
>=dev-python/pyxml-0.8
|
||||
sys-apps/iproute2
|
||||
sys-apps/pciutils
|
||||
sys-fs/lvm2
|
||||
sys-fs/mdadm
|
||||
sys-apps/file[python]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# fix autoupdate user profile
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_update.patch"
|
||||
# fix ati name
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_ati_name.patch"
|
||||
# fix detect video by /etc/X11/xorg.conf
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_detect_video.patch"
|
||||
# fix detect ability gzip for squashfs-tools
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_detect_compress.patch"
|
||||
# fix detect util path and ifconfig
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_ifconfig.patch"
|
||||
# fix work with python 2.7.3 and pyxml
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-fix_work_with_python2_7_3.patch"
|
||||
# add countFiles and os_linux_filesnum
|
||||
epatch "${FILESDIR}/calculate-lib-2.2.28-add_os_linux_filesnum.patch"
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
commit fa0045eb2d30cfafa45e423cfe2f40f0d65660b0
|
||||
Author: Mike Hiretsky <mh@calculate.ru>
|
||||
Date: Fri May 11 16:25:25 2012 +0400
|
||||
|
||||
Add variable os_linux_filesnum. For compatible with 3.0.
|
||||
|
||||
diff --git a/pym/cl_utils.py b/pym/cl_utils.py
|
||||
index 93580e8..d49c6fb 100644
|
||||
--- a/pym/cl_utils.py
|
||||
+++ b/pym/cl_utils.py
|
||||
@@ -1445,3 +1445,17 @@ def tarLinks(rootpath,archpath,skip=[]):
|
||||
removeDirs)
|
||||
tar.close()
|
||||
return links
|
||||
+
|
||||
+def countFiles(dirpath,onefilesystem=True):
|
||||
+ """
|
||||
+ Count files in dirpath
|
||||
+ """
|
||||
+ num = 1
|
||||
+ for dirpath,dirnames,filenames in os.walk(dirpath):
|
||||
+ num += len(set(dirnames) | set(filenames))
|
||||
+ if onefilesystem:
|
||||
+ mountDirs = filter(lambda x:path.ismount(path.join(dirpath,x)),
|
||||
+ dirnames)
|
||||
+ for dirname in mountDirs:
|
||||
+ dirnames.remove(dirname)
|
||||
+ return num
|
||||
diff --git a/pym/cl_vars.py b/pym/cl_vars.py
|
||||
index 0e35f3f..23d0074 100644
|
||||
--- a/pym/cl_vars.py
|
||||
+++ b/pym/cl_vars.py
|
||||
@@ -127,6 +127,9 @@ class Data:
|
||||
# system version
|
||||
os_linux_build = {'hide':True}
|
||||
|
||||
+ # files number
|
||||
+ os_linux_filesnum = {'hide':True}
|
||||
+
|
||||
# user login
|
||||
ur_login = {'hide':True}
|
||||
|
@ -0,0 +1,36 @@
|
||||
# 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_installgui
|
||||
cl_server
|
||||
"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
!sys-apps/calculate-templates
|
||||
=sys-apps/calculate-install-2.2.28-r1
|
||||
=sys-apps/calculate-lib-2.2.28-r7
|
||||
=sys-apps/calculate-i18n-2.2.28
|
||||
|
||||
cl_assemble? ( =sys-apps/calculate-assemble-2.2.28-r4 )
|
||||
cl_builder? ( =sys-apps/calculate-builder-2.2.28-r1 )
|
||||
cl_client? ( =sys-apps/calculate-client-2.2.28-r1 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-2.2.28 )
|
||||
cl_installgui? ( =app-misc/calculate-install-gui-2.2.28 )
|
||||
|
||||
cl_server? ( =sys-apps/calculate-server-2.1.15-r5 )
|
||||
"
|
Loading…
Reference in new issue