Really fix #53 this time: with or without -n.
This commit is contained in:
parent
5a1919e520
commit
bc92b387cb
@ -236,9 +236,10 @@ main(int argc, char **argv)
|
|||||||
rv = exec_transaction(&xh, maxcols, yes, drun);
|
rv = exec_transaction(&xh, maxcols, yes, drun);
|
||||||
} else if (!update) {
|
} else if (!update) {
|
||||||
/* Install target packages */
|
/* Install target packages */
|
||||||
|
int npkgs = argc - optind;
|
||||||
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);
|
||||||
if (optind >= 2 && rv == EEXIST) {
|
if (npkgs >= 2 && rv == EEXIST) {
|
||||||
rv = 0;
|
rv = 0;
|
||||||
} else if (rv != 0) {
|
} else if (rv != 0) {
|
||||||
xbps_pkgdb_unlock(&xh);
|
xbps_pkgdb_unlock(&xh);
|
||||||
|
@ -22,9 +22,13 @@ install_existent_body() {
|
|||||||
cd ..
|
cd ..
|
||||||
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A
|
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A
|
||||||
atf_check_equal $? 0
|
atf_check_equal $? 0
|
||||||
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -yn A B
|
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A B
|
||||||
atf_check_equal $? 0
|
atf_check_equal $? 0
|
||||||
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -yn B A
|
|
||||||
|
rm -r root
|
||||||
|
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A
|
||||||
|
atf_check_equal $? 0
|
||||||
|
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y B A
|
||||||
atf_check_equal $? 0
|
atf_check_equal $? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user