msuchy at redhat.com
Mon Jul 11 15:45:35 CEST 2016
Dne 8.7.2016 v 15:23 John Keeping napsal(a):
> Can't you already do this by removing scan-path from your config and
> instead adding something like:
> include /path/to/my/repo-list
For the record it is
(it took me some time to figure it out)
> and you can generate the repo-list file with:
> cgit --scan-path=/path/to/repositories >repo-list
Yes!! This is doing exectly what I wanted.
> It's not quite the same because the rest of the configuration won't have
> been loaded but I think we'd rather improve this mechanism that add
> manual cache mangement.
I patched /etc/cgitrc with
--- /etc/cgitrc 2016-07-11 12:50:16.761192000 +0000
+++ /etc/cgitrc.slow 2016-07-11 12:50:18.088191000 +0000
@@ -6,7 +6,7 @@
@@ -81,4 +81,4 @@
And created this hourly cronjob:
flock -n 9 || exit 1
# ... commands executed under lock ...
CGIT_CONFIG="/etc/cgitrc.slow" /var/www/cgi-bin/cgit --scan-path=/var/lib/dist-git/git/rpms
>/var/cache/cgit/repo-list.rc.new >/dev/null && mv -f /var/cache/cgit/repo-list.rc.new /var/cache/cgit/repo-list.rc
And - yes - it seems to do exactly what I wanted.
Miroslav Suchy, RHCA
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys
More information about the CGit