Skip to content

Instantly share code, notes, and snippets.

@jordemort
Created May 10, 2022 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordemort/c61e9d8eb53b6c0f0e12780e6947da83 to your computer and use it in GitHub Desktop.
Save jordemort/c61e9d8eb53b6c0f0e12780e6947da83 to your computer and use it in GitHub Desktop.
diff --git a/lib/psm.c b/lib/psm.c
index 810323a45..81c429269 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -103,7 +103,7 @@ static rpmRC markReplacedFiles(const rpmpsm psm)
if (!headerGet(h, RPMTAG_FILESTATES, &secStates, HEADERGET_MINMEM))
continue;
-
+
prev = rpmdbGetIteratorOffset(mi);
num = 0;
while (sfi && sfi->otherPkg == prev) {
@@ -401,7 +401,7 @@ static rpmRC runImmedTriggers(rpmpsm psm, rpmsenseFlags sense)
int i = rpmtdGetIndex(&tnames);
if (triggersRun[triggerIndices[i]] != 0) continue;
-
+
mi = rpmtsInitIterator(ts, RPMDBI_NAME, trigName, 0);
while ((sourceH = rpmdbNextIterator(mi)) != NULL) {
@@ -536,7 +536,7 @@ static void markReplacedInstance(rpmts ts, rpmte te)
static rpmRC dbAdd(rpmts ts, rpmte te)
{
Header h = rpmteHeader(te);
- rpm_time_t installTime = (rpm_time_t) time(NULL);
+ rpm_time_t installTime = (rpm_time_t) 0;
rpmfs fs = rpmteGetFileStates(te);
rpm_count_t fc = rpmfsFC(fs);
rpm_fstate_t * fileStates = rpmfsGetStates(fs);
@@ -548,7 +548,7 @@ static rpmRC dbAdd(rpmts ts, rpmte te)
headerPutChar(h, RPMTAG_FILESTATES, fileStates, fc);
}
- headerPutUint32(h, RPMTAG_INSTALLTID, &tid, 1);
+ headerPutUint32(h, RPMTAG_INSTALLTID, &installTime, 1);
headerPutUint32(h, RPMTAG_INSTALLTIME, &installTime, 1);
headerPutUint32(h, RPMTAG_INSTALLCOLOR, &tscolor, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment