From: Michael Schroeder Date: Tue, 19 May 2020 12:13:26 +0000 (+0200) Subject: Add USE_RPM_PUBKEY_BUILTTIME flag to switch to rpm style pubkey build times X-Git-Tag: 0.7.14~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0530c7f57a4e20c17e5ba74df024724cc441ac31;p=thirdparty%2Flibsolv.git Add USE_RPM_PUBKEY_BUILTTIME flag to switch to rpm style pubkey build times --- diff --git a/ext/repo_pubkey.c b/ext/repo_pubkey.c index 82b60ee2..883e13ad 100644 --- a/ext/repo_pubkey.c +++ b/ext/repo_pubkey.c @@ -547,7 +547,7 @@ parsepubkey(Solvable *s, Repodata *data, unsigned char *p, int pl, int flags) repodata_set_str(data, s - pool->solvables, PUBKEY_KEYID, keyidstr); /* build rpm-style evr */ strcpy(evr, keyidstr + 8); - sprintf(evr + 8, "-%08x", pool->disttype == DISTTYPE_RPM ? rpmsigcr : maxsigcr); + sprintf(evr + 8, "-%08x", (flags & USE_RPM_PUBKEY_BUILTTIME) ? rpmsigcr : maxsigcr); s->evr = pool_str2id(pool, evr, 1); } if (insubkey && *subkeyofstr) diff --git a/ext/repo_pubkey.h b/ext/repo_pubkey.h index 26cf0e1f..51946bf9 100644 --- a/ext/repo_pubkey.h +++ b/ext/repo_pubkey.h @@ -12,6 +12,7 @@ #define ADD_WITH_SUBKEYS (1 << 9) #define ADD_MULTIPLE_PUBKEYS (1 << 10) #define ADD_WITH_KEYSIGNATURES (1 << 11) +#define USE_RPM_PUBKEY_BUILTTIME (1 << 12) extern int repo_add_rpmdb_pubkeys(Repo *repo, int flags); extern Id repo_add_pubkey(Repo *repo, const char *keyfile, int flags);