diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2008-12-18 15:22:05 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2008-12-18 15:22:05 +0100 |
commit | 410ee70f54f462f72ac4993c608b34cd9fac1bd6 (patch) | |
tree | 45a621acd2eeac74bf27d337e64513f6b403aefb /postsync.d/regen-overlays | |
download | portage-ext-410ee70f54f462f72ac4993c608b34cd9fac1bd6.tar.gz portage-ext-410ee70f54f462f72ac4993c608b34cd9fac1bd6.tar.xz portage-ext-410ee70f54f462f72ac4993c608b34cd9fac1bd6.zip |
initial commit
currently supports:
auto-patch
add overlay to eix index
show diff to old eix index on emerge --sync
Add this to your make.conf:
# portage autopatch
PATCH_OVERLAY="/var/lib/portage/patches"
# portage overlays
source /etc/portage/overlays/make.conf
and create configs for the overlays in /etc/portage/overlays.
Currently the only supported options are LOCATION and
CACHE_FORMAT (for eix) in bash syntax like:
LOCATION="/var/portage/repositories/proaudio"
CACHE_FORMAT="parse*"
or something like this. If CACHE_FORMAT is missing the default
of eix is used.
For autopatch you have to put the patches in the subdir:
${PATCH_OVERLAY}/CATEGORY/PACKAGE/
All files in that directory with .patch extension are applied
during ebuild execution.
Diffstat (limited to 'postsync.d/regen-overlays')
-rwxr-xr-x | postsync.d/regen-overlays | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/postsync.d/regen-overlays b/postsync.d/regen-overlays new file mode 100755 index 0000000..4788e85 --- /dev/null +++ b/postsync.d/regen-overlays @@ -0,0 +1,62 @@ +#!/bin/bash +OVERLAY_CONFIG_DIR="$(update-eix --print EIXCFGDIR)/overlays" + +# error +eecho() { + case "x${NOCOLOR}" in + x[y,Y][e,E][s,S]|x-[t,T][r,R][u,U][e,E]|x) + echo -ne '\e[1;31m * \e[0m';; + x*) + echo -n " * ";; + esac + + echo "$*" +} + +# warning +wecho() { + case "x${NOCOLOR}" in + x[y,Y][e,E][s,S]|x-[t,T][r,R][u,U][e,E]|x) + echo -ne '\e[1;33m * \e[0m';; + x*) + echo -n " * ";; + esac + + echo "$*" +} + +# info +iecho() { + echo ">>> $*" +} + +iecho "Regenerating overlay config ..." + +if [ ! -d "${OVERLAY_CONFIG_DIR}" ] ; then + eecho "${OVERLAY_CONFIG_DIR} does not exists!" + return 1 +fi + +if [ ! -f "${OVERLAY_CONFIG_DIR}/make.conf" ] ; then + wecho "${OVERLAY_CONFIG_DIR}/make.conf does not exists, creating..." + touch "${OVERLAY_CONFIG_DIR}/make.conf" +fi + +echo "PORTDIR_OVERLAY=\"\${PORTDIR_OVERLAY}" > "${OVERLAY_CONFIG_DIR}/make.conf" + +for overlay_config in $(ls ${OVERLAY_CONFIG_DIR}); do + unset LOCATION + + if [[ "${overlay_config}" != "make.conf" ]] ; then + source ${OVERLAY_CONFIG_DIR}/${overlay_config} + if [[ -n "${LOCATION}" ]]; then + echo " ${LOCATION}" >> "${OVERLAY_CONFIG_DIR}/make.conf" + fi + fi +done + +echo "\"" >> "${OVERLAY_CONFIG_DIR}/make.conf" + +if [[ -z "$(grep "^[ \t]*source ${OVERLAY_CONFIG_DIR}/make.conf" /etc/make.conf)" ]] ; then + wecho "\"source ${OVERLAY_CONFIG_DIR}/make.conf\" not found in /etc/make.conf" +fi |