give an error w/ we find packages with bad capabilities
authorewt <devnull@localhost>
Wed, 7 Apr 1999 00:06:56 +0000 (00:06 +0000)
committerewt <devnull@localhost>
Wed, 7 Apr 1999 00:06:56 +0000 (00:06 +0000)
CVS patchset: 2959
CVS date: 1999/04/07 00:06:56

install.c

index 6851f07..f48328e 100644 (file)
--- a/install.c
+++ b/install.c
@@ -247,9 +247,19 @@ int doInstall(const char * rootdir, const char ** argv, int transFlags,
                    }
                }
 
-               rpmtransAddPackage(rpmdep, h, NULL, *filename,
+               rc = rpmtransAddPackage(rpmdep, h, NULL, *filename,
                               (interfaceFlags & INSTALL_UPGRADE) != 0,
                               relocations);
+               if (rc) {
+                   if (rc == 1)
+                       rpmMessage(RPMMESS_ERROR, 
+                           _("error reading from file %s\n"), *filename);
+                   else if (rc == 2)
+                       rpmMessage(RPMMESS_ERROR, 
+                           _("file %s requires a newer version of RPM\n"),
+                           *filename);
+                   return numPackages;
+               }
 
                if (defaultReloc)
                    defaultReloc->oldPath = NULL;