From 5fabb34a1ff6270fe6e09e80346586d98e06437a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 8 May 2012 10:09:01 +0200 Subject: [PATCH] xbps-bin(8): keep auto{remove,update} targets for compatibility. --- NEWS | 4 +++- bin/xbps-bin/main.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 6c855a8f..42f4125d 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,9 @@ xbps-0.16 (???): * xbps-bin(8): renamed "autoupdate" target to "dist-upgrade" and - "autoremove" to "remove-orphans". + "autoremove" to "remove-orphans". For compatibility with previous + versions the old targets are still kept, but will be removed in future + releases. * 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/main.c b/bin/xbps-bin/main.c index 92aa6bf3..9bfebdc5 100644 --- a/bin/xbps-bin/main.c +++ b/bin/xbps-bin/main.c @@ -333,7 +333,8 @@ main(int argc, char **argv) else rv = check_pkg_integrity(NULL, argv[1], true, NULL); - } else if (strcasecmp(argv[0], "dist-upgrade") == 0) { + } else if ((strcasecmp(argv[0], "dist-upgrade") == 0) || + (strcasecmp(argv[0], "autoupdate") == 0)) { /* * To update all packages currently installed. */ @@ -352,7 +353,8 @@ main(int argc, char **argv) rv = show_orphans(); - } else if (strcasecmp(argv[0], "remove-orphans") == 0) { + } else if ((strcasecmp(argv[0], "remove-orphans") == 0) || + (strcasecmp(argv[0], "autoremove") == 0)) { /* * Removes orphan pkgs. These packages were installed * as dependency and any installed package does not depend