The main (only) purpose of -D is to be able to change packages installation
status (deps or explicit). Having a short form offer a similar experience that
other main pacman option (e.g. Su).

Signed-off-by: Sébastien Luttringer <[email protected]>
---
 src/pacman/pacman.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 38b28e1..bd33c2d 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -165,8 +165,8 @@ static void usage(int op, const char * const myname)
                } else if(op == PM_OP_DATABASE) {
                        printf("%s:  %s {-D --database} <%s> <%s>\n", str_usg, 
myname, str_opt, str_pkg);
                        printf("%s:\n", str_opt);
-                       addlist(_("      --asdeps         mark packages as 
non-explicitly installed\n"));
-                       addlist(_("      --asexplicit     mark packages as 
explicitly installed\n"));
+                       addlist(_("  -d  --asdeps         mark packages as 
non-explicitly installed\n"));
+                       addlist(_("  -e  --asexplicit     mark packages as 
explicitly installed\n"));
                } else if(op == PM_OP_DEPTEST) {
                        printf("%s:  %s {-T --deptest} [%s] [%s]\n", str_usg, 
myname, str_opt, str_pkg);
                        printf("%s:\n", str_opt);
@@ -446,7 +446,9 @@ static int parsearg_global(int opt)
 static int parsearg_database(int opt)
 {
        switch(opt) {
+               case 'd':
                case OP_ASDEPS: config->flags |= ALPM_TRANS_FLAG_ALLDEPS; break;
+               case 'e':
                case OP_ASEXPLICIT: config->flags |= 
ALPM_TRANS_FLAG_ALLEXPLICIT; break;
                default: return 1;
        }
-- 
1.8.1.5


Reply via email to