Re: t7900 fails with recent debian systemd?
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 6, 2023, 22:40 UTC
- Message-ID
- <CAPig+cT-vCraf2tfA3t3Rh6mLNTr0rB5mApmz0vu2MCRvssaVw@mail.gmail.com>
- In-Reply-To
- <20231206223612.GA650770@coredump.intra.peff.net>
On Wed, Dec 6, 2023 at 5:36 PM Jeff King <peff@peff.net> wrote:
Show 8 quoted lines
> After stracing, it is indeed looking for: > > trash directory.t7900-maintenance/systemd/user/git-maintenance@hourly.service > > but that file doesn't exist. We installed git-maintenance@hourly.timer, > and git-maintenance@.service. Is the latter supposed to be a wildcard of > some kind? Maybe the rules changed. I don't really know anything about > systemd.
Apparently, that's intentional. From builtin/gc.c:
/*
* No matter the schedule, we use the same service and can make
* use of the templating system. When installing
* git-maintenance@<schedule>.timer, systemd will notice that
* git-maintenance@.service exists as a template and will use this
* file and insert the <schedule> into the template at the
* position of "%i".
*/
static int systemd_timer_write_service_template(const char *exec_path)
{
char *local_service_name = xstrfmt(SYSTEMD_UNIT_FORMAT, "", "service");I'm not sure why the comment is talking about "%i", though.