diff --git a/bin/xbps-checkvers/main.c b/bin/xbps-checkvers/main.c index 65ed8cd8..f4495c25 100644 --- a/bin/xbps-checkvers/main.c +++ b/bin/xbps-checkvers/main.c @@ -635,6 +635,7 @@ static void rcv_printf(rcv_t *rcv, FILE *fp, const char *pkgname, const char *repover, const char *srcver) { + char tmpl[128], *p; const char *f; for (f = rcv->format; *f; f++) { @@ -659,6 +660,12 @@ rcv_printf(rcv_t *rcv, FILE *fp, const char *pkgname, const char *repover, case 'n': fputs(pkgname, fp); break; case 'r': fputs(repover, fp); break; case 's': fputs(srcver, fp); break; + case 't': + xbps_strlcpy(tmpl, rcv->fname, sizeof tmpl); + if ((p = strchr(tmpl, '/'))) + *p = '\0'; + fputs(tmpl, fp); + break; } } fputc('\n', fp); diff --git a/bin/xbps-checkvers/xbps-checkvers.1 b/bin/xbps-checkvers/xbps-checkvers.1 index 186fd52b..b0046a6d 100644 --- a/bin/xbps-checkvers/xbps-checkvers.1 +++ b/bin/xbps-checkvers/xbps-checkvers.1 @@ -56,6 +56,8 @@ The package name. The repository version. .It Cm \&%s The source package version. +.It Cm \&%t +The requested template name (this can be a sub package). .El .Pp The default format is