aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs30
1 files changed, 17 insertions, 13 deletions
diff --git a/URPM.xs b/URPM.xs
index 54a886d..a30b98d 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -523,24 +523,28 @@ return_list_tag_modifier(const Header header, rpmTag tag_name) {
if (!headerGet(header, tag_name, &td, HEADERGET_DEFAULT))
return;
int count = rpmtdCount(&td);
- int32_t *list = td.data;
+ rpmtdInit(&td);
for (i = 0; i < count; i++) {
char buff[15];
char *s = buff;
+ int32_t tag;
+ rpmtdNext(&td);
+ tag = rpmtdGetNumber(&td);
+
if (tag_name == RPMTAG_FILEFLAGS) {
- if (list[i] & RPMFILE_CONFIG) *s++ = 'c';
- if (list[i] & RPMFILE_DOC) *s++ = 'd';
- if (list[i] & RPMFILE_GHOST) *s++ = 'g';
- if (list[i] & RPMFILE_LICENSE) *s++ = 'l';
- if (list[i] & RPMFILE_MISSINGOK) *s++ = 'm';
- if (list[i] & RPMFILE_NOREPLACE) *s++ = 'n';
- if (list[i] & RPMFILE_SPECFILE) *s++ = 'S';
- if (list[i] & RPMFILE_README) *s++ = 'R';
- if (list[i] & RPMFILE_EXCLUDE) *s++ = 'e';
- if (list[i] & RPMFILE_ICON) *s++ = 'i';
- if (list[i] & RPMFILE_UNPATCHED) *s++ = 'u';
- if (list[i] & RPMFILE_PUBKEY) *s++ = 'p';
+ if (tag & RPMFILE_CONFIG) *s++ = 'c';
+ if (tag & RPMFILE_DOC) *s++ = 'd';
+ if (tag & RPMFILE_GHOST) *s++ = 'g';
+ if (tag & RPMFILE_LICENSE) *s++ = 'l';
+ if (tag & RPMFILE_MISSINGOK) *s++ = 'm';
+ if (tag & RPMFILE_NOREPLACE) *s++ = 'n';
+ if (tag & RPMFILE_SPECFILE) *s++ = 'S';
+ if (tag & RPMFILE_README) *s++ = 'R';
+ if (tag & RPMFILE_EXCLUDE) *s++ = 'e';
+ if (tag & RPMFILE_ICON) *s++ = 'i';
+ if (tag & RPMFILE_UNPATCHED) *s++ = 'u';
+ if (tag & RPMFILE_PUBKEY) *s++ = 'p';
} else {
rpmtdFreeData(&td);
return;