xbps-query: replace -D --defrepo' option with
-R' and `--repository=url'.
The argument in `--repository' is optional, therefore must be specified with `=' to work. If no argument is specified, repository mode is enabled preserving the repository list of configuration file.
This commit is contained in:
parent
2e5501b1a6
commit
27db8e89c4
15
NEWS
15
NEWS
@ -1,10 +1,19 @@
|
|||||||
xbps-0.26 (???):
|
xbps-0.26 (???):
|
||||||
|
|
||||||
* xbps-install(8): added support to specify multiple repositories with `-R'.
|
* xbps-query(8): the `-D --defrepo' argument has been superseded by
|
||||||
|
`-R --repository=<url>' argument.
|
||||||
|
|
||||||
|
* xbps-install(8): added support to specify multiple repositories with
|
||||||
|
`--repository=<url>`. For consistency with `xbps-query(8)' use the same
|
||||||
|
syntax as it were an optional argument.
|
||||||
|
|
||||||
This overrides the list of a configuration file.
|
This overrides the list of a configuration file.
|
||||||
|
|
||||||
* xbps-query(8: added support to specify multiple repositories with `-D'.
|
* xbps-query(8: added support to specify multiple repositories with
|
||||||
This overrides the list of a configuration file.
|
`--repository=<url>`. This also enables repository mode; the argument is
|
||||||
|
optional and can be used to specify desired repositories.
|
||||||
|
|
||||||
|
This overrides the repository list of a configuration file.
|
||||||
|
|
||||||
* Re-added all metadata package objects to the repository index, this avoids
|
* Re-added all metadata package objects to the repository index, this avoids
|
||||||
remote connections when querying packages from remote repositories. This also
|
remote connections when querying packages from remote repositories. This also
|
||||||
|
@ -52,8 +52,9 @@ usage(bool fail)
|
|||||||
" overwritten.\n"
|
" overwritten.\n"
|
||||||
" -h --help Print help usage\n"
|
" -h --help Print help usage\n"
|
||||||
" -n --dry-run Dry-run mode\n"
|
" -n --dry-run Dry-run mode\n"
|
||||||
" -R --repository <uri> Repository to be used. Can be specified\n"
|
" -R --repository=<url> Repository to be used. Can be specified\n"
|
||||||
" multiple times.\n"
|
" multiple times. This overrides the repositories\n"
|
||||||
|
" list of a configuration file.\n"
|
||||||
" -r --rootdir <dir> Full path to rootdir\n"
|
" -r --rootdir <dir> Full path to rootdir\n"
|
||||||
" -S --sync Sync remote repository index\n"
|
" -S --sync Sync remote repository index\n"
|
||||||
" -u --update Update target package(s)\n"
|
" -u --update Update target package(s)\n"
|
||||||
|
@ -69,8 +69,8 @@ is specified twice,
|
|||||||
Show the help usage.
|
Show the help usage.
|
||||||
.It Fl n, Fl -dry-run
|
.It Fl n, Fl -dry-run
|
||||||
Dry-run mode. Show what actions would be done but don't do anything.
|
Dry-run mode. Show what actions would be done but don't do anything.
|
||||||
.It Fl R, Fl -repository Ar uri
|
.It Fl R, Fl -repository=uri
|
||||||
Default repository to be used. Multiple repositories can be specified. This repository
|
Repository to be added to the list. Multiple repositories can be specified. This repository
|
||||||
list overrides the list in a configuration file.
|
list overrides the list in a configuration file.
|
||||||
.It Fl r, Fl -rootdir Ar dir
|
.It Fl r, Fl -rootdir Ar dir
|
||||||
Specifies a full path for the target root directory.
|
Specifies a full path for the target root directory.
|
||||||
|
@ -40,11 +40,14 @@ usage(bool fail)
|
|||||||
"\nOPTIONS\n"
|
"\nOPTIONS\n"
|
||||||
" -C --config <file> Full path to configuration file\n"
|
" -C --config <file> Full path to configuration file\n"
|
||||||
" -c --cachedir <dir> Full path to cachedir\n"
|
" -c --cachedir <dir> Full path to cachedir\n"
|
||||||
" -D --defrepo <uri> Repository to be used. Can be specified\n"
|
|
||||||
" multiple times.\n"
|
|
||||||
" -d --debug Debug mode shown to stderr\n"
|
" -d --debug Debug mode shown to stderr\n"
|
||||||
" -h --help Print help usage\n"
|
" -h --help Print help usage\n"
|
||||||
" -R --repoisotyr Enable repository mode\n"
|
" -R --repository Enable repository mode. This mode explicitly\n"
|
||||||
|
" looks for packages in repositories.\n"
|
||||||
|
" --repository=<url> Enable repository mode and explicitly add the\n"
|
||||||
|
" repository to the list; can be specified\n"
|
||||||
|
" multiple times. This overrides the repositories\n"
|
||||||
|
" list of a configuration file.\n"
|
||||||
" -r --rootdir <dir> Full path to rootdir\n"
|
" -r --rootdir <dir> Full path to rootdir\n"
|
||||||
" -V --version Show XBPS version\n"
|
" -V --version Show XBPS version\n"
|
||||||
" -v --verbose Verbose messages\n"
|
" -v --verbose Verbose messages\n"
|
||||||
@ -71,7 +74,6 @@ main(int argc, char **argv)
|
|||||||
const struct option longopts[] = {
|
const struct option longopts[] = {
|
||||||
{ "config", required_argument, NULL, 'C' },
|
{ "config", required_argument, NULL, 'C' },
|
||||||
{ "cachedir", required_argument, NULL, 'c' },
|
{ "cachedir", required_argument, NULL, 'c' },
|
||||||
{ "defrepo", required_argument, NULL, 'D' },
|
|
||||||
{ "debug", no_argument, NULL, 'd' },
|
{ "debug", no_argument, NULL, 'd' },
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
{ "list-repos", no_argument, NULL, 'L' },
|
{ "list-repos", no_argument, NULL, 'L' },
|
||||||
@ -81,7 +83,7 @@ main(int argc, char **argv)
|
|||||||
{ "list-orphans", no_argument, NULL, 'O' },
|
{ "list-orphans", no_argument, NULL, 'O' },
|
||||||
{ "ownedby", no_argument, NULL, 'o' },
|
{ "ownedby", no_argument, NULL, 'o' },
|
||||||
{ "property", required_argument, NULL, 'p' },
|
{ "property", required_argument, NULL, 'p' },
|
||||||
{ "repository-mode", no_argument, NULL, 'R' },
|
{ "repository", optional_argument, NULL, 'R' },
|
||||||
{ "rootdir", required_argument, NULL, 'r' },
|
{ "rootdir", required_argument, NULL, 'r' },
|
||||||
{ "search", no_argument, NULL, 's' },
|
{ "search", no_argument, NULL, 's' },
|
||||||
{ "version", no_argument, NULL, 'V' },
|
{ "version", no_argument, NULL, 'V' },
|
||||||
@ -92,13 +94,13 @@ main(int argc, char **argv)
|
|||||||
{ NULL, 0, NULL, 0 },
|
{ NULL, 0, NULL, 0 },
|
||||||
};
|
};
|
||||||
struct xbps_handle xh;
|
struct xbps_handle xh;
|
||||||
const char *rootdir, *cachedir, *conffile, *props, *defrepo;
|
const char *rootdir, *cachedir, *conffile, *props;
|
||||||
int c, flags, rv, show_deps = 0;
|
int c, flags, rv, show_deps = 0;
|
||||||
bool list_pkgs, list_repos, orphans, own;
|
bool list_pkgs, list_repos, orphans, own;
|
||||||
bool list_manual, list_hold, show_prop, show_files, show_rdeps;
|
bool list_manual, list_hold, show_prop, show_files, show_rdeps;
|
||||||
bool show, search, repo_mode, opmode, fulldeptree;
|
bool show, search, repo_mode, opmode, fulldeptree;
|
||||||
|
|
||||||
rootdir = cachedir = conffile = defrepo = props = NULL;
|
rootdir = cachedir = conffile = props = NULL;
|
||||||
flags = rv = c = 0;
|
flags = rv = c = 0;
|
||||||
list_pkgs = list_repos = list_hold = orphans = search = own = false;
|
list_pkgs = list_repos = list_hold = orphans = search = own = false;
|
||||||
list_manual = show_prop = show_files = false;
|
list_manual = show_prop = show_files = false;
|
||||||
@ -116,10 +118,6 @@ main(int argc, char **argv)
|
|||||||
cachedir = optarg;
|
cachedir = optarg;
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
if (xh.repositories == NULL)
|
|
||||||
xh.repositories = xbps_array_create();
|
|
||||||
|
|
||||||
xbps_array_add_cstring_nocopy(xh.repositories, optarg);
|
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
flags |= XBPS_FLAG_DEBUG;
|
flags |= XBPS_FLAG_DEBUG;
|
||||||
@ -153,6 +151,12 @@ main(int argc, char **argv)
|
|||||||
show_prop = opmode = true;
|
show_prop = opmode = true;
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
|
if (optarg != NULL) {
|
||||||
|
if (xh.repositories == NULL)
|
||||||
|
xh.repositories = xbps_array_create();
|
||||||
|
|
||||||
|
xbps_array_add_cstring_nocopy(xh.repositories, optarg);
|
||||||
|
}
|
||||||
repo_mode = true;
|
repo_mode = true;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
|
@ -54,16 +54,17 @@ Example:
|
|||||||
Specifies a full path to the XBPS configuration file.
|
Specifies a full path to the XBPS configuration file.
|
||||||
.It Fl c, Fl -cachedir Ar dir
|
.It Fl c, Fl -cachedir Ar dir
|
||||||
Specifies a full path to the cache directory, where binary packages are stored.
|
Specifies a full path to the cache directory, where binary packages are stored.
|
||||||
.It Fl D, Fl -defrepo Ar uri
|
|
||||||
Default repository to be used. Multiple repositories can be specified. This repository
|
|
||||||
list overrides the list in a configuration file.
|
|
||||||
.It Fl d, Fl -debug
|
.It Fl d, Fl -debug
|
||||||
Enables extra debugging shown to stderr.
|
Enables extra debugging shown to stderr.
|
||||||
.It Fl h, Fl -help
|
.It Fl h, Fl -help
|
||||||
Show the help usage.
|
Show the help usage.
|
||||||
.It Fl R, Fl -repository
|
.It Fl R, Fl -repository=url
|
||||||
Enable repository mode. This mode explicitly looks in repositories, rather
|
Enable repository mode. This mode explicitly looks in repositories, rather
|
||||||
than looking in the target root directory.
|
than looking in the target root directory. The
|
||||||
|
.Ar url
|
||||||
|
argument is optional and can be used to add the repository to the list,
|
||||||
|
overriding the repository list of a configuration file. Multiple repositories
|
||||||
|
can be specified.
|
||||||
.It Fl r, Fl -rootdir Ar dir
|
.It Fl r, Fl -rootdir Ar dir
|
||||||
Specifies a full path for the target root directory.
|
Specifies a full path for the target root directory.
|
||||||
.It Fl v, Fl -verbose
|
.It Fl v, Fl -verbose
|
||||||
|
Loading…
x
Reference in New Issue
Block a user