added more intelligent error messages for bad magic
authorroot <devnull@localhost>
Fri, 5 Apr 1996 17:35:45 +0000 (17:35 +0000)
committerroot <devnull@localhost>
Fri, 5 Apr 1996 17:35:45 +0000 (17:35 +0000)
CVS patchset: 528
CVS date: 1996/04/05 17:35:45

install.c
query.c

index bae49d3..94a6641 100644 (file)
--- a/install.c
+++ b/install.c
@@ -105,6 +105,10 @@ int doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags) {
 
     rc = rpmInstallPackage(prefix, db, fd, installFlags, fn, printFormat);
     if (rc == 1) {
+       fprintf(stderr, "error: %s does not appear to be a RPM package\n", arg);
+    }
+       
+    if (rc) {
        fprintf(stderr, "error: %s cannot be installed\n", arg);
     }
 
diff --git a/query.c b/query.c
index 6cea016..c6759cc 100644 (file)
--- a/query.c
+++ b/query.c
@@ -439,7 +439,11 @@ int doQuery(char * prefix, enum querysources source, int queryFlags,
                    }
                    break;
                case 1:
-                   fprintf(stderr, "%s is not an RPM\n", arg);
+                   fprintf(stderr, "%s does not appear to be a RPM package\n", 
+                               arg);
+                   /* fallthrough */
+               case 2:
+                   fprintf(stderr, "query of %s failed\n", arg);
                    retcode = 1;
            }