xbps-remove: fix #95 (xbps-remove -R pkg lists/removes orphans)
This commit is contained in:
parent
ee5e2681bb
commit
c5d6556c50
6
NEWS
6
NEWS
@ -1,5 +1,11 @@
|
||||
xbps-0.45 (???):
|
||||
|
||||
* xbps-remove(8): fixed regression while removing recursively packages, don't remove
|
||||
all package orphans, this task belongs to -o not -R.
|
||||
|
||||
This closes #95 (xbps-remove -R pkg lists/removes orphans):
|
||||
https://github.com/voidlinux/xbps/issues/95
|
||||
|
||||
* xbps-uunshare(8): replaced -D, -H and -S with -b src:dest. This bind mounts
|
||||
src into dir/dest and allows unlimited mounts.
|
||||
|
||||
|
@ -85,6 +85,9 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user _unused
|
||||
continue;
|
||||
xbps_array_add(array, pkgd);
|
||||
}
|
||||
if (orphans_user)
|
||||
goto add_orphans;
|
||||
|
||||
iter = xbps_dictionary_iterator(xhp->pkgdb);
|
||||
assert(iter);
|
||||
/*
|
||||
@ -113,6 +116,7 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user _unused
|
||||
}
|
||||
xbps_object_iterator_release(iter);
|
||||
|
||||
add_orphans:
|
||||
for (i = 0; i < xbps_array_count(array); i++) {
|
||||
pkgd = xbps_array_get(array, i);
|
||||
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &curpkgver);
|
||||
|
@ -28,11 +28,8 @@
|
||||
|
||||
static const char expected_output[] =
|
||||
"xbps-git-20130310_2\n"
|
||||
"unexistent-pkg-0_1\n"
|
||||
"xbps-triggers-1.0_1\n"
|
||||
"libxbps-git-20130310_2\n"
|
||||
"orphan1-0_1\n"
|
||||
"orphan0-0_1\n"
|
||||
"confuse-2.7_2\n"
|
||||
"proplib-0.6.3_1\n"
|
||||
"libarchive-3.1.2_1\n"
|
||||
|
Loading…
Reference in New Issue
Block a user