summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-12-29 22:31:00 +0000
committerjbj <devnull@localhost>2002-12-29 22:31:00 +0000
commitcb4b0b8ce12baa3ec035f91e4bd5ad4c0cfa1886 (patch)
tree4ebb3cdd1d277d4d72b093dfd5663e32c710332b /rpmdb
parentc67befa2833503c8864ec906a07ad8b4b617947c (diff)
downloadlibrpm-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.c8
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);