Eliminate pointless argument sanity check
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 15 Nov 2010 08:05:18 +0000 (10:05 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 15 Nov 2010 08:05:18 +0000 (10:05 +0200)
- --root is valid for all the remaining modes, no point checking for it
- MODES_FOR_DBPATH is completely unused (and dbpath is a common option
  to all anyway)

rpmqv.c

diff --git a/rpmqv.c b/rpmqv.c
index c1109b7..e68fb75 100644 (file)
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -28,10 +28,8 @@ enum modes {
     MODE_UNKNOWN       = 0
 };
 
-#define        MODES_FOR_DBPATH        (MODES_IE | MODES_QV)
 #define        MODES_FOR_NODEPS        (MODES_IE | MODE_VERIFY)
 #define        MODES_FOR_TEST          (MODES_IE)
-#define        MODES_FOR_ROOT          (MODES_IE | MODES_QV)
 
 static int quiet;
 
@@ -238,11 +236,6 @@ int main(int argc, char *argv[])
                 "erasure, and building"));
 #endif /* IAM_RPMEIU */
 
-    if (rpmcliRootDir && rpmcliRootDir[1] && (bigMode & ~MODES_FOR_ROOT))
-       argerror(_("--root (-r) may only be specified during "
-                "installation, erasure, querying, and "
-                "database rebuilds"));
-
     if (rpmcliRootDir && rpmcliRootDir[0] != '/') {
        argerror(_("arguments to --root (-r) must begin with a /"));
     }