summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-10-03 11:34:41 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-10-03 11:34:41 +0300
commite2b89abff7f6592bb2c2f2bda996d89df1960282 (patch)
tree3f57d177e96442c714cd915cda13ab846d11d4a6 /lib/psm.c
parentb520b61387757e0ceb907d41cb0d0a5f6478bdbd (diff)
downloadrpm-e2b89abff7f6592bb2c2f2bda996d89df1960282.tar.gz
rpm-e2b89abff7f6592bb2c2f2bda996d89df1960282.tar.bz2
rpm-e2b89abff7f6592bb2c2f2bda996d89df1960282.zip
Log message on all scriptlet failures.
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/psm.c b/lib/psm.c
index 046964b47..4dc714c23 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -756,6 +756,8 @@ static rpmRC runScript(rpmpsm psm, Header h, rpmTag stag, ARGV_t * argvp,
fd = rpmMkTempFile((!rpmtsChrootDone(ts) ? rootDir : "/"), &fn);
if (fd == NULL || Ferror(fd)) {
+ rpmlog(RPMLOG_ERR, _("Couldn't create temporary file for %s: %s\n"),
+ sname, strerror(errno));
rc = RPMRC_FAIL;
goto exit;
}
@@ -803,7 +805,9 @@ static rpmRC runScript(rpmpsm psm, Header h, rpmTag stag, ARGV_t * argvp,
} else {
out = fdDup(STDOUT_FILENO);
}
- if (out == NULL) { /* XXX can't happen */
+ if (out == NULL) {
+ rpmlog(RPMLOG_ERR, _("Couldn't duplicate file descriptor: %s: %s\n"),
+ sname, strerror(errno));
rc = RPMRC_FAIL;
goto exit;
}