summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-05-13 22:34:25 +0000
committerjbj <devnull@localhost>2002-05-13 22:34:25 +0000
commitf9f1064dc0681321e13d240b193895ecc7d6d5cf (patch)
tree4b9422c4860b069cf8cff3323399cd16ccc04427 /lib
parent5a51033929040439103c27d9cf070079c756d8f9 (diff)
downloadlibrpm-tizen-f9f1064dc0681321e13d240b193895ecc7d6d5cf.tar.gz
librpm-tizen-f9f1064dc0681321e13d240b193895ecc7d6d5cf.tar.bz2
librpm-tizen-f9f1064dc0681321e13d240b193895ecc7d6d5cf.zip
Eliminate bogus strerror message for manifests.
CVS patchset: 5433 CVS date: 2002/05/13 22:34:25
Diffstat (limited to 'lib')
-rw-r--r--lib/package.c5
-rw-r--r--lib/query.c4
-rw-r--r--lib/rpminstall.c4
3 files changed, 6 insertions, 7 deletions
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;