* обновление утилит * миграция текущих профилей и расположения репозиториев * исправление текущих Calculate утилит для работы с шаблонами, расположенными по симлинкуmhiretskiy
parent
cb51f6d9a9
commit
dabdba045d
@ -0,0 +1,315 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
# @ECLASS: calculate-utils-r6.eclass
|
||||
# @MAINTAINER:
|
||||
# support@calculate.ru
|
||||
# @AUTHOR:
|
||||
# Author: Mir Calculate
|
||||
# @BLURB: Functions for calculate-utils
|
||||
# @DESCRIPTION:
|
||||
# This eclass use for calculate-utils ebuild
|
||||
|
||||
PYTHON_COMPAT=(python2_7)
|
||||
|
||||
inherit distutils-r1 eutils versionator
|
||||
|
||||
EXPORTED_FUNCTIONS="src_compile src_install pkg_preinst"
|
||||
|
||||
CALCULATE_URI="ftp://ftp.calculate-linux.org/calculate/source/calculate3"
|
||||
MIRROR_URI="http://mirror.yandex.ru/calculate/source/calculate3"
|
||||
|
||||
# @ECLASS-VARIABLE: CALCULATE_MODULES
|
||||
# @DESCRIPTION:
|
||||
# Associative array module names and versions
|
||||
# Example:
|
||||
# declare -A CALCULATE_MODULES=(
|
||||
# ["console-gui"]="3.2.3.4"
|
||||
# )
|
||||
|
||||
# @ECLASS-VARIABLE: CALCULATE_MODULES_USE
|
||||
# @DESCRIPTION:
|
||||
# Associative array module names and use for IUSE
|
||||
# Example:
|
||||
# declare -A CALCULATE_MODULES_USE=(
|
||||
# ["console-gui"]=""
|
||||
# )
|
||||
|
||||
# @ECLASS-VARIABLE: CALCULATE_TARBALL
|
||||
# @DESCRIPTION:
|
||||
# Associative array module names and tarball archive name
|
||||
# Example:
|
||||
# declare -A CALCULATE_TARBALL=( ["lib"]="calculate-lib-3.2.3-r1.tar.bz2" )
|
||||
|
||||
# @ECLASS-VARIABLE: UTILS_PV
|
||||
# @DESCRIPTION:
|
||||
# Default version of all components
|
||||
# Example:
|
||||
: ${UTILS_PV:=$(get_version_component_range 1-3 ${PV})}
|
||||
|
||||
declare -g -A CALCULATE_TARBALL_=()
|
||||
|
||||
declare -g -A CALCULATE_MODULES_=(
|
||||
["lib"]="$UTILS_PV"
|
||||
["builder"]="$UTILS_PV"
|
||||
["install"]="$UTILS_PV"
|
||||
["core"]="$UTILS_PV"
|
||||
["i18n"]="$UTILS_PV"
|
||||
["update"]="$UTILS_PV"
|
||||
["desktop"]="$UTILS_PV"
|
||||
["client"]="$UTILS_PV"
|
||||
["console-gui"]="$UTILS_PV"
|
||||
["console"]="$UTILS_PV"
|
||||
["server"]="$UTILS_PV"
|
||||
["ldap"]="$UTILS_PV"
|
||||
["unix"]="$UTILS_PV")
|
||||
|
||||
declare -g -A CALCULATE_MODULES_USE_=(
|
||||
["desktop"]="desktop"
|
||||
["client"]="client"
|
||||
["console-gui"]="qt5"
|
||||
["console"]="console"
|
||||
["server"]="server"
|
||||
["ldap"]="server"
|
||||
["unix"]="server"
|
||||
)
|
||||
|
||||
EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
|
||||
|
||||
# @FUNCTION: prepare_variables
|
||||
# @DESCRIPTION:
|
||||
# Prepare variables for ebuild
|
||||
prepare_variables() {
|
||||
for module in ${!CALCULATE_MODULES[@]}
|
||||
do
|
||||
CALCULATE_MODULES_[$module]=${CALCULATE_MODULES[$module]}
|
||||
done
|
||||
|
||||
for module in ${!CALCULATE_MODULES_USE[@]}
|
||||
do
|
||||
CALCULATE_MODULES_USE_[$module]=${CALCULATE_MODULES_USE[$module]}
|
||||
done
|
||||
|
||||
for module in ${!CALCULATE_MODULES_[@]}
|
||||
do
|
||||
MODULE_PN=calculate-${module}
|
||||
MODULE_PV=${CALCULATE_MODULES_[$module]}
|
||||
if [[ -n ${CALCULATE_TARBALL[$module]} ]]
|
||||
then
|
||||
CALCULATE_TARBALL_[$module]="${MODULE_PN}/${CALCULATE_TARBALL[$module]}"
|
||||
else
|
||||
CALCULATE_TARBALL_[$module]="${MODULE_PN}/${MODULE_PN}-${MODULE_PV}.tar.bz2"
|
||||
fi
|
||||
done
|
||||
|
||||
for module in ${!CALCULATE_MODULES_[@]}
|
||||
do
|
||||
MODULE_USE=${CALCULATE_MODULES_USE_[$module]}
|
||||
MODULE_URI=""
|
||||
for URI in $CALCULATE_URI $MIRROR_URI
|
||||
do
|
||||
MODULE_URI="${MODULE_URI} ${URI}/${CALCULATE_TARBALL_[$module]}"
|
||||
done
|
||||
if [[ -n $MODULE_USE ]]
|
||||
then
|
||||
MODULE_URI="${MODULE_USE}? ( $MODULE_URI )"
|
||||
fi
|
||||
SRC_URI="$SRC_URI $MODULE_URI"
|
||||
done
|
||||
|
||||
IUSE="+install dbus +gpg minimal pxe backup ${CALCULATE_MODULES_USE_[@]}"
|
||||
S="${WORKDIR}"
|
||||
}
|
||||
|
||||
# @FUNCTION: prepare_module_info
|
||||
# @DESCRIPTION:
|
||||
# Prepare module info for compile and install
|
||||
prepare_module_info() {
|
||||
MODULE_INFO=()
|
||||
for module in ${!CALCULATE_MODULES_[@]}
|
||||
do
|
||||
MODULE_USE=${CALCULATE_MODULES_USE_[$module]}
|
||||
if [[ -z $MODULE_USE ]] || use $MODULE_USE
|
||||
then
|
||||
MODULE_INFO+=("calculate-$module ${CALCULATE_MODULES_[$module]}")
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
prepare_variables
|
||||
|
||||
RDEPEND="
|
||||
install? ( >=app-cdr/cdrtools-3.01_alpha13
|
||||
>=sys-boot/grub-2.00-r3
|
||||
>=sys-boot/syslinux-5
|
||||
sys-fs/squashfs-tools
|
||||
sys-fs/dosfstools
|
||||
sys-block/parted
|
||||
sys-apps/gptfdisk
|
||||
sys-fs/lvm2
|
||||
sys-fs/mdadm
|
||||
)
|
||||
!minimal? (
|
||||
dev-python/passlib[python_targets_python2_7]
|
||||
>=sys-apps/util-linux-2.19.1
|
||||
net-misc/rsync
|
||||
dev-python/sudsds[python_targets_python2_7]
|
||||
net-libs/dslib[python_targets_python2_7]
|
||||
>=dev-python/pyopenssl-0.14[python_targets_python2_7]
|
||||
dev-libs/openssl
|
||||
dev-python/m2crypto[python_targets_python2_7]
|
||||
dev-python/cherrypy[python_targets_python2_7]
|
||||
dev-python/pytz[python_targets_python2_7]
|
||||
)
|
||||
gpg? (
|
||||
app-crypt/gnupg
|
||||
app-crypt/openpgp-keys-calculate-release
|
||||
)
|
||||
>=dev-python/pyxml-0.8[python_targets_python2_7]
|
||||
sys-apps/iproute2[-minimal]
|
||||
sys-apps/pciutils
|
||||
dev-python/progressbar[python_targets_python2_7]
|
||||
app-arch/xz-utils
|
||||
dev-python/pyinotify[python_targets_python2_7]
|
||||
sys-apps/file[python,python_targets_python2_7]
|
||||
|
||||
app-eselect/eselect-repository
|
||||
sys-apps/portage[python_targets_python2_7]
|
||||
dev-python/pyxattr[python_targets_python2_7]
|
||||
>=virtual/udev-197
|
||||
!app-misc/livecd-tools
|
||||
sys-apps/coreutils[xattr]
|
||||
|
||||
pxe? ( sys-apps/calculate-server
|
||||
net-ftp/tftp-hpa
|
||||
net-misc/dhcp
|
||||
net-fs/nfs-utils
|
||||
)
|
||||
|
||||
>=dev-python/soaplib-1.0
|
||||
!<sys-apps/calculate-server-2.1.18-r1
|
||||
|
||||
desktop? (
|
||||
media-gfx/feh
|
||||
x11-apps/xmessage
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
dev-lang/swig
|
||||
dev-qt/qdbus:5
|
||||
)
|
||||
|
||||
server? (
|
||||
sys-auth/pam_ldap
|
||||
sys-auth/nss_ldap
|
||||
dev-python/python-ldap
|
||||
)
|
||||
|
||||
client? (
|
||||
dev-python/py-smbpasswd
|
||||
>=dev-python/python-ldap-2.0[ssl,python_targets_python2_7]
|
||||
sys-auth/pam_client
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
)
|
||||
|
||||
qt5? (
|
||||
dev-python/dbus-python[python_targets_python2_7]
|
||||
|| (
|
||||
dev-python/pillow[python_targets_python2_7]
|
||||
dev-python/imaging[python_targets_python2_7]
|
||||
)
|
||||
dev-python/PyQt5[python_targets_python2_7]
|
||||
)
|
||||
|
||||
dbus? (
|
||||
dev-python/dbus-python
|
||||
)
|
||||
|
||||
dev-python/pexpect[python_targets_python2_7]
|
||||
|
||||
!<sys-apps/calculate-lib-2.1.12
|
||||
!sys-apps/calculate-lib:3
|
||||
!sys-apps/calculate-i18n:3
|
||||
!sys-apps/calculate-client:3
|
||||
!sys-apps/calculate-desktop:3
|
||||
!sys-apps/calculate-console:3
|
||||
!sys-apps/calculate-console-gui:3
|
||||
!sys-apps/calculate-update:3
|
||||
!sys-apps/calculate-install:3
|
||||
!sys-apps/calculate-core:3
|
||||
server? ( !sys-apps/calculate-server )
|
||||
backup? ( !sys-apps/calculate-server )
|
||||
"
|
||||
|
||||
DEPEND="sys-devel/gettext"
|
||||
|
||||
REQUIRED_USE="client? ( desktop )"
|
||||
|
||||
# @FUNCTION: calculate-utils-r6_src_compile
|
||||
# @DESCRIPTION:
|
||||
# Compile all modules of calculate utils
|
||||
calculate-utils-r6_src_compile() {
|
||||
if ! use backup
|
||||
then
|
||||
sed -ir "s/'cl-backup'/None/" calculate-core-*/pym/core/wsdl_core.py
|
||||
sed -ir "s/'cl-backup-restore'/None/" calculate-core-*/pym/core/wsdl_core.py
|
||||
sed -ir "s/__('Backup')/None/g" calculate-core-*/pym/core/wsdl_core.py
|
||||
fi
|
||||
prepare_module_info
|
||||
for MODULE in "${MODULE_INFO[@]}"
|
||||
do
|
||||
MODULE_DATA=( $MODULE )
|
||||
MODULE_PN=${MODULE_DATA[0]}
|
||||
MODULE_PV=${MODULE_DATA[1]}
|
||||
S="${WORKDIR}/${MODULE_PN}-${MODULE_PV}"
|
||||
cd $S
|
||||
if [[ $MODULE_PN == "calculate-lib" ]]
|
||||
then
|
||||
sed -ri "/class VariableClVer/{N;N;N;N;s/value = \".*?\"/value = \"${PV}\"/;}" \
|
||||
pym/calculate/lib/variables/__init__.py
|
||||
fi
|
||||
distutils-r1_src_compile
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: calculate-utils-r6_src_install
|
||||
# @DESCRIPTION:
|
||||
# Install all modules of calculate utils
|
||||
calculate-utils-r6_src_install() {
|
||||
prepare_module_info
|
||||
for MODULE in "${MODULE_INFO[@]}"
|
||||
do
|
||||
MODULE_DATA=( $MODULE )
|
||||
MODULE_PN=${MODULE_DATA[0]}
|
||||
MODULE_PV=${MODULE_DATA[1]}
|
||||
S="${WORKDIR}/${MODULE_PN}-${MODULE_PV}"
|
||||
cd $S
|
||||
distutils-r1_src_install
|
||||
done
|
||||
}
|
||||
|
||||
python_install() {
|
||||
PYTHON_INSTALL_PARAMS=
|
||||
if [[ $MODULE_PN == "calculate-client" ]]
|
||||
then
|
||||
PYTHON_INSTALL_PARAMS="--install-scripts=/usr/sbin"
|
||||
fi
|
||||
if [[ $MODULE_PN == "calculate-core" ]] && use dbus
|
||||
then
|
||||
PYTHON_INSTALL_PARAMS="$PYTHON_INSTALL_PARAMS --dbus"
|
||||
fi
|
||||
distutils-r1_python_install $PYTHON_INSTALL_PARAMS
|
||||
}
|
||||
|
||||
calculate-utils-r6_pkg_preinst() {
|
||||
dosym /usr/libexec/calculate/cl-core-wrapper /usr/bin/cl-core-setup
|
||||
dosym /usr/libexec/calculate/cl-core-wrapper /usr/bin/cl-core-patch
|
||||
dosym /usr/libexec/calculate/cl-core-wrapper /usr/bin/cl-update
|
||||
dosym /usr/libexec/calculate/cl-core-wrapper /usr/bin/cl-update-profile
|
||||
if use qt5
|
||||
then
|
||||
dosym /usr/lib/python-exec/python2.7/cl-console-gui /usr/bin/cl-console-gui-install
|
||||
dosym /usr/lib/python-exec/python2.7/cl-console-gui /usr/bin/cl-console-gui-update
|
||||
fi
|
||||
}
|
@ -1 +1 @@
|
||||
# Calculate append=skip merge(sys-apps/calculate-utils)!= pkg(sys-apps/calculate-utils[desktop])!=&&ini(merge-calculate.desktop)==||pkg(sys-apps/calculate-utils[desktop])==&&ini(merge-calculate.desktop)!= merge=gnome-base/gdm,gnome-base/gnome-shell,kde-base/kdm,lxde-base/lxdm,x11-misc/slim,x11-misc/lightdm,x11-misc/sddm
|
||||
# Calculate append=skip merge(sys-apps/calculate-utils)!= pkg(sys-apps/calculate-utils[desktop])!=&&ini(merge-calculate.desktop)==||pkg(sys-apps/calculate-utils[desktop])==&&ini(merge-calculate.desktop)!= merge=gnome-base/gdm,gnome-base/gnome-shell,kde-base/kdm,lxde-base/lxdm,x11-misc/slim,x11-misc/lightdm,x11-misc/sddm,sys-apps/portage,app-portage/layman
|
||||
|
@ -0,0 +1,116 @@
|
||||
# Calculate exec=/bin/bash mergepkg(sys-apps/calculate-utils)>=3.6.6&&ini(merge-calculate.utils)<3.6.6
|
||||
|
||||
declare -A name_url=()
|
||||
rep_name=( $( /usr/libexec/calculate/cl-variable --value update.cl_update_rep_name | tr "," " " ) )
|
||||
rep_url=( $( /usr/libexec/calculate/cl-variable --value update.cl_update_rep_url | tr "," " " ) )
|
||||
|
||||
convert_layman_to_eselect_repo() {
|
||||
repos="${rep_name[*]}"
|
||||
laymanfn=/etc/portage/repos.conf/layman.conf
|
||||
eselectfn=/etc/portage/repos.conf/eselect-repo.conf
|
||||
# move not calculate repositories from layman to eselect repo
|
||||
if ! [[ -f $eselectfn ]] && [[ -f $laymanfn ]]
|
||||
then
|
||||
sed -rn -f - $laymanfn >> $eselectfn <<-EOF
|
||||
/^\[/ {
|
||||
/\[(${repos// /|})\]/ {
|
||||
b;
|
||||
}
|
||||
p;
|
||||
:a
|
||||
n;
|
||||
/^(sync-type|priority) =/ {
|
||||
ba;
|
||||
}
|
||||
s/layman-type/sync-type/;
|
||||
s,location = /var/lib/layman/,location = /var/db/repos/,;
|
||||
p;
|
||||
/^$/ {
|
||||
b;
|
||||
}
|
||||
ba;
|
||||
}
|
||||
EOF
|
||||
[[ -s $eselectfn ]] || rm -f $eselectfn
|
||||
fi
|
||||
rm -f $laymanfn
|
||||
|
||||
# clear installed repos by layman
|
||||
installedxml=/var/lib/layman/installed.xml
|
||||
cat >$installedxml <<-EOF
|
||||
<repositories encoding="unicode" version="1.0">
|
||||
</repositories>
|
||||
EOF
|
||||
}
|
||||
|
||||
create_repo_calculate() {
|
||||
for k in ${!rep_name[*]}
|
||||
do
|
||||
name_url[${rep_name[$k]}]="${rep_url[$k]}"
|
||||
done
|
||||
|
||||
reposcalculatefn=/etc/portage/repos.conf/zz-calculate.conf
|
||||
gentoofn=/etc/portage/repos.conf/gentoo.conf
|
||||
|
||||
rm -f $gentoofn
|
||||
[[ -f $reposcalculatefn ]] && return 0
|
||||
|
||||
echo "Move layman to /var/db/repos"
|
||||
pushd /var/lib/layman &>/dev/null
|
||||
|
||||
cat >$reposcalculatefn <<-EOF
|
||||
[DEFAULT]
|
||||
main-repo = gentoo
|
||||
|
||||
[gentoo]
|
||||
priority = 50
|
||||
sync-uri = ${name_url[gentoo]}
|
||||
location = /usr/portage
|
||||
auto-sync = Yes
|
||||
sync-type = calculate
|
||||
|
||||
EOF
|
||||
|
||||
for dn in *
|
||||
do
|
||||
if [[ -d $dn ]] && [[ -n ${name_url[$dn]} ]]
|
||||
then
|
||||
cat >>$reposcalculatefn <<-EOF
|
||||
[$dn]
|
||||
priority = 50
|
||||
sync-uri = ${name_url[$dn]}
|
||||
location = /var/db/repos/$dn
|
||||
auto-sync = Yes
|
||||
sync-type = calculate
|
||||
|
||||
EOF
|
||||
if ! [[ -d /var/db/repos/$dn ]]
|
||||
then
|
||||
mv -T /var/lib/layman/$dn /var/db/repos/$dn
|
||||
ln -sfT ../../db/repos/$dn /var/lib/layman/$dn
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
change_profile() {
|
||||
if /usr/libexec/calculate/cl-variable --value main.cl_template_path | grep -q var/lib/layman
|
||||
then
|
||||
local current_profile="$(readlink -f /etc/portage/make.profile)"
|
||||
if [[ -d "${current_profile}/20" ]]
|
||||
then
|
||||
echo "Changing profile"
|
||||
ln -sfT $(realpath --relative-to /etc/portage "${current_profile}/20") /etc/portage/make.profile
|
||||
else
|
||||
echo "Failed to upgrade profile to ${current_profile}/20"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
create_repo_calculate
|
||||
convert_layman_to_eselect_repo
|
||||
change_profile
|
||||
|
||||
exit 0
|
@ -0,0 +1 @@
|
||||
# Calculate append=remove name=make.conf path=/var/lib/layman
|
@ -0,0 +1,3 @@
|
||||
# Calculate format=patch os_install_arch_machine==i686 path=/usr/lib/python2.7/site-packages/calculate/lib name=cl_template.py
|
||||
<reg>dirsTemplates = self.objVar.Get\("cl_template_path_use"\)</reg>
|
||||
<text>dirsTemplates = [os.path.realpath(x) for x in self.objVar.Get("cl_template_path_use")]</text>
|
@ -0,0 +1,3 @@
|
||||
# Calculate format=patch os_install_arch_machine==x86_64 path=/usr/lib64/python2.7/site-packages/calculate/lib name=cl_template.py
|
||||
<reg>dirsTemplates = self.objVar.Get\("cl_template_path_use"\)</reg>
|
||||
<text>dirsTemplates = [os.path.realpath(x) for x in self.objVar.Get("cl_template_path_use")]</text>
|
@ -0,0 +1 @@
|
||||
# Calculate append=skip cl_ver>=3.6.6
|
@ -0,0 +1 @@
|
||||
# Calculate path=/usr/#-os_install_lib_path-#/#-os_install_python-#/site-packages/portage/sync/modules
|
@ -0,0 +1,29 @@
|
||||
# Copyright 2014-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
doc = """Calculate plug-in module for portage.
|
||||
Performs a git pull on repositories."""
|
||||
__doc__ = doc[:]
|
||||
|
||||
from portage.localization import _
|
||||
from portage.sync.config_checks import CheckSyncConfig
|
||||
from portage.util import writemsg_level
|
||||
|
||||
|
||||
module_spec = {
|
||||
'name': 'calcualte',
|
||||
'description': doc,
|
||||
'provides':{
|
||||
'calculate-module': {
|
||||
'name': "calculate",
|
||||
'sourcefile': "calculate",
|
||||
'class': "CalculateSync",
|
||||
'description': doc,
|
||||
'functions': ['sync'],
|
||||
'func_desc': {
|
||||
'sync': 'Performs a calculate overlay sychronization',
|
||||
},
|
||||
'validate_config': CheckSyncConfig,
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
# Copyright 2005-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
import io
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
import portage
|
||||
from portage import os
|
||||
from portage.util import writemsg_level, shlex_split
|
||||
from portage.util.futures import asyncio
|
||||
from portage.output import create_color_func, EOutput
|
||||
good = create_color_func("GOOD")
|
||||
bad = create_color_func("BAD")
|
||||
warn = create_color_func("WARN")
|
||||
from portage.sync.syncbase import NewBase
|
||||
|
||||
class CalculateSync(NewBase):
|
||||
'''Calculate sync class'''
|
||||
|
||||
short_desc = "Perform sync operations on calculate based repositories"
|
||||
|
||||
@staticmethod
|
||||
def name():
|
||||
return "CalculateSync"
|
||||
|
||||
|
||||
def __init__(self):
|
||||
NewBase.__init__(self, "cl-core", "sys-apps/calculate-utils")
|
||||
|
||||
def update(self):
|
||||
"""
|
||||
Internal function to update an existing calculate repository
|
||||
|
||||
@return: tuple of return code (0=success), whether the cache
|
||||
needs to be updated
|
||||
@rtype: (int, bool)
|
||||
"""
|
||||
|
||||
#calculate update
|
||||
exitcode = portage.process.spawn_bash(
|
||||
"/usr/sbin/cl-core --method update --rep %s "
|
||||
"--sync-only on --skip-eix-update -T none" % self.repo.name)
|
||||
if exitcode != os.EX_OK:
|
||||
msg = "!!! calculate update error; exiting."
|
||||
self.logger(self.xterm_titles, msg)
|
||||
writemsg_level(msg + "\n", noiselevel=-1, level=logging.ERROR)
|
||||
return (exitcode, False)
|
@ -0,0 +1 @@
|
||||
# Calculate append=remove pkg(sys-apps/calculate-utils)>=3.6.6
|
@ -1,9 +1 @@
|
||||
# Calculate comment=# protected path=/etc/portage/make.conf name=0-base
|
||||
#?os_install_locale_language!=ru#
|
||||
# Connecting overlays layman. You should not change this setting, as this may
|
||||
# disrupt the package manager.
|
||||
#!os_install_locale_language#
|
||||
# Подключение оверлеев в layman. Вы не должны изменять этот параметр, т.к.
|
||||
# это может нарушить работу пакетного менеджера.
|
||||
#os_install_locale_language#
|
||||
source /var/lib/layman/make.conf
|
||||
# Calculate comment=# append=remove path=/etc/portage/make.conf name=0-base
|
||||
|
@ -1,3 +1 @@
|
||||
# Calculate comment=#
|
||||
|
||||
source /var/lib/layman/make.conf
|
||||
# Calculate append=remove
|
||||
|
@ -0,0 +1,4 @@
|
||||
# Calculate format=samba name=ini.env ini(overlay-calculate.remerge)<#-cl_pass_file-# merge=sys-apps/calculate-utils,sys-apps/portage
|
||||
|
||||
[overlay-calculate]
|
||||
remerge = #-cl_pass_file-#
|
@ -0,0 +1,31 @@
|
||||
# Calculate run=/bin/bash pkg(sys-apps/calculate-utils)>=3.6.6 ini(overlay-calculate.revision)>=20191116.3
|
||||
|
||||
is_old_path() {
|
||||
/usr/libexec/calculate/cl-variable --value main.cl_template_path | grep -q var/lib/layman
|
||||
}
|
||||
|
||||
if is_old_path
|
||||
then
|
||||
current_profile="$(readlink -f /etc/portage/make.profile)"
|
||||
if [[ -d "${current_profile}/20" ]]
|
||||
then
|
||||
echo "Changing profile"
|
||||
ln -sfT $(realpath --relative-to /etc/portage "${current_profile}/20") /etc/portage/make.profile
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! is_old_path && [[ -d /var/lib/layman ]]
|
||||
then
|
||||
#?pkg(app-portage/layman)==#
|
||||
echo "Removing /var/lib/layman"
|
||||
rm -rf /var/lib/layman
|
||||
#!pkg#
|
||||
if find /var/lib/layman -maxdepth 1 -type l &>/dev/null
|
||||
then
|
||||
find /var/lib/layman -maxdepth 1 -type l -delete
|
||||
fi
|
||||
#pkg#
|
||||
rm -f /etc/portage/make.conf/0-base
|
||||
fi
|
||||
|
||||
exit 0
|
@ -0,0 +1,23 @@
|
||||
# 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=(
|
||||
["lib"]="3.6.6.1"
|
||||
["install"]="3.6.6.1"
|
||||
["i18n"]="3.6.6.1"
|
||||
["update"]="3.6.6.1"
|
||||
)
|
||||
|
||||
inherit calculate-utils-r6
|
||||
|
||||
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="x86 amd64"
|
||||
|
Loading…
Reference in new issue