From: Panu Matilainen Date: Fri, 13 Jan 2012 08:06:09 +0000 (+0200) Subject: Ensure installs always use a temp suffix on files X-Git-Tag: rpm-4.10.0-beta1~138 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e1feaf5438c014d74af3e047e1874d6e8e8610d;p=platform%2Fupstream%2Frpm.git Ensure installs always use a temp suffix on files - This bogosity goes back to commit fcf6b50378eaeac4c1f7ca215b33586b4d41072f which was supposed to fix files getting erased if time() returns errors (RhBug:223931). Problem is, this "fix" didn't fix anything at all as the suffix still wouldn't be created in the error case, even if the FSM_UNDO part did the right thing. We always want a suffix on installs, it doesn't matter *what* the suffix is. --- diff --git a/lib/fsm.c b/lib/fsm.c index 6d84573..1710bb4 100644 --- a/lib/fsm.c +++ b/lib/fsm.c @@ -619,8 +619,7 @@ static int fsmSetup(FSM_t fsm, fileStage goal, memset(fsm->sufbuf, 0, sizeof(fsm->sufbuf)); if (fsm->goal == FSM_PKGINSTALL) { - if (ts && rpmtsGetTid(ts) != (rpm_tid_t)-1) - sprintf(fsm->sufbuf, ";%08x", (unsigned)rpmtsGetTid(ts)); + sprintf(fsm->sufbuf, ";%08x", (unsigned)rpmtsGetTid(ts)); } ec = fsm->rc = 0;