diff --git a/NEWS b/NEWS index 8207f4d7..9e91b7f2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ xbps-0.16 (???): - * xbps-bin(8): renamed "autoupdate" target to "dist-upgrade". + * xbps-bin(8): renamed "autoupdate" target to "dist-upgrade" and + "autoremove" to "remove-orphans." * Added support to put packages "on hold". Packages on hold won't be updated by system upgrades even if there is a newer version. diff --git a/bin/xbps-bin/defs.h b/bin/xbps-bin/defs.h index ee55270b..ae4fd08c 100644 --- a/bin/xbps-bin/defs.h +++ b/bin/xbps-bin/defs.h @@ -44,8 +44,8 @@ struct list_pkgver_cb { int install_new_pkg(const char *, bool); int update_pkg(const char *); int remove_pkg(const char *, bool); +int remove_pkg_orphans(bool, bool); int dist_upgrade(bool, bool, bool); -int autoremove_pkgs(bool, bool); int exec_transaction(bool, bool, bool); /* from remove.c */ diff --git a/bin/xbps-bin/main.c b/bin/xbps-bin/main.c index 156de3ba..92aa6bf3 100644 --- a/bin/xbps-bin/main.c +++ b/bin/xbps-bin/main.c @@ -62,8 +62,6 @@ usage(bool fail) " -y Assume yes to all questions\n" " -V Show XBPS version\n\n" "[targets]\n" - " autoremove\n" - " Auto remove all package orphans.\n" " check \n" " Package integrity check for `pkgname' or `all' packages.\n" " dist-upgrade\n" @@ -79,6 +77,8 @@ usage(bool fail) " Reconfigure `pkgname' or `all' packages.\n" " remove [pkgnames]\n" " Remove a list of packages.\n" + " remove-orphans\n" + " Remove all package orphans from system.\n" " show \n" " Print package information for `pkgname'.\n" " show-deps \n" @@ -352,7 +352,7 @@ main(int argc, char **argv) rv = show_orphans(); - } else if (strcasecmp(argv[0], "autoremove") == 0) { + } else if (strcasecmp(argv[0], "remove-orphans") == 0) { /* * Removes orphan pkgs. These packages were installed * as dependency and any installed package does not depend @@ -361,7 +361,7 @@ main(int argc, char **argv) if (argc != 1) usage(true); - rv = autoremove_pkgs(yes, dry_run); + rv = remove_pkg_orphans(yes, dry_run); } else if (strcasecmp(argv[0], "reconfigure") == 0) { /* diff --git a/bin/xbps-bin/transaction.c b/bin/xbps-bin/transaction.c index 10f44c0a..3baf69a3 100644 --- a/bin/xbps-bin/transaction.c +++ b/bin/xbps-bin/transaction.c @@ -244,7 +244,7 @@ dist_upgrade(bool yes, bool dry_run, bool show_download_pkglist_url) } int -autoremove_pkgs(bool yes, bool dry_run) +remove_pkg_orphans(bool yes, bool dry_run) { int rv; @@ -253,7 +253,7 @@ autoremove_pkgs(bool yes, bool dry_run) printf("No package orphans were found.\n"); return 0; } else { - printf("Failed to autoremove packages: %s\n", + printf("Failed to remove package orphans: %s\n", strerror(rv)); return rv; } diff --git a/bin/xbps-bin/xbps-bin.8 b/bin/xbps-bin/xbps-bin.8 index f7b3902d..70d15d2d 100644 --- a/bin/xbps-bin/xbps-bin.8 +++ b/bin/xbps-bin/xbps-bin.8 @@ -90,7 +90,7 @@ and target packages and its required dependencies will be matched. Enables dry-run mode. To show the actions that would be executed in a transaction. This mode takes effect in the -.Em autoremove , +.Em remove-orphans , .Em dist-upgrade , .Em install , .Rm remove @@ -133,10 +133,6 @@ Shows the current XBPS release version (version, API, index). Please note that all targets are case insensitive. .Pp .Bl -tag -width ident -.It Sy autoremove -Removes package orphans. These packages were installed as dependencies and -currently there is not any package depending on it, directly or indirectly. -Usually it is safe to always answer yes. .It Sy check Ar pkgname | Ar all Checks for integrity errors in installed packages. The checks are to found missing run-time dependencies, missing and modified package files and @@ -200,6 +196,10 @@ Files not matching the original SHA256 hash will be preserved. If .Ql -f option is used, package files will be .Em removed even if its SHA256 hash don't match . +.It Sy remove-orphans +Removes package orphans. These packages were installed as dependencies and +currently there is not any package depending on it, directly or indirectly. +Usually it is safe to always answer yes. .It Sy show Ar pkgname Shows information for installed package .Em pkgname .