add disttag to struct availablePackage (like buildtime; affects rpm -U & interdep.c)

This commit is contained in:
Ivan Zakharyaschev 2019-02-25 07:45:16 +03:00
parent 6be20da468
commit ef382d2a80
3 changed files with 6 additions and 1 deletions

View File

@ -386,7 +386,7 @@ alAddPackage(availableList al,
p->depth = p->npreds = 0;
memset(&p->tsi, 0, sizeof(p->tsi));
(void) headerNVR(p->h, &p->name, &p->version, &p->release);
(void) headerNVRD(p->h, &p->name, &p->version, &p->release, &p->disttag);
if (!hge(h, RPMTAG_EPOCH, NULL, (void **) &p->epoch, NULL))
p->epoch = NULL;

View File

@ -60,6 +60,7 @@ struct availablePackage {
/*@null@*/ FD_t fd;
int_32 * buildtime;
/*@dependent@*/ const char * disttag; /*!< Header disttag (if any). */
} ;
/** \ingroup rpmdep

View File

@ -1654,6 +1654,10 @@ int rpmRunTransactions( rpmTransactionSet ts,
RPMMIRE_DEFAULT, alp->version);
(void) rpmdbSetIteratorRE(mi, RPMTAG_RELEASE,
RPMMIRE_DEFAULT, alp->release);
if (alp->disttag) {
(void) rpmdbSetIteratorRE(mi, RPMTAG_DISTTAG,
RPMMIRE_DEFAULT, alp->disttag);
}
if (alp->buildtime && upgrade_honor_buildtime()) {
sprintf(b, "%u", *alp->buildtime);
(void) rpmdbSetIteratorRE(mi, RPMTAG_BUILDTIME,