xbps-bin: new flag -S to sync rpool indexes before the target.
This commit is contained in:
parent
6228204a14
commit
a58df97c75
3
NEWS
3
NEWS
@ -1,5 +1,8 @@
|
||||
xbps-0.16 (???):
|
||||
|
||||
* xbps-bin(8): new flag: -S which syncs rpool indexes before executing
|
||||
the "dist-upgrade", "install" or "update" targets.
|
||||
|
||||
* libxbps: renamed xbps_repository_pool_xxx to xbps_rpool_xxx
|
||||
(API/ABI incompat changes).
|
||||
|
||||
|
@ -58,6 +58,7 @@ usage(bool fail)
|
||||
" -o key[,key] Print package metadata keys in show target\n"
|
||||
" -R Remove recursively packages\n"
|
||||
" -r rootdir Full path to rootdir\n"
|
||||
" -S Sync repository index\n"
|
||||
" -v Verbose messages\n"
|
||||
" -y Assume yes to all questions\n"
|
||||
" -V Show XBPS version\n\n"
|
||||
@ -112,15 +113,15 @@ main(int argc, char **argv)
|
||||
struct sigaction sa;
|
||||
const char *rootdir, *cachedir, *conffile, *option;
|
||||
int i, c, flags, rv;
|
||||
bool yes, reqby_force, force_rm_with_deps, recursive_rm;
|
||||
bool sync, yes, reqby_force, force_rm_with_deps, recursive_rm;
|
||||
bool reinstall, show_download_pkglist_url, dry_run;
|
||||
|
||||
rootdir = cachedir = conffile = option = NULL;
|
||||
flags = rv = 0;
|
||||
reqby_force = yes = dry_run = force_rm_with_deps = false;
|
||||
reqby_force = sync = yes = dry_run = force_rm_with_deps = false;
|
||||
recursive_rm = reinstall = show_download_pkglist_url = false;
|
||||
|
||||
while ((c = getopt(argc, argv, "AC:c:dDFfhMno:Rr:Vvy")) != -1) {
|
||||
while ((c = getopt(argc, argv, "AC:c:dDFfhMno:Rr:SVvy")) != -1) {
|
||||
switch (c) {
|
||||
case 'A':
|
||||
flags |= XBPS_FLAG_INSTALL_AUTO;
|
||||
@ -164,6 +165,9 @@ main(int argc, char **argv)
|
||||
/* To specify the root directory */
|
||||
rootdir = optarg;
|
||||
break;
|
||||
case 'S':
|
||||
sync = true;
|
||||
break;
|
||||
case 'v':
|
||||
flags |= XBPS_FLAG_VERBOSE;
|
||||
break;
|
||||
@ -264,6 +268,9 @@ main(int argc, char **argv)
|
||||
if (argc < 2)
|
||||
usage(true);
|
||||
|
||||
if (sync && ((rv = xbps_rpool_sync()) != 0))
|
||||
goto out;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
if ((rv = install_new_pkg(argv[i], reinstall)) != 0)
|
||||
goto out;
|
||||
@ -275,6 +282,9 @@ main(int argc, char **argv)
|
||||
if (argc < 2)
|
||||
usage(true);
|
||||
|
||||
if (sync && ((rv = xbps_rpool_sync()) != 0))
|
||||
goto out;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
if ((rv = update_pkg(argv[i])) != 0)
|
||||
goto out;
|
||||
@ -341,6 +351,9 @@ main(int argc, char **argv)
|
||||
if (argc != 1)
|
||||
usage(true);
|
||||
|
||||
if (sync && ((rv = xbps_rpool_sync()) != 0))
|
||||
goto out;
|
||||
|
||||
rv = dist_upgrade(yes, dry_run, show_download_pkglist_url);
|
||||
|
||||
} else if (strcasecmp(argv[0], "show-orphans") == 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
.Dd May 8, 2012
|
||||
.Dd May 31, 2012
|
||||
.Os Void GNU/Linux
|
||||
.Dt xbps-bin 8
|
||||
.Sh NAME
|
||||
@ -120,6 +120,14 @@ independently of rootdir setting. So if you use a rootdir of
|
||||
.Pa /blah ,
|
||||
metadata stuff will go into
|
||||
.Pa /blah/var/db/xbps .
|
||||
.It Fl S
|
||||
Sync remote repository index files before executing the target.
|
||||
Used currently in the
|
||||
.Em dist-upgrade ,
|
||||
.Em install
|
||||
and
|
||||
.Em update
|
||||
targets.
|
||||
.It Fl v
|
||||
Shows verbose messages. Useful while installing and removing packages.
|
||||
.It Fl y
|
||||
|
Loading…
Reference in New Issue
Block a user