From: ewt Date: Wed, 7 Apr 1999 00:06:56 +0000 (+0000) Subject: give an error w/ we find packages with bad capabilities X-Git-Tag: rpm-4.4-release~2960 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4606c3415399da816dea7f2567d88bfb22b87644;p=platform%2Fupstream%2Frpm.git give an error w/ we find packages with bad capabilities CVS patchset: 2959 CVS date: 1999/04/07 00:06:56 --- diff --git a/install.c b/install.c index 6851f07..f48328e 100644 --- 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;