xbps-install: fixed some issues; remove unused headers.
This commit is contained in:
parent
b05ce9fe57
commit
a0d4a21a1d
@ -215,10 +215,10 @@ main(int argc, char **argv)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (update && !argc) {
|
if (update && (argc == optind)) {
|
||||||
/* Update all installed packages */
|
/* Update all installed packages */
|
||||||
rv = dist_upgrade(&xh, maxcols, yes, drun);
|
rv = dist_upgrade(&xh, maxcols, yes, drun);
|
||||||
} else if (update && argc) {
|
} else if (update) {
|
||||||
/* Update target packages */
|
/* Update target packages */
|
||||||
for (i = optind; i < argc; i++) {
|
for (i = optind; i < argc; i++) {
|
||||||
rv = update_pkg(&xh, argv[i]);
|
rv = update_pkg(&xh, argv[i]);
|
||||||
@ -226,7 +226,7 @@ main(int argc, char **argv)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
rv = exec_transaction(&xh, maxcols, yes, drun);
|
rv = exec_transaction(&xh, maxcols, yes, drun);
|
||||||
} else if (!update && argc) {
|
} else if (!update) {
|
||||||
/* Install target packages */
|
/* Install target packages */
|
||||||
for (i = optind; i < argc; i++) {
|
for (i = optind; i < argc; i++) {
|
||||||
rv = install_new_pkg(&xh, argv[i], reinstall);
|
rv = install_new_pkg(&xh, argv[i], reinstall);
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include <xbps_api.h>
|
#include <xbps_api.h>
|
||||||
#include "compat.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "../xbps-repo/defs.h"
|
|
||||||
|
|
||||||
struct transaction {
|
struct transaction {
|
||||||
prop_dictionary_t d;
|
prop_dictionary_t d;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user