[education/rkward] rkward/settings: Fix binary package selection on Mac

Thomas Friedrichsmeier null at kde.org
Tue Apr 5 13:38:24 BST 2022


Git commit ecd3f82df762321ec386058f918841579554239f by Thomas Friedrichsmeier.
Committed on 05/04/2022 at 12:38.
Pushed by tfry into branch 'master'.

Fix binary package selection on Mac

M  +5    -15   rkward/settings/rksettingsmoduler.cpp

https://invent.kde.org/education/rkward/commit/ecd3f82df762321ec386058f918841579554239f

diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp
index d8cb4f86..ac328b19 100755
--- a/rkward/settings/rksettingsmoduler.cpp
+++ b/rkward/settings/rksettingsmoduler.cpp
@@ -335,7 +335,7 @@ RKSettingsModuleRPackages::RKSettingsModuleRPackages (RKSettings *gui, QWidget *
 	main_vbox->addWidget(archive_packages.makeCheckbox(i18n("Archive downloaded packages"), this));
 
 	auto source_packages_box = source_packages.makeCheckbox(i18n ("Build packages from source"), this);
-#if !defined Q_OS_WIN || defined Q_OS_MACOS
+#if !(defined Q_OS_WIN || defined Q_OS_MACOS)
 	source_packages_box->setText(i18n("Build packages from source (not configurable on this platform)"));
 	source_packages_box->setChecked (true);
 	source_packages_box->setEnabled (false);
@@ -502,20 +502,10 @@ QString RKSettingsModuleRPackages::libLocsCommand () {
 QString RKSettingsModuleRPackages::pkgTypeOption () {
 	QString ret;
 #if defined Q_OS_WIN || defined Q_OS_MACOS
-	ret.append ("options (pkgType=\"");
-	if (source_packages) ret.append ("source");
-	else if (RKSessionVars::compareRVersion ("3.1.3") <= 0) ret.append ("binary");   // "automatically select appropriate binary", unfortunately it's only available from R 3.1.3. onwards.
-#	if defined Q_OS_WIN
-	else ret.append ("win.binary");
-#	else
-	else if (RKSessionVars::compareRVersion ("3.0.0") > 0) {
-		ret.append ("mac.binary.leopard");
-	} else {
-		// OS X binary packages have switched repo locations and package type in R >= 3.0.0
-		ret.append ("mac.binary");
-	}
-#	endif
-	ret.append ("\")\n");
+	ret.append("options (pkgType=\"");
+	if (source_packages) ret.append("source");
+	else ret.append("binary");   // "automatically select appropriate binary"
+	ret.append("\")\n");
 #endif
 	return ret;
 }


More information about the rkward-tracker mailing list