From f9f1064dc0681321e13d240b193895ecc7d6d5cf Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 13 May 2002 22:34:25 +0000 Subject: Eliminate bogus strerror message for manifests. CVS patchset: 5433 CVS date: 2002/05/13 22:34:25 --- lib/package.c | 5 ++--- lib/query.c | 4 ++-- lib/rpminstall.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/package.c b/lib/package.c index ada52b745..178430144 100644 --- a/lib/package.c +++ b/lib/package.c @@ -171,7 +171,6 @@ int rpmReadPackageFile(rpmTransactionSet ts, FD_t fd, if (l->magic[0] != RPMLEAD_MAGIC0 || l->magic[1] != RPMLEAD_MAGIC1 || l->magic[2] != RPMLEAD_MAGIC2 || l->magic[3] != RPMLEAD_MAGIC3) { - rpmError(RPMERR_READLEAD, _("%s: bad magic\n"), fn); rc = RPMRC_NOTFOUND; goto exit; } @@ -259,7 +258,7 @@ int rpmReadPackageFile(rpmTransactionSet ts, FD_t fd, ts->dig = pgpNewDig(); if (ts->dig == NULL) { - rc = RPMRC_OK; /* XXX WRONG */ + rc = RPMRC_FAIL; goto exit; } ts->dig->nbytes = 0; @@ -269,7 +268,7 @@ int rpmReadPackageFile(rpmTransactionSet ts, FD_t fd, xx = headerGetEntry(sig, ts->sigtag, &ts->sigtype, (void **) &ts->sig, &ts->siglen); if (ts->sig == NULL) { - rc = RPMRC_OK; /* XXX WRONG */ + rc = RPMRC_FAIL; goto exit; } diff --git a/lib/query.c b/lib/query.c index 4b24db631..abd222b32 100644 --- a/lib/query.c +++ b/lib/query.c @@ -664,8 +664,8 @@ restart: /* Read list of packages from manifest. */ res = rpmReadPackageManifest(fd, &ac, &av); - if (res) { - rpmError(RPMERR_MANIFEST, _("%s: read manifest failed: %s\n"), + if (res != RPMRC_OK) { + rpmError(RPMERR_MANIFEST, _("%s: not a package manifest: %s\n"), fileURL, Fstrerror(fd)); res = 1; } diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 11e13f2de..d777eb73b 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -503,8 +503,8 @@ restart: /* Read list of packages from manifest. */ rc = rpmReadPackageManifest(eiu->fd, &eiu->argc, &eiu->argv); - if (rc) - rpmError(RPMERR_MANIFEST, _("%s: read manifest failed: %s\n"), + if (rc != RPMRC_OK) + rpmError(RPMERR_MANIFEST, _("%s: not a package manifest: %s\n"), *eiu->fnp, Fstrerror(eiu->fd)); xx = Fclose(eiu->fd); eiu->fd = NULL; -- cgit v1.2.3