<p><b>@pmatilai</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/rpm-software-management/rpm/pull/1066#discussion_r378826907">lib/transaction.c</a>:</p>
<pre style='color:#555'>> +        rpmPushMacro(NULL, "_minimize_writes", NULL, "1", 0);
+       } else {
+           char * val = rpmExpand("%{_minimize_writes}", NULL);
+           rpmPushMacro(NULL, "_minimize_writes", NULL, val, 0);
+           _free(val);
+       }
+       if (!rpmMacroIsDefined(NULL, "_flush_io") ||
+           rpmExpandNumeric("%{_flush_io}") == -1) {
+           rpmlog(RPMLOG_DEBUG,
+                  "enabling _flush_io for non-rotational disks\n");
+           rpmPushMacro(NULL, "_flush_io", NULL, "1", 0);
+       } else {
+           char * val = rpmExpand("%{_flush_io}", NULL);
+           rpmPushMacro(NULL, "_flush_io", NULL, val, 0);
+           _free(val);
+       }
</pre>
<p>This is too copy-paste'y for my taste, but the idea seems sound.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/1066?email_source=notifications&email_token=ADLPZU36QKTTLKE3ZSOD3MDRCU3MLA5CNFSM4KTCQKXKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCVMUTUI#pullrequestreview-358173137">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZU72JVC4EIJBMI4GJCDRCU3MLANCNFSM4KTCQKXA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ADLPZUYV2EPCVDUSUJEXCU3RCU3MLA5CNFSM4KTCQKXKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCVMUTUI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/1066?email_source=notifications\u0026email_token=ADLPZU36QKTTLKE3ZSOD3MDRCU3MLA5CNFSM4KTCQKXKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCVMUTUI#pullrequestreview-358173137",
"url": "https://github.com/rpm-software-management/rpm/pull/1066?email_source=notifications\u0026email_token=ADLPZU36QKTTLKE3ZSOD3MDRCU3MLA5CNFSM4KTCQKXKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCVMUTUI#pullrequestreview-358173137",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>