xbps-bin(8): added a new target 'show-orphans' that list all package

orphans currently installed.
This commit is contained in:
Juan RP
2010-05-04 17:04:36 +02:00
parent cf2244b0b9
commit b8c9577df6
5 changed files with 28 additions and 4 deletions

View File

@ -62,7 +62,7 @@ pkg_remove_and_purge(const char *pkgname, const char *version, bool purge)
}
int
xbps_autoremove_pkgs(bool force, bool purge)
xbps_autoremove_pkgs(bool force, bool purge, bool only_show)
{
prop_array_t orphans = NULL;
prop_object_t obj = NULL;
@ -115,6 +115,9 @@ xbps_autoremove_pkgs(bool force, bool purge)
prop_object_iterator_reset(iter);
printf("\n\n");
if (only_show)
goto out;
if (!force && !xbps_noyes("Do you want to continue?")) {
printf("Cancelled!\n");
goto out;