Use our own example script for overlays
This commit is contained in:
parent
bb72ace040
commit
c0616bd6e3
12
README.md
12
README.md
@ -10,12 +10,8 @@ necessary to set up a gentoo github mirror based sync system:
|
||||
|
||||
## 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
|
||||
If you want your overlay metadata caches to be automatically regenerated
|
||||
as well, do:
|
||||
```sh
|
||||
chmod +x /etc/portage/repo.postsync.d/sync_overlay_cache
|
||||
```
|
||||
|
14
etc/portage/repo.postsync.d/sync_overlay_cache
Normal file
14
etc/portage/repo.postsync.d/sync_overlay_cache
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
repository_name="${1}"
|
||||
|
||||
[[ ${repository_name} == "gentoo" ]] && exit 0
|
||||
|
||||
source /lib/gentoo/functions.sh
|
||||
|
||||
# Number of jobs for egencache, default is number or processors.
|
||||
parallel_jobs="$(nproc)"
|
||||
|
||||
ebegin "Updating metadata cache for ${repository_name}"
|
||||
egencache --jobs="${parallel_jobs}" --repo="${repository_name}" --update --update-use-local-desc
|
||||
eend $?
|
Loading…
Reference in New Issue
Block a user