diff options
author | jbj <devnull@localhost> | 2001-02-12 19:02:15 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-02-12 19:02:15 +0000 |
commit | 85a84a6826f982160c31286fb23be771d69eb5ea (patch) | |
tree | 3c7b44d9f713c7f61d3f8a0470c2cedd52c15f08 /lib/transaction.c | |
parent | bc348ac49cddff43f7aed6d0d17531a8482d0e47 (diff) | |
download | librpm-tizen-85a84a6826f982160c31286fb23be771d69eb5ea.tar.gz librpm-tizen-85a84a6826f982160c31286fb23be771d69eb5ea.tar.bz2 librpm-tizen-85a84a6826f982160c31286fb23be771d69eb5ea.zip |
Add rpmRC return code type for the usual 0/1/2 codes.
Add RPMRC_BADSIZE to deal with packages changing size after repackaging.
CVS patchset: 4550
CVS date: 2001/02/12 19:02:15
Diffstat (limited to 'lib/transaction.c')
-rw-r--r-- | lib/transaction.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/transaction.c b/lib/transaction.c index 1a73cfa1d..d17068397 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1721,13 +1721,14 @@ int rpmRunTransactions( rpmTransactionSet ts, alp->key, ts->notifyData); if (alp->fd) { Header h; + rpmRC rpmrc; headerFree(hdrs[i]); hdrs[i] = NULL; - rc = rpmReadPackageHeader(alp->fd, &h, NULL, NULL, NULL); - if (rc) { - (void)ts->notify(fi->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0, - alp->key, ts->notifyData); + rpmrc = rpmReadPackageHeader(alp->fd, &h, NULL, NULL, NULL); + if (!(rpmrc == RPMRC_OK || rpmrc == RPMRC_BADSIZE)) { + (void)ts->notify(fi->h, RPMCALLBACK_INST_CLOSE_FILE, + 0, 0, alp->key, ts->notifyData); alp->fd = NULL; ourrc++; } else { |