parent
fe678ddea7
commit
77b58ff144
@ -0,0 +1,43 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=(python2_7)
|
||||
|
||||
declare -A CALCULATE_MODULES=(
|
||||
["update"]="3.4.1.1"
|
||||
["builder"]="3.4.1.1"
|
||||
["console-gui"]="3.4.1.1"
|
||||
)
|
||||
|
||||
inherit calculate-utils
|
||||
|
||||
DESCRIPTION="A set of Calculate utilities for system installation, build and upgrade"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate_utilities"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# fix prepare
|
||||
epatch "${FILESDIR}/calculate-builder-3.4.1.1-fix_prepare.patch"
|
||||
|
||||
# fix lock builder.env, fix remerge
|
||||
epatch "${FILESDIR}/calculate-lib-3.4.1.1-fix_lock_remerge.patch"
|
||||
|
||||
if use desktop
|
||||
then
|
||||
# fix sync faces
|
||||
epatch "${FILESDIR}/calculate-desktop-3.4.1.1-fix_faces_sync.patch"
|
||||
fi
|
||||
if use qt4
|
||||
then
|
||||
# fix plasma logout
|
||||
epatch "${FILESDIR}/calculate-console-gui-3.4.1.1-plasma_logout.patch"
|
||||
fi
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
diff --git a/calculate-lib-3.4.1/pym/calculate/lib/cl_template.py b/calculate-lib-3.4.1/pym/calculate/lib/cl_template.py
|
||||
index 5b6799b..0200233 100644
|
||||
--- a/calculate-lib-3.4.1/pym/calculate/lib/cl_template.py
|
||||
+++ b/calculate-lib-3.4.1/pym/calculate/lib/cl_template.py
|
||||
@@ -2557,7 +2557,8 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
|
||||
sMD = re.compile("[^\-\+\*\/]+")
|
||||
|
||||
# директория установленных программ
|
||||
- basePkgDir = "/var/db/pkg"
|
||||
+ pkgDir = "/var/db/pkg"
|
||||
+ basePkgDir = pkgDir
|
||||
|
||||
# кэш для проверки наличия пакета в портежах
|
||||
cachePortdir = {}
|
||||
@@ -2651,10 +2652,9 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
|
||||
"""Recalculate basedir and homedir"""
|
||||
# Директория другой системы
|
||||
self._chrootDir = self.objVar.Get("cl_chroot_path")
|
||||
- if self._chrootDir != '/':
|
||||
- # Изменение директории к базе пакетов
|
||||
- self.basePkgDir = pathJoin(self._chrootDir, self.basePkgDir)
|
||||
- self.basePkgDir = os.path.normpath(self.basePkgDir)
|
||||
+ # Изменение директории к базе пакетов
|
||||
+ self.basePkgDir = pathJoin(self._chrootDir, self.pkgDir)
|
||||
+ self.basePkgDir = os.path.normpath(self.basePkgDir)
|
||||
# Базовая директория переноса шаблонов "/mnt/calculate" или "/" и.т.д
|
||||
self._baseDir=pathJoin(self._chrootDir,self.objVar.Get("cl_root_path"))
|
||||
self._baseDir = os.path.normpath(self._baseDir)
|
||||
diff --git a/calculate-lib-3.4.1/pym/calculate/lib/utils/tools.py b/calculate-lib-3.4.1/pym/calculate/lib/utils/tools.py
|
||||
index 11fc8f7..7ecc462 100644
|
||||
--- a/calculate-lib-3.4.1/pym/calculate/lib/utils/tools.py
|
||||
+++ b/calculate-lib-3.4.1/pym/calculate/lib/utils/tools.py
|
||||
@@ -282,16 +282,14 @@ class Locker(object):
|
||||
""" Activated when used in the with statement.
|
||||
Should automatically acquire a lock to be used in the with block.
|
||||
"""
|
||||
- if self.lockf is not None:
|
||||
- self.acquire()
|
||||
+ self.acquire()
|
||||
return self
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
""" Activated at the end of the with statement.
|
||||
It automatically releases the lock if it isn't locked.
|
||||
"""
|
||||
- if self.lockf is not None:
|
||||
- self.release()
|
||||
+ self.release()
|
||||
|
||||
def __del__(self):
|
||||
""" Make sure that the FileLock instance doesn't leave a lockfile
|
Loading…
Reference in new issue