- transaction scripts have zero to do with files...
if (isBuild) fi->fiflags |= RPMFI_ISBUILD;
if (isSource) fi->fiflags |= RPMFI_ISSOURCE;
- /* See if we have pre/posttrans scripts. */
- fi->transscripts |= (headerIsEntry(h, RPMTAG_PRETRANS) &&
- headerIsEntry(h, RPMTAG_PRETRANSPROG)) ?
- RPMFI_HAVE_PRETRANS : 0;
- fi->transscripts |= (headerIsEntry(h, RPMTAG_POSTTRANS) &&
- headerIsEntry(h, RPMTAG_POSTTRANSPROG)) ?
- RPMFI_HAVE_POSTTRANS : 0;
-
_hgfi(h, RPMTAG_BASENAMES, &td, defFlags, fi->bnl);
fi->fc = rpmtdCount(&td);
if (fi->fc == 0) {
pgpHashAlgo digestalgo; /*!< File checksum algorithm */
unsigned char * digests; /*!< File checksums in binary. */
-#define RPMFI_HAVE_PRETRANS (1 << 0)
-#define RPMFI_HAVE_POSTTRANS (1 << 1)
- int transscripts; /*!< pre/posttrans script existence */
-
char * fn; /*!< File name buffer. */
size_t striplen;
p->fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, fiflags);
(void) rpmtsSetRelocateElement(ts, savep);
+ /* See if we have pre/posttrans scripts. */
+ p->transscripts |= (headerIsEntry(h, RPMTAG_PRETRANS) &&
+ headerIsEntry(h, RPMTAG_PRETRANSPROG)) ?
+ RPMTE_HAVE_PRETRANS : 0;
+ p->transscripts |= (headerIsEntry(h, RPMTAG_POSTTRANS) &&
+ headerIsEntry(h, RPMTAG_POSTTRANSPROG)) ?
+ RPMTE_HAVE_POSTTRANS : 0;
+
rpmteColorDS(p, RPMTAG_PROVIDENAME);
rpmteColorDS(p, RPMTAG_REQUIRENAME);
return;
int nrelocs; /*!< (TR_ADDED) No. of relocations. */
FD_t fd; /*!< (TR_ADDED) Payload file descriptor. */
+#define RPMTE_HAVE_PRETRANS (1 << 0)
+#define RPMTE_HAVE_POSTTRANS (1 << 1)
+ int transscripts; /*!< pre/posttrans script existence */
+
rpmalKey pkgKey;
};
rpmTag progtag = RPMTAG_NOT_FOUND;
int havescript = 0;
- if ((fi = rpmtsiFi(pi)) == NULL)
- continue; /* XXX can't happen */
-
switch (stag) {
case RPMTAG_PRETRANS:
- havescript = fi->transscripts & RPMFI_HAVE_PRETRANS;
+ havescript = p->transscripts & RPMTE_HAVE_PRETRANS;
progtag = RPMTAG_PRETRANSPROG;
break;
case RPMTAG_POSTTRANS:
- havescript = fi->transscripts & RPMFI_HAVE_POSTTRANS;
+ havescript = p->transscripts & RPMTE_HAVE_POSTTRANS;
progtag = RPMTAG_POSTTRANSPROG;
break;
default:
if (!havescript)
continue;
+ if ((fi = rpmtsiFi(pi)) == NULL)
+ continue; /* XXX can't happen */
+
if (rpmteOpen(p, ts)) {
p->fi = rpmfiFree(p->fi);
fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, RPMFI_KEEPHEADER);