xbps-install: fixed some issues; remove unused headers.

This commit is contained in:
Juan RP 2012-11-02 15:24:48 +01:00
parent b05ce9fe57
commit a0d4a21a1d
2 changed files with 3 additions and 5 deletions

View File

@ -215,10 +215,10 @@ main(int argc, char **argv)
goto out;
}
if (update && !argc) {
if (update && (argc == optind)) {
/* Update all installed packages */
rv = dist_upgrade(&xh, maxcols, yes, drun);
} else if (update && argc) {
} else if (update) {
/* Update target packages */
for (i = optind; i < argc; i++) {
rv = update_pkg(&xh, argv[i]);
@ -226,7 +226,7 @@ main(int argc, char **argv)
goto out;
}
rv = exec_transaction(&xh, maxcols, yes, drun);
} else if (!update && argc) {
} else if (!update) {
/* Install target packages */
for (i = optind; i < argc; i++) {
rv = install_new_pkg(&xh, argv[i], reinstall);

View File

@ -34,9 +34,7 @@
#include <limits.h>
#include <xbps_api.h>
#include "compat.h"
#include "defs.h"
#include "../xbps-repo/defs.h"
struct transaction {
prop_dictionary_t d;