[Rpm-maint] [rpm-software-management/rpm] Use autodetect for _minimize_writes and _flush_io (#1066)

Panu Matilainen notifications at github.com
Thu Feb 13 12:21:25 UTC 2020


pmatilai commented on this pull request.



> +	    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);
+	}

This is too copy-paste'y for my taste, but the idea seems sound. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1066#pullrequestreview-358173137
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200213/3ca97d71/attachment.html>


More information about the Rpm-maint mailing list