jobd.pl: one update-only gc-only needs-gc-only bonanza
Allow the `--one PRJNAME` option to be repeated so that more than
one individually specified project may be processed during a single
run of jobd.pl.
This could be simulated simply by running jobd.pl multiple times,
but it's much more efficient just to allow the option to be repeated
instead.
Introduce new `--update-only`, `--gc-only` and `--needs-gc-only`
options that work with either the `--all-once` or `--one PRJNAME`
option.
Processing will be limited to the specified mode. In other words,
`--all-once --update-only` will run through all the projects once
but only perform any needed mirror updates while skipping any needed
gc operations.
Similarly `--all-once --gc-only` will run through all the projects
once but only perform any needed garbage collection operations while
skipping any needed mirror updates.
The `--all-once --needs-gc-only` combination works similarly to the
`--all-once --gc-only` combination except that the only garbage
collection operations that get run are for those projects with a
`.needsgc` file present in them. All other garbage collection and
mirror update operations are skipped.
With these new options it's possible to fine tune when jobd.pl
will perform various functions.
For example, `--all-once --needs-gc-only` could be run several
times per day while `--all-once --update-only` gets run just once
in the middle of the night and `--all-once --gc-only` gets run
just once a week at an off time.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>