diff --git a/psm-errno.patch b/psm-errno.patch new file mode 100644 index 0000000..f17710e --- /dev/null +++ b/psm-errno.patch @@ -0,0 +1,28 @@ +Index: lib/psm.c +=================================================================== +--- lib/psm.c ++++ lib/psm.c +@@ -807,6 +807,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg + case PSM_PROCESS: + if (psm->goal == PKG_INSTALL) { + int fsmrc = 0; ++ int saved_errno = 0; + + rpmpsmNotify(psm, RPMCALLBACK_INST_START, 0); + /* make sure first progress call gets made */ +@@ -826,6 +827,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg + + fsmrc = rpmfsmRun(FSM_PKGINSTALL, psm->ts, psm->te, psm->fi, + payload, psm, NULL, &psm->failedFile); ++ saved_errno = errno; + + rpmswAdd(rpmtsOp(psm->ts, RPMTS_OP_UNCOMPRESS), + fdOp(payload, FDSTAT_READ)); +@@ -843,6 +845,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg + rpmpsmNotify(psm, RPMCALLBACK_INST_STOP, psm->total); + + if (fsmrc) { ++ errno = saved_errno; + rpmlog(RPMLOG_ERR, + _("unpacking of archive failed%s%s: %s\n"), + (psm->failedFile != NULL ? _(" on file ") : ""), diff --git a/rpm.changes b/rpm.changes index ab7f45e..3b51f06 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jun 23 19:03:27 UTC 2013 - schwab@linux-m68k.org + +- psm-errno.patch: avoid losing errno from failures to unpack archive + ------------------------------------------------------------------- Thu Jun 20 13:47:46 UTC 2013 - coolo@suse.com diff --git a/rpm.spec b/rpm.spec index 2a9682e..9459f1c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -135,6 +135,7 @@ Patch78: headerchk2.diff Patch79: helperenv.diff Patch80: config-guess-sub-update.diff Patch81: debugedit-aarch64.diff +Patch82: psm-errno.patch Patch6464: auto-config-update-aarch64.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -224,7 +225,7 @@ rm -f rpmdb/db.h %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 -%patch -P 80 -P 81 +%patch -P 80 -P 81 -P 82 %ifarch aarch64 %patch6464 %endif