commit bff962cecbc50853aed42cd97d2cdabf60b5a1d7 Author: hasufell Date: Fri Aug 14 15:17:07 2015 +0200 Initial commit diff --git a/etc/paludis/hooks/sync_cache.bash b/etc/paludis/hooks/sync_cache.bash new file mode 100644 index 0000000..4033fd8 --- /dev/null +++ b/etc/paludis/hooks/sync_cache.bash @@ -0,0 +1,16 @@ +#!/bin/bash + +source "${PALUDIS_EBUILD_DIR}/echo_functions.bash" + +PORTDIR="/usr/portage" + +[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!" + + +die() { + eerror "${1}" + exit 1 +} + +einfo "syncing metadata cache" +egencache --jobs=8 --repo=gentoo --update --update-use-local-desc || die "egencache failed!" diff --git a/etc/paludis/hooks/sync_dtd.bash b/etc/paludis/hooks/sync_dtd.bash new file mode 100644 index 0000000..2a1b357 --- /dev/null +++ b/etc/paludis/hooks/sync_dtd.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +source "${PALUDIS_EBUILD_DIR}/echo_functions.bash" + +PORTDIR="/usr/portage" + +[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!" + + +die() { + eerror "${1}" + exit 1 +} + +cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!" +if [[ -e dtd ]] ; then + einfo "dtd dir already exists, updating..." + cd glsa || die "could not cd into 'dtd'!" + git pull --ff || die "could not pull updates!" +else + einfo "dtd directory does not exist, cloning..." + git clone https://anongit.gentoo.org/git/data/dtd.git || die "could not clone repository!" +fi + diff --git a/etc/paludis/hooks/sync_glsa.bash b/etc/paludis/hooks/sync_glsa.bash new file mode 100644 index 0000000..684e538 --- /dev/null +++ b/etc/paludis/hooks/sync_glsa.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +source "${PALUDIS_EBUILD_DIR}/echo_functions.bash" + +PORTDIR="/usr/portage" + +[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!" + + +die() { + eerror "${1}" + exit 1 +} + +cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!" +if [[ -e glsa ]] ; then + einfo "glsa dir already exists, updating..." + cd glsa || die "could not cd into 'glsa'!" + git pull --ff || die "could not pull updates!" +else + einfo "glsa directory does not exist, cloning..." + git clone https://anongit.gentoo.org/git/data/glsa.git || die "could not clone repository!" +fi + diff --git a/etc/paludis/hooks/sync_herds_xml.bash b/etc/paludis/hooks/sync_herds_xml.bash new file mode 100644 index 0000000..85ba769 --- /dev/null +++ b/etc/paludis/hooks/sync_herds_xml.bash @@ -0,0 +1,17 @@ +#!/bin/bash + +source "${PALUDIS_EBUILD_DIR}/echo_functions.bash" + +PORTDIR="/usr/portage" + +[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!" + + +die() { + eerror "${1}" + exit 1 +} + +cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!" +[[ -e "${PORTDIR}"/metadata/herds.xml ]] && { rm "${PORTDIR}"/metadata/herds.xml || die "failed to rm herds.xml!" ;} +wget https://gitweb.gentoo.org/proj/api.git/plain/files/packages/herds.xml || die "failed to wget herds.xml" diff --git a/etc/paludis/hooks/sync_news.bash b/etc/paludis/hooks/sync_news.bash new file mode 100644 index 0000000..6433376 --- /dev/null +++ b/etc/paludis/hooks/sync_news.bash @@ -0,0 +1,27 @@ +#!/bin/bash + +PORTDIR="/usr/portage" + +source "${PALUDIS_EBUILD_DIR}/echo_functions.bash" + +[[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] && die "PORTDIR empty or pointing to root!" + + +die() { + eerror "${1}" + exit 1 +} + +cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!" +if [[ -e news ]] ; then + einfo "news dir already exists, updating..." + cd news || die "could not cd into 'news'!" + git pull --ff || die "could not pull updates!" +else + einfo "glsa directory does not exist, cloning..." + git clone https://anongit.gentoo.org/git/proj/gentoo-news.git news || die "could not clone repository!" +fi + +cd "${PORTDIR}"/metadata/news || die "failed to cd into ${PORTDIR}/metadata/news" +git clean -fdxq || die "failed to clean git repo!" +cp -a */* . || die "could not copy news dirs to base news dir!" diff --git a/etc/paludis/repositories/gentoo.conf b/etc/paludis/repositories/gentoo.conf new file mode 100644 index 0000000..03f8167 --- /dev/null +++ b/etc/paludis/repositories/gentoo.conf @@ -0,0 +1,7 @@ +location = /usr/portage +sync = git+https://github.com/gentoo/gentoo.git +profiles = ${location}/profiles/default/linux/amd64/13.0 +distdir = /usr/portage/distfiles +format = e +names_cache = /var/cache/paludis/names +write_cache = /var/cache/paludis/metadata