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-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
|
* libxbps: renamed xbps_repository_pool_xxx to xbps_rpool_xxx
|
||||||
(API/ABI incompat changes).
|
(API/ABI incompat changes).
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ usage(bool fail)
|
|||||||
" -o key[,key] Print package metadata keys in show target\n"
|
" -o key[,key] Print package metadata keys in show target\n"
|
||||||
" -R Remove recursively packages\n"
|
" -R Remove recursively packages\n"
|
||||||
" -r rootdir Full path to rootdir\n"
|
" -r rootdir Full path to rootdir\n"
|
||||||
|
" -S Sync repository index\n"
|
||||||
" -v Verbose messages\n"
|
" -v Verbose messages\n"
|
||||||
" -y Assume yes to all questions\n"
|
" -y Assume yes to all questions\n"
|
||||||
" -V Show XBPS version\n\n"
|
" -V Show XBPS version\n\n"
|
||||||
@ -112,15 +113,15 @@ main(int argc, char **argv)
|
|||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
const char *rootdir, *cachedir, *conffile, *option;
|
const char *rootdir, *cachedir, *conffile, *option;
|
||||||
int i, c, flags, rv;
|
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;
|
bool reinstall, show_download_pkglist_url, dry_run;
|
||||||
|
|
||||||
rootdir = cachedir = conffile = option = NULL;
|
rootdir = cachedir = conffile = option = NULL;
|
||||||
flags = rv = 0;
|
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;
|
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) {
|
switch (c) {
|
||||||
case 'A':
|
case 'A':
|
||||||
flags |= XBPS_FLAG_INSTALL_AUTO;
|
flags |= XBPS_FLAG_INSTALL_AUTO;
|
||||||
@ -164,6 +165,9 @@ main(int argc, char **argv)
|
|||||||
/* To specify the root directory */
|
/* To specify the root directory */
|
||||||
rootdir = optarg;
|
rootdir = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'S':
|
||||||
|
sync = true;
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
flags |= XBPS_FLAG_VERBOSE;
|
flags |= XBPS_FLAG_VERBOSE;
|
||||||
break;
|
break;
|
||||||
@ -264,6 +268,9 @@ main(int argc, char **argv)
|
|||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
usage(true);
|
usage(true);
|
||||||
|
|
||||||
|
if (sync && ((rv = xbps_rpool_sync()) != 0))
|
||||||
|
goto out;
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
if ((rv = install_new_pkg(argv[i], reinstall)) != 0)
|
if ((rv = install_new_pkg(argv[i], reinstall)) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
@ -275,6 +282,9 @@ main(int argc, char **argv)
|
|||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
usage(true);
|
usage(true);
|
||||||
|
|
||||||
|
if (sync && ((rv = xbps_rpool_sync()) != 0))
|
||||||
|
goto out;
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
if ((rv = update_pkg(argv[i])) != 0)
|
if ((rv = update_pkg(argv[i])) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
@ -341,6 +351,9 @@ main(int argc, char **argv)
|
|||||||
if (argc != 1)
|
if (argc != 1)
|
||||||
usage(true);
|
usage(true);
|
||||||
|
|
||||||
|
if (sync && ((rv = xbps_rpool_sync()) != 0))
|
||||||
|
goto out;
|
||||||
|
|
||||||
rv = dist_upgrade(yes, dry_run, show_download_pkglist_url);
|
rv = dist_upgrade(yes, dry_run, show_download_pkglist_url);
|
||||||
|
|
||||||
} else if (strcasecmp(argv[0], "show-orphans") == 0) {
|
} else if (strcasecmp(argv[0], "show-orphans") == 0) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.Dd May 8, 2012
|
.Dd May 31, 2012
|
||||||
.Os Void GNU/Linux
|
.Os Void GNU/Linux
|
||||||
.Dt xbps-bin 8
|
.Dt xbps-bin 8
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -120,6 +120,14 @@ independently of rootdir setting. So if you use a rootdir of
|
|||||||
.Pa /blah ,
|
.Pa /blah ,
|
||||||
metadata stuff will go into
|
metadata stuff will go into
|
||||||
.Pa /blah/var/db/xbps .
|
.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
|
.It Fl v
|
||||||
Shows verbose messages. Useful while installing and removing packages.
|
Shows verbose messages. Useful while installing and removing packages.
|
||||||
.It Fl y
|
.It Fl y
|
||||||
|
Loading…
Reference in New Issue
Block a user