Skip to content

Commit aae56d0

Browse files
committed
bin/xbps-checkvers: add --staging flag
1 parent 5c7ee3d commit aae56d0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

bin/xbps-checkvers/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ show_usage(const char *prog, bool fail)
9494
" -R, --repository=<url> Append repository to the head of repository list\n"
9595
" -r, --rootdir <dir> Set root directory (defaults to /)\n"
9696
" -s, --show-all List all packages, in the format 'pkgname repover srcver'\n"
97+
" --staging Enable use of staged packages\n"
9798
"\n [FILES...] Extra packages to process with the outdated\n"
9899
" ones (only processed if missing).\n", prog);
99100
return fail ? EXIT_FAILURE: EXIT_SUCCESS;
@@ -718,6 +719,7 @@ main(int argc, char **argv)
718719
{ "rootdir", required_argument, NULL, 'r' },
719720
{ "show-all", no_argument, NULL, 's' },
720721
{ "version", no_argument, NULL, 'V' },
722+
{ "staging", no_argument, NULL, 1 },
721723
{ NULL, 0, NULL, 0 }
722724
};
723725

@@ -765,6 +767,9 @@ main(int argc, char **argv)
765767
case 'V':
766768
printf("%s\n", XBPS_RELVER);
767769
exit(EXIT_SUCCESS);
770+
case 1:
771+
rcv.xhp.flags |= XBPS_FLAG_USE_STAGE;
772+
break;
768773
case '?':
769774
default:
770775
return show_usage(prog, true);

bin/xbps-checkvers/xbps-checkvers.1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ tree and prints version available in repository and srcpkgs with the following f
9292
If any version can't be resolved,
9393
.Em ?
9494
is printed instead.
95+
.It Fl -staging
96+
Enables the use of staged packages from remote repositories.
9597
.It Fl V, Fl -version
9698
Show the version information.
9799
.El

0 commit comments

Comments
 (0)