summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-12-05 23:22:41 +0000
committerjbj <devnull@localhost>1998-12-05 23:22:41 +0000
commit9d8c68e32d87826eede3849a28d2d5c53fae506e (patch)
treece98dbebff452a5748261dcf3341dac9569ddabe /build
parentfb2fc01de41dc92ebe66a027e975f9063adb6c8a (diff)
downloadrpm-9d8c68e32d87826eede3849a28d2d5c53fae506e.tar.gz
rpm-9d8c68e32d87826eede3849a28d2d5c53fae506e.tar.bz2
rpm-9d8c68e32d87826eede3849a28d2d5c53fae506e.zip
translate cpio errors using cpioStrerror.
CVS patchset: 2592 CVS date: 1998/12/05 23:22:41
Diffstat (limited to 'build')
-rw-r--r--build/pack.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/build/pack.c b/build/pack.c
index 40f747c85..59556a875 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -397,19 +397,15 @@ static int cpio_gzip(FD_t fdo, CSA_t *csa) {
cfd->cpioGzFd = gzdFdopen(fdDup(fdFileno(fdo)), "w9");
rc = cpioBuildArchive(cfd, csa->cpioList, csa->cpioCount, NULL, NULL,
&csa->cpioArchiveSize, &failedFile);
- gzdClose(cfd->cpioGzFd);
-
if (rc) {
- if (rc & CPIO_CHECK_ERRNO)
- rpmError(RPMERR_CPIO, _("cpio failed on file %s: %s"),
- failedFile, strerror(errno));
- else
- rpmError(RPMERR_CPIO, _("cpio failed on file %s: %d"),
- failedFile, rc);
- return 1;
+ rpmError(RPMERR_CPIO, _("create archive failed on file %s: %s"),
+ failedFile, cpioStrerror(rc));
+ rc = 1;
}
- return 0;
+ gzdClose(cfd->cpioGzFd);
+
+ return rc;
}
static int cpio_copy(FD_t fdo, CSA_t *csa) {