diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-03-09 14:48:47 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-03-09 14:48:47 +0200 |
commit | 2b4507d852ac8469608bef2ce8e219d76b0c543e (patch) | |
tree | f84c267d55aec8752ae5f199cc22392f610837d8 /lib/psm.c | |
parent | 1c1faec7a30099f62c12ccef2f15e37a202e6518 (diff) | |
download | rpm-2b4507d852ac8469608bef2ce8e219d76b0c543e.tar.gz rpm-2b4507d852ac8469608bef2ce8e219d76b0c543e.tar.bz2 rpm-2b4507d852ac8469608bef2ce8e219d76b0c543e.zip |
Fix RPMTAG_FILESTATES in rpmdb
- sizeof(rpmfileState) != sizeof(char), and char is what goes to headers
resulting in some pretty weird states despite being correct on disk
- add rpm_fstate_t type for the header presentation of states and
use where appropriate
Diffstat (limited to 'lib/psm.c')
-rw-r--r-- | lib/psm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1417,11 +1417,11 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage) rpm_time_t installTime = (rpm_time_t) time(NULL); rpmfs fs = rpmteGetFileStates(psm->te); rpm_count_t fc = rpmfsFC(fs); - rpmfileState * fileStates = rpmfsGetStates(fs); + rpm_fstate_t * fileStates = rpmfsGetStates(fs); Header h = rpmteHeader(psm->te); if (fileStates != NULL && fc > 0) { - headerPutChar(h, RPMTAG_FILESTATES, (char *) fileStates, fc); + headerPutChar(h, RPMTAG_FILESTATES, fileStates, fc); } headerPutUint32(h, RPMTAG_INSTALLTIME, &installTime, 1); |