diff options
author | jbj <devnull@localhost> | 2002-12-29 22:31:00 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-12-29 22:31:00 +0000 |
commit | cb4b0b8ce12baa3ec035f91e4bd5ad4c0cfa1886 (patch) | |
tree | 4ebb3cdd1d277d4d72b093dfd5663e32c710332b /rpmdb | |
parent | c67befa2833503c8864ec906a07ad8b4b617947c (diff) | |
download | librpm-tizen-cb4b0b8ce12baa3ec035f91e4bd5ad4c0cfa1886.tar.gz librpm-tizen-cb4b0b8ce12baa3ec035f91e4bd5ad4c0cfa1886.tar.bz2 librpm-tizen-cb4b0b8ce12baa3ec035f91e4bd5ad4c0cfa1886.zip |
- fix :armor query extension, tgpg mktmp handling (#80684).
- use rpmfiClass underneath --fileclass.
CVS patchset: 5985
CVS date: 2002/12/29 22:31:00
Diffstat (limited to 'rpmdb')
-rw-r--r-- | rpmdb/header.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rpmdb/header.c b/rpmdb/header.c index 995c59209..269bf9312 100644 --- a/rpmdb/header.c +++ b/rpmdb/header.c @@ -2735,6 +2735,7 @@ static int parseExpression(sprintfToken token, char * str, /*@=boundswrite@*/ /** + * Call a header extension only once, saving results. * @param h header * @param fn * @retval *typeptr @@ -2898,7 +2899,7 @@ static char * formatValue(sprintfTag tag, Header h, case RPM_STRING_TYPE: if (tagtype) - val = tagtype(RPM_STRING_ARRAY_TYPE, data, buf, tag->pad, 0); + val = tagtype(RPM_STRING_TYPE, data, buf, tag->pad, 0); if (val) { need = strlen(val); @@ -2931,7 +2932,7 @@ static char * formatValue(sprintfTag tag, Header h, } if (tagtype) - val = tagtype(RPM_INT32_TYPE, &intVal, buf, tag->pad, element); + val = tagtype(RPM_INT32_TYPE, &intVal, buf, tag->pad, element); if (val) { need = strlen(val); @@ -2946,11 +2947,12 @@ static char * formatValue(sprintfTag tag, Header h, break; case RPM_BIN_TYPE: + /* XXX HACK ALERT: element field abused as no. bytes of binary data. */ if (tagtype) val = tagtype(RPM_BIN_TYPE, data, buf, tag->pad, count); if (val) { - need = count; /* XXX broken iff RPM_BIN_TYPE extension */ + need = strlen(val); } else { #ifdef NOTYET val = memcpy(xmalloc(count), data, count); |