xbps-install: added --reproducible long option.

If set, enables reproducible mode in pkgdb.

Added a new test case.
This commit is contained in:
Juan RP
2019-12-29 10:38:55 +01:00
parent 95a3ba651f
commit b05f4b4db5
3 changed files with 54 additions and 1 deletions

View File

@@ -61,6 +61,7 @@ usage(bool fail)
" -R,--repository=<url> Add repository to the top of the list.\n"
" This option can be specified multiple times.\n"
" -r --rootdir <dir> Full path to rootdir\n"
" --reproducible Enable reproducible mode in pkgdb.\n"
" -S --sync Sync remote repository index\n"
" -u --update Update target package(s)\n"
" -v --verbose Verbose messages\n"
@@ -117,6 +118,7 @@ main(int argc, char **argv)
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, 'V' },
{ "yes", no_argument, NULL, 'y' },
{ "reproducible", no_argument, NULL, 1 },
{ NULL, 0, NULL, 0 }
};
struct xbps_handle xh;
@@ -134,6 +136,9 @@ main(int argc, char **argv)
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
switch (c) {
case 1:
flags |= XBPS_FLAG_INSTALL_REPRO;
break;
case 'A':
flags |= XBPS_FLAG_INSTALL_AUTO;
break;