Add rpmteSetFd() (internal) function
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 2 Jan 2009 10:21:52 +0000 (12:21 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 2 Jan 2009 10:21:52 +0000 (12:21 +0200)
- this is dumb as only rpmInstallSourcePackage() needs, figure out something
  better eventually

lib/rpmte.c
lib/rpmte_internal.h

index 89facfb..92efdc8 100644 (file)
@@ -465,6 +465,17 @@ const char * rpmteNEVRA(rpmte te)
     return (te != NULL ? te->NEVRA : NULL);
 }
 
+FD_t rpmteSetFd(rpmte te, FD_t fd)
+{
+    if (te != NULL)  {
+       if (te->fd != NULL)
+           te->fd = fdFree(te->fd, RPMDBG_M("rpmteSetFd"));
+       if (fd != NULL)
+           te->fd = fdLink(fd, RPMDBG_M("rpmteSetFd"));
+    }
+    return NULL;
+}
+
 FD_t rpmteFd(rpmte te)
 {
     return (te != NULL ? te->fd : NULL);
index 7e9d3ef..5946cc0 100644 (file)
@@ -114,6 +114,9 @@ RPM_GNUC_INTERNAL
 rpmfi rpmteSetFI(rpmte te, rpmfi fi);
 
 RPM_GNUC_INTERNAL
+FD_t rpmteSetFd(rpmte te, FD_t fd);
+
+RPM_GNUC_INTERNAL
 int rpmteOpen(rpmte te, rpmts ts, int reload_fi);
 
 RPM_GNUC_INTERNAL