xbps-{install,query}: added -M --memory-sync option.
This explicitly enables the in memory fetch/store of remote repository data archives mode, ignoring existing on-disk repodata archives. This changes the previous behaviour of falling back to this mode if no on-disk repodata archives were found. Thanks to @Gottox and @dominikh for comments.
This commit is contained in:
@@ -52,6 +52,8 @@ usage(bool fail)
|
||||
" overwritten.\n"
|
||||
" -h --help Print help usage\n"
|
||||
" -i --ignore-conf-repos Ignore repositories defined in xbps.d\n"
|
||||
" -M --memory-sync Remote repository data is fetched and stored\n"
|
||||
" in memory, ignoring on-disk repodata archives.\n"
|
||||
" -n --dry-run Dry-run mode\n"
|
||||
" -R,--repository=<url> Add repository to the top of the list.\n"
|
||||
" This option can be specified multiple times.\n"
|
||||
@@ -91,7 +93,7 @@ repo_import_key_cb(struct xbps_repo *repo, void *arg _unused, bool *done _unused
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
const char *shortopts = "AC:c:dfhinR:r:SuVvy";
|
||||
const char *shortopts = "AC:c:dfhiMnR:r:SuVvy";
|
||||
const struct option longopts[] = {
|
||||
{ "automatic", no_argument, NULL, 'A' },
|
||||
{ "config", required_argument, NULL, 'C' },
|
||||
@@ -100,6 +102,7 @@ main(int argc, char **argv)
|
||||
{ "force", no_argument, NULL, 'f' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ "ignore-conf-repos", no_argument, NULL, 'i' },
|
||||
{ "memory-sync", no_argument, NULL, 'M' },
|
||||
{ "dry-run", no_argument, NULL, 'n' },
|
||||
{ "repository", required_argument, NULL, 'R' },
|
||||
{ "rootdir", required_argument, NULL, 'r' },
|
||||
@@ -149,6 +152,9 @@ main(int argc, char **argv)
|
||||
case 'i':
|
||||
flags |= XBPS_FLAG_IGNORE_CONF_REPOS;
|
||||
break;
|
||||
case 'M':
|
||||
flags |= XBPS_FLAG_REPOS_MEMSYNC;
|
||||
break;
|
||||
case 'n':
|
||||
drun = true;
|
||||
break;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
.Dd November 5, 2014
|
||||
.Dd November 27, 2014
|
||||
.Dt XBPS-INSTALL 8
|
||||
.Sh NAME
|
||||
.Nm xbps-install
|
||||
@@ -86,6 +86,9 @@ Ignore repositories defined in configuration files.
|
||||
Only repositories specified in the command line via
|
||||
.Ar --repository
|
||||
will be used.
|
||||
.It Fl M, Fl -memory-sync
|
||||
For remote repositories, the data is fetched and stored in memory for the current
|
||||
operation. This ignores the existing on-disk repository archives in rootdir.
|
||||
.It Fl n, Fl -dry-run
|
||||
Dry-run mode. Show what actions would be done but don't do anything.
|
||||
.It Fl R, Fl -repository=uri
|
||||
|
Reference in New Issue
Block a user