Convert addFileToTag() to new headerGet()
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 26 May 2008 11:45:00 +0000 (14:45 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 26 May 2008 11:45:00 +0000 (14:45 +0300)
build/pack.c

index 3f74570..f830068 100644 (file)
@@ -142,12 +142,14 @@ exit:
  */
 static int addFileToTag(rpmSpec spec, const char * file, Header h, rpmTag tag)
 {
-    HGE_t hge = (HGE_t)headerGetEntryMinMemory;
     StringBuf sb = newStringBuf();
-    char *s;
+    const char *s;
+    struct rpmtd_s td;
 
-    if (hge(h, tag, NULL, (rpm_data_t *)&s, NULL)) {
+    headerGet(h, tag, &td, HEADERGET_MINMEM);
+    if ((s = rpmtdGetString(&td))) {
        appendLineStringBuf(sb, s);
+       rpmtdFreeData(&td);
        (void) headerRemoveEntry(h, tag);
     }