{!s}to use." ).format("rawfs")) + libcalamares.utils.debug("Copying {!s} raw partitions.".format(len(partitions))) for partition in partitions: if partition["mountPoint"]: for src in libcalamares.job.configuration["targets"]: diff --git a/src/modules/rawfs/rawfs.conf b/src/modules/rawfs/rawfs.conf index 10e654a7d..8d7da3ba3 100644 --- a/src/modules/rawfs/rawfs.conf +++ b/src/modules/rawfs/rawfs.conf @@ -22,3 +22,8 @@ targets: resize: true - mountPoint: /data source: /dev/mmcblk0p3 + +# To support testing, set the *bogus* key to true. No actual work is done, but the +# module's logic is exercised. + +# bogus: false diff --git a/src/modules/rawfs/tests/1.global b/src/modules/rawfs/tests/1.global new file mode 100644 index 000000000..c09df9375 --- /dev/null +++ b/src/modules/rawfs/tests/1.global @@ -0,0 +1,9 @@ +--- +rootMountPoint: /tmp/unpackfs-test-run-rootdir3/ +partitions: + - mountPoint: / + device: /dev/sda1 + fs: ext4 + - mountPoint: /home + device: /dev/sda2 + fs: ext4 diff --git a/src/modules/rawfs/tests/1.job b/src/modules/rawfs/tests/1.job new file mode 100644 index 000000000..6079c43ed --- /dev/null +++ b/src/modules/rawfs/tests/1.job @@ -0,0 +1,14 @@ +# Testing configuration for rawfs + +--- + +targets: + - mountPoint: / + source: / + - mountPoint: /home + source: /images/home.img + resize: true + - mountPoint: /data + source: /dev/mmcblk0p3 + +bogus: true diff --git a/src/modules/testmodule.py b/src/modules/testmodule.py deleted file mode 100755 index 633d57d9f..000000000 --- a/src/modules/testmodule.py +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# === This file is part of Calamares -
This computer does not satisfy some of the recommended requirements for setting up %1.
+Setup can continue, but some features might be disabled.
").arg(Branding.string(Branding.VersionedName)) + } + + TextArea { + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: recommended.bottom + anchors.topMargin: 20 + width: 640 + background: Rectangle { + implicitWidth: 640 + implicitHeight: 50 + border.color: "#ff0000" + color: "#b0e0e6" + } + font.pointSize: 12 + textFormat: Text.RichText + antialiasing: true + activeFocusOnPress: false + wrapMode: Text.WordWrap + + text: qsTr("The system is not connected to the internet.
")//.arg(requirementsModel) + } +} diff --git a/src/modules/welcomeq/Requirements.qml b/src/modules/welcomeq/Requirements.qml new file mode 100644 index 000000000..4f5520270 --- /dev/null +++ b/src/modules/welcomeq/Requirements.qml @@ -0,0 +1,67 @@ +/* === This file is part of Calamares -This computer does not satisfy the minimum requirements for setting up %1.
+Setup cannot continue.
").arg(Branding.string(Branding.VersionedName)) + } + + TextArea { + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: required.bottom + anchors.topMargin: 20 + width: 640 + background: Rectangle { + implicitWidth: 640 + implicitHeight: 50 + border.color: "#ff0000" + color: "#ffc0cb" + } + font.pointSize: 12 + textFormat: Text.RichText + antialiasing: true + activeFocusOnPress: false + wrapMode: Text.WordWrap + + text: qsTr("The installer is not running with administrator rights.
")//.arg(requirementsModel) + } +} diff --git a/src/modules/welcomeq/about.qml b/src/modules/welcomeq/about.qml index f301c6659..7fa6fb462 100644 --- a/src/modules/welcomeq/about.qml +++ b/src/modules/welcomeq/about.qml @@ -28,7 +28,7 @@ Item { focus: true property var appName: "Calamares" - property var appVersion: "3.2.22" + property var appVersion: "3.2.24" Rectangle { id: textArea diff --git a/src/modules/welcomeq/welcomeq.qml b/src/modules/welcomeq/welcomeq.qml index f597f7105..910274fe2 100644 --- a/src/modules/welcomeq/welcomeq.qml +++ b/src/modules/welcomeq/welcomeq.qml @@ -56,6 +56,20 @@ Page fillMode: Image.PreserveAspectFit } + Recommended { + property var required: "yes" //requirementsModel + property var satisfied: "yes" //satisfiedRequirements + property var requiredMet: (required != satisfied) ? true : false + visible: requiredMet + } + + Requirements { + property var required: "yes" //requirementsModel + property var mandatory: "yes" //satisfiedMandatory + property var mandatoryMet: (required != mandatory) ? true : false + visible: mandatoryMet + } + RowLayout { id: buttonBar width: parent.width / 1.5 diff --git a/src/modules/welcomeq/welcomeq.qrc b/src/modules/welcomeq/welcomeq.qrc index 71431254e..ef41f816a 100644 --- a/src/modules/welcomeq/welcomeq.qrc +++ b/src/modules/welcomeq/welcomeq.qrc @@ -3,6 +3,8 @@