diff --git a/README.md b/README.md index fd9207a..50b686c 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,8 @@ This is not a full portage configuration. It contains only those parts that are necessary to set up a gentoo github mirror based sync system: * Configures Portage to sync via https://github.com/gentoo/gentoo.git URL. -* Updates metadata-cache (the first update might take long, all subsequent ones not). +* Updates metadata-cache. * Updates the dtd directory. * Updates the glsa directory. * Updates `herds.xml` file. * Updates the news directory. - -## Notes ## - -Note that typically most repositories other than `gentoo` don't come with a pregenerated cache. It is a good idea to generate/update their cache every time they are synced. One way to do this, is by activating the `example` hook script that portage installs by default in `/etc/portage/postsync.d`: - -``` -cp -i /etc/portage/repo.postsync.d/example /etc/portage/repo.postsync.d/gen_cache -chmod +x /etc/portage/repo.postsync.d/gen_cache -``` diff --git a/etc/portage/repo.postsync.d/sync_gentoo_cache b/etc/portage/repo.postsync.d/sync_gentoo_cache index f7b1fe6..95863bf 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_cache +++ b/etc/portage/repo.postsync.d/sync_gentoo_cache @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - # Number of jobs for egencache, default is number or processors. parallel_jobs="$(nproc)" diff --git a/etc/portage/repo.postsync.d/sync_gentoo_dtd b/etc/portage/repo.postsync.d/sync_gentoo_dtd index d523356..56ad70d 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_dtd +++ b/etc/portage/repo.postsync.d/sync_gentoo_dtd @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - DTDDIR="${repository_path}"/metadata/dtd ebegin "Updating DTDs" if [[ -e ${DTDDIR} ]]; then diff --git a/etc/portage/repo.postsync.d/sync_gentoo_glsa b/etc/portage/repo.postsync.d/sync_gentoo_glsa index 6ce3e11..775ca90 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_glsa +++ b/etc/portage/repo.postsync.d/sync_gentoo_glsa @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - GLSADIR="${repository_path}"/metadata/glsa ebegin "Updating GLSAs" if [[ -e ${GLSADIR} ]]; then diff --git a/etc/portage/repo.postsync.d/sync_gentoo_herds_xml b/etc/portage/repo.postsync.d/sync_gentoo_herds_xml index 2075c35..277ee9f 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_herds_xml +++ b/etc/portage/repo.postsync.d/sync_gentoo_herds_xml @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - ebegin "Updating herds.xml" wget -q -O "${repository_path}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml eend $? diff --git a/etc/portage/repo.postsync.d/sync_gentoo_news b/etc/portage/repo.postsync.d/sync_gentoo_news index 78f9c41..bf24750 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_news +++ b/etc/portage/repo.postsync.d/sync_gentoo_news @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - NEWSDIR="${repository_path}"/metadata/news ebegin "Updating news items" if [[ -e ${NEWSDIR} ]]; then