Fix #14 from github (Removing recursively does not respect manual installation mode for dependencies).

This commit is contained in:
Juan RP 2013-08-17 09:50:19 +02:00
parent 1999fbd771
commit 11fbffa241
2 changed files with 9 additions and 4 deletions

4
NEWS
View File

@ -1,5 +1,9 @@
xbps-0.26 (???): xbps-0.26 (???):
* Fixed #14 from github: "Removing recursively does not respect manual installation
mode for dependencies". See https://github.com/xtraeme/xbps/issues/14
for more information.
* Removed "PackagesOnHold" from xbps.conf. This has been replaced by a new mode * Removed "PackagesOnHold" from xbps.conf. This has been replaced by a new mode
in xbps-pkgdb(8): in xbps-pkgdb(8):

View File

@ -120,8 +120,6 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user)
find_orphans: find_orphans:
for (i = 0; i < xbps_array_count(array); i++) { for (i = 0; i < xbps_array_count(array); i++) {
pkgd = xbps_array_get(array, i); pkgd = xbps_array_get(array, i);
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &curpkgver);
rdeps = xbps_dictionary_get(pkgd, "run_depends"); rdeps = xbps_dictionary_get(pkgd, "run_depends");
for (x = 0; x < xbps_array_count(rdeps); x++) { for (x = 0; x < xbps_array_count(rdeps); x++) {
cnt = 0; cnt = 0;
@ -139,8 +137,11 @@ find_orphans:
} }
if (cnt == reqbycnt) { if (cnt == reqbycnt) {
deppkgd = xbps_pkgdb_get_pkg(xhp, deppkgver); deppkgd = xbps_pkgdb_get_pkg(xhp, deppkgver);
if (!xbps_find_pkg_in_array(array, deppkgver)) if (!xbps_find_pkg_in_array(array, deppkgver)) {
xbps_array_add(array, deppkgd); xbps_dictionary_get_bool(deppkgd, "automatic-install", &automatic);
if (automatic)
xbps_array_add(array, deppkgd);
}
} }
} }
} }