summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2018-05-20 04:36:38 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2018-05-20 04:45:33 -0400
commita506dbf51ac4db350510680b63b54dc75d2c9249 (patch)
tree77b9def6a9956b124a16fa0cdb39cb2189d7333a
parentfc44b94eeca72350648b8b01ce5e2fac261925c0 (diff)
sq - package selection
-rw-r--r--src/libcalamares/GlobalStorage.cpp11
-rw-r--r--src/libcalamares/GlobalStorage.h11
-rw-r--r--src/libcalamares/PacstrapCppJob.cpp12
-rw-r--r--src/libcalamares/PacstrapCppJob.h8
-rw-r--r--src/libcalamaresui/ViewManager.cpp2
-rw-r--r--src/modules/netinstall/NetInstallPage.cpp50
-rw-r--r--src/modules/netinstall/NetInstallPage.h11
-rw-r--r--src/modules/netinstall/NetInstallViewStep.cpp99
-rw-r--r--src/modules/netinstall/NetInstallViewStep.h2
-rw-r--r--src/modules/netinstall/netinstall.conf6
-rw-r--r--src/modules/netinstall/page_netinst.ui17
-rw-r--r--src/modules/welcome/checker/RequirementsChecker.cpp8
12 files changed, 171 insertions, 66 deletions
diff --git a/src/libcalamares/GlobalStorage.cpp b/src/libcalamares/GlobalStorage.cpp
index 24546aa87..04ec1f25c 100644
--- a/src/libcalamares/GlobalStorage.cpp
+++ b/src/libcalamares/GlobalStorage.cpp
@@ -171,6 +171,16 @@ const QString GS::HAS_ISOREPO_KEY = "has-isorepo";
const QString GS::IS_ONLINE_KEY = "hasInternet";
const QString GS::INITSYSTEM_KEY = "default-initsystem" ;
const QString GS::DESKTOP_KEY = "default-desktop" ;
+const QString GS::DESKTOPS_KEY = "desktops";
+const QString GS::DE_ICON_KEY = "de-icon";
+const QString GS::DE_NAME_KEY = "de-name";
+const QString GS::PACKAGE_GROUPS_KEY = "package-groups";
+const QString GS::PACKAGES_KEY = "packageOperations";
+const QString GS::PACKAGES_CRITICAL_KEY = "install";
+const QString GS::PACKAGES_NONCRITICAL_KEY = "try_install";
+const QString GS::PACKAGE_PRE_KEY = "pre-script";
+const QString GS::PACKAGE_KEY = "package";
+const QString GS::PACKAGE_POST_KEY = "post-script";
const QString GS::LOCALE_KEY = "localeConf";
const QString GS::LANG_KEY = "LANG";
const QString GS::ROOT_MOUNTPOINT_KEY = "rootMountPoint";
@@ -179,7 +189,6 @@ const QString GS::DEVICE_KEY = "device";
const QString GS::FS_KEY = "fs";
const QString GS::MOUNTPOINT_KEY = "mountPoint";
const QString GS::UUID_KEY = "uuid";
-const QString GS::DESKTOPS_KEY = "desktops";
#endif // WITH_PYTHON
diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h
index 6d340585c..f3fd2b8d3 100644
--- a/src/libcalamares/GlobalStorage.h
+++ b/src/libcalamares/GlobalStorage.h
@@ -108,6 +108,16 @@ public:
static const QString IS_ONLINE_KEY;
static const QString INITSYSTEM_KEY;
static const QString DESKTOP_KEY;
+ static const QString DESKTOPS_KEY;
+ static const QString DE_ICON_KEY;
+ static const QString DE_NAME_KEY;
+ static const QString PACKAGE_GROUPS_KEY;
+ static const QString PACKAGES_KEY;
+ static const QString PACKAGES_CRITICAL_KEY;
+ static const QString PACKAGES_NONCRITICAL_KEY;
+ static const QString PACKAGE_PRE_KEY;
+ static const QString PACKAGE_KEY;
+ static const QString PACKAGE_POST_KEY;
static const QString LOCALE_KEY;
static const QString LANG_KEY;
static const QString ROOT_MOUNTPOINT_KEY;
@@ -116,7 +126,6 @@ public:
static const QString FS_KEY;
static const QString MOUNTPOINT_KEY;
static const QString UUID_KEY;
- static const QString DESKTOPS_KEY;
} ;
diff --git a/src/libcalamares/PacstrapCppJob.cpp b/src/libcalamares/PacstrapCppJob.cpp
index 4c4b9d998..cc5b62824 100644
--- a/src/libcalamares/PacstrapCppJob.cpp
+++ b/src/libcalamares/PacstrapCppJob.cpp
@@ -30,13 +30,13 @@
const QString PacstrapCppJob::BOOTLODER_PACKAGES_KEY = "bootloader" ;
const QString PacstrapCppJob::KERNEL_PACKAGES_KEY = "kernel" ;
const QString PacstrapCppJob::UTILITIES_PACKAGES_KEY = "utilities" ;
-const QString PacstrapCppJob::OPENRC_PACKAGES_KEY = "openrc" ;
-const QString PacstrapCppJob::SYSTEMD_PACKAGES_KEY = "systemd" ;
const QString PacstrapCppJob::APPLICATIONS_PACKAGES_KEY = "applications" ;
const QString PacstrapCppJob::MULTIMEDIA_PACKAGES_KEY = "multimedia" ;
const QString PacstrapCppJob::NETWORK_PACKAGES_KEY = "network" ;
const QString PacstrapCppJob::LOOKANDFEEL_PACKAGES_KEY = "look-and-feel" ;
const QString PacstrapCppJob::XSERVER_PACKAGES_KEY = "x-server" ;
+const QString PacstrapCppJob::OPENRC_PACKAGES_KEY = "openrc" ;
+const QString PacstrapCppJob::SYSTEMD_PACKAGES_KEY = "systemd" ;
const QString PacstrapCppJob::LXDE_PACKAGES_KEY = "lxde" ;
const QString PacstrapCppJob::MATE_PACKAGES_KEY = "mate" ;
@@ -63,6 +63,8 @@ const QSTRINGMAP PacstrapCppJob::LANGUAGE_PACKS = { {"eo" , "iceweasel
{"pt_BR.UTF-8" , "iceweasel-l10n-pt-br" } ,
{"pl_PL.UTF-8" , "icedove-l10n-pl" } ,
{"pl_PL.UTF-8" , "iceweasel-l10n-pl" } } ;
+const QString PacstrapCppJob::PREINST_ERROR_MSG = "Error running pre-install script:\n%1" ;
+const QString PacstrapCppJob::POSTINST_ERROR_MSG = "Error running post-install script:\n%1" ;
/* PacstrapCppJob private class constants */
@@ -153,11 +155,6 @@ QString PacstrapCppJob::prettyStatusMessage() const { return thi
Calamares::JobResult PacstrapCppJob::exec()
{
-// globalStorage->insert(GS::INITSYSTEM_KEY , OPENRC_PACKAGES_KEY) ; // TODO: per user option via globalStorage
-globalStorage->insert(GS::INITSYSTEM_KEY , SYSTEMD_PACKAGES_KEY) ; // TODO: per user option via globalStorage
-globalStorage->insert(GS::DESKTOP_KEY , LXDE_PACKAGES_KEY ) ; // TODO: per user option via globalStorage
-// globalStorage->insert(GS::DESKTOP_KEY , MATE_PACKAGES_KEY ) ; // TODO: per user option via globalStorage
-
// cleanup from possibly aborted previous runs
// Teardown() ;
@@ -166,7 +163,6 @@ globalStorage->insert(GS::DESKTOP_KEY , LXDE_PACKAGES_KEY ) ; // TODO: per
bool is_online = this->globalStorage->value(GS::IS_ONLINE_KEY ).toBool() ;
this->mountPoint = this->globalStorage->value(GS::ROOT_MOUNTPOINT_KEY).toString() ;
this->targetDevice = FindTargetDevice(partitions) ;
-is_online = false ; // TODO: per user option via globalStorage
this->confFile = (!has_isorepo) ? DEFAULT_CONF_FILENAME :
(is_online ) ? ONLINE_CONF_FILENAME : OFFLINE_CONF_FILENAME ;
this->packages = getPackageList() ;
diff --git a/src/libcalamares/PacstrapCppJob.h b/src/libcalamares/PacstrapCppJob.h
index 828a5aa6f..de98e46e7 100644
--- a/src/libcalamares/PacstrapCppJob.h
+++ b/src/libcalamares/PacstrapCppJob.h
@@ -47,7 +47,7 @@ public:
QString prettyStatusMessage() const override ;
Calamares::JobResult exec () override ;
- static const QString DESKTOP_PACKAGES_KEY ;
+// static const QString DESKTOP_PACKAGES_KEY ;
protected:
@@ -95,13 +95,13 @@ public:
static const QString BOOTLODER_PACKAGES_KEY ;
static const QString KERNEL_PACKAGES_KEY ;
static const QString UTILITIES_PACKAGES_KEY ;
- static const QString OPENRC_PACKAGES_KEY ;
- static const QString SYSTEMD_PACKAGES_KEY ;
static const QString APPLICATIONS_PACKAGES_KEY ;
static const QString MULTIMEDIA_PACKAGES_KEY ;
static const QString NETWORK_PACKAGES_KEY ;
static const QString LOOKANDFEEL_PACKAGES_KEY ;
static const QString XSERVER_PACKAGES_KEY ;
+ static const QString OPENRC_PACKAGES_KEY ;
+ static const QString SYSTEMD_PACKAGES_KEY ;
static const QString LXDE_PACKAGES_KEY ;
static const QString MATE_PACKAGES_KEY ;
@@ -116,6 +116,8 @@ protected:
static const qreal BASE_JOB_WEIGHT ;
static const qreal GUI_JOB_WEIGHT ;
static const QSTRINGMAP LANGUAGE_PACKS ;
+ static const QString PREINST_ERROR_MSG ;
+ static const QString POSTINST_ERROR_MSG ;
private:
diff --git a/src/libcalamaresui/ViewManager.cpp b/src/libcalamaresui/ViewManager.cpp
index a4b628d0c..bc956def2 100644
--- a/src/libcalamaresui/ViewManager.cpp
+++ b/src/libcalamaresui/ViewManager.cpp
@@ -236,6 +236,8 @@ ViewManager::currentStepIndex() const
void
ViewManager::next()
{
+cDebug() << "ViewManager::next()" ;
+
ViewStep* step = m_steps.at( m_currentStep );
bool executing = false;
if ( step->isAtEnd() )
diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp
index efb8edf0b..e63d23af2 100644
--- a/src/modules/netinstall/NetInstallPage.cpp
+++ b/src/modules/netinstall/NetInstallPage.cpp
@@ -20,8 +20,8 @@
*/
#include "NetInstallPage.h"
-
#include "PackageModel.h"
+#include "ViewManager.h"
#include "ui_page_netinst.h"
#include "GlobalStorage.h"
@@ -52,6 +52,7 @@ using CalamaresUtils::yamlToVariant;
const char* NetInstallPage::HEADER_TEXT = "<h1>Package Selection</h1>";
const char* NetInstallPage::WMDE_COMBO_LABEL_TEXT = "Select Graphical Environment";
+const char* NetInstallPage::NETINSTALL_CHECK_TEXT = "NetInstall";
NetInstallPage::NetInstallPage( QWidget* parent )
@@ -63,8 +64,15 @@ NetInstallPage::NetInstallPage( QWidget* parent )
ui->setupUi( this );
ui->header->setText( tr( HEADER_TEXT ) );
- ui->WmDeLabel->setText( tr( WMDE_COMBO_LABEL_TEXT ) );
- ui->WmDeComboBox->setToolTip( tr( WMDE_COMBO_LABEL_TEXT ) );
+ ui->wmDeLabel->setText( tr( WMDE_COMBO_LABEL_TEXT ) );
+ ui->wmDeCombobox->setToolTip( tr( WMDE_COMBO_LABEL_TEXT ) );
+ ui->wmDeCombobox->setEnabled( false ); // TODO:
+ ui->netinstallCheckbox->setText( tr( NETINSTALL_CHECK_TEXT ) );
+ ui->netinstallCheckbox->setChecked( false ); // deferred to dataIsHere();
+ ui->netinstallCheckbox->setEnabled( false ); // deferred to dataIsHere();
+
+connect(this, &NetInstallPage::skipThis,
+ Calamares::ViewManager::instance(), &Calamares::ViewManager::next); // TODO: remove this
}
bool
@@ -131,21 +139,22 @@ NetInstallPage::loadEnvironmentComboboxes(QVariantMap local_storage)
QVariantMap desktops_data = local_storage.value( GS::DESKTOPS_KEY ).toMap();
QVariantMap::iterator desktops_iter = desktops_data.begin();
- while (desktops_iter++ != desktops_data.end())
+ for ( ; desktops_iter != desktops_data.end(); ++desktops_iter )
{
-DBG << "NetInstallViewStep::loadEnvironmentComboboxes() desktops_iter.key()=" << desktops_iter.key();
+cLog() << "NetInstallPage::loadEnvironmentComboboxes() desktops_iter.key()=" << desktops_iter.key();
QVariantMap desktops_data = desktops_iter.value().toMap();
QVariant de_key = QVariant(desktops_iter.key());
QIcon de_icon = QIcon(desktops_data.value( GS::DE_ICON_KEY ).toString());
QString de_name = desktops_data.value( GS::DE_NAME_KEY ).toString();
- ui->WmDeComboBox->addItem(de_icon, de_name, de_key);
+ ui->wmDeCombobox->addItem(de_icon, de_name, de_key);
-DBG << "NetInstallPage::loadEnvironmentComboboxes() added de_icon=" <<
- desktops_data.value( GS::DE_ICON_KEY ).toString() <<
+cLog() << "NetInstallPage::loadEnvironmentComboboxes() added de_icon=" <<
+ desktops_data.value( GS::DE_ICON_KEY ).toString() <<
" de_key=" << de_key << " de_name" << de_name;
}
+ ui->wmDeCombobox->setCurrentIndex( 0 );
}
PackageModel::PackageItemDataList
@@ -160,6 +169,18 @@ NetInstallPage::selectedPackages() const
}
}
+QString
+NetInstallPage::getWmDeKey() const
+{
+ return ui->wmDeCombobox->itemData(ui->wmDeCombobox->currentIndex()).toString();
+}
+
+bool
+NetInstallPage::getShouldNetInstall() const
+{
+ return ui->netinstallCheckbox->isChecked();
+}
+
void
NetInstallPage::loadGroupList()
{
@@ -167,6 +188,8 @@ NetInstallPage::loadGroupList()
Calamares::JobQueue::instance()->globalStorage()->value(
"groupsUrl" ).toString() );
+cDebug() << "NetInstallPage::loadGroupList() confUrl=" << confUrl;
+
QNetworkRequest request;
request.setUrl( QUrl( confUrl ) );
// Follows all redirects except unsafe ones (https to http).
@@ -190,5 +213,14 @@ NetInstallPage::setRequired( bool b )
void
NetInstallPage::onActivate()
{
- ui->groupswidget->setFocus();
+ Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
+ bool has_isorepo = gs->value( GS::HAS_ISOREPO_KEY ).toBool();
+ bool is_online = gs->value( GS::IS_ONLINE_KEY ).toBool();
+
+ ui->netinstallCheckbox->setChecked( !has_isorepo );
+ ui->netinstallCheckbox->setEnabled( has_isorepo && is_online );
+// ui->groupswidget->setFocus();
+cDebug() << "NetInstallPage::onActivate()" ;
+// ui->groupswidget->setVisible( false ); // TODO:: remove this
+emit skipThis(); // TODO: remove this
}
diff --git a/src/modules/netinstall/NetInstallPage.h b/src/modules/netinstall/NetInstallPage.h
index c7b65e2ad..15e9095b3 100644
--- a/src/modules/netinstall/NetInstallPage.h
+++ b/src/modules/netinstall/NetInstallPage.h
@@ -69,12 +69,22 @@ public:
// this function does not have constant time.
PackageModel::PackageItemDataList selectedPackages() const;
+ // Returns the value of the WD/DE combobox.
+ // This will determine which pacman.conf to use in the PacstrapCppJob modules.
+ QString getWmDeKey() const;
+
+ // Returns the state of the "net install" checkbox.
+ // This will determine which pacman.conf to use in the PacstrapCppJob modules.
+ bool getShouldNetInstall() const;
+
public slots:
void dataIsHere( QNetworkReply* );
signals:
void checkReady( bool );
+void skipThis(); // TODO: remove this
+
private:
// Takes the YAML data representing the groups and reads them into the
// m_groups and m_groupOrder internal structures. See the README.md
@@ -91,6 +101,7 @@ private:
static const char* HEADER_TEXT;
static const char* WMDE_COMBO_LABEL_TEXT;
+ static const char* NETINSTALL_CHECK_TEXT;
};
#endif // NETINSTALLPAGE_H
diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp
index 3b37fcbe0..b7c9684bc 100644
--- a/src/modules/netinstall/NetInstallViewStep.cpp
+++ b/src/modules/netinstall/NetInstallViewStep.cpp
@@ -22,12 +22,20 @@
#include "JobQueue.h"
#include "GlobalStorage.h"
+#include "PacstrapCppJob.h"
#include "utils/Logger.h"
+#include <QFile>
+#include <QVariantList>
+
#include "NetInstallPage.h"
CALAMARES_PLUGIN_FACTORY_DEFINITION( NetInstallViewStepFactory, registerPlugin<NetInstallViewStep>(); )
+
+const QString NetInstallViewStep::PACKAGE_GROUPS_FILE = "file:///usr/share/calamares/netinstall.yaml";
+
+
NetInstallViewStep::NetInstallViewStep( QObject* parent )
: Calamares::ViewStep( parent )
, m_widget( new NetInstallPage() )
@@ -173,6 +181,14 @@ NetInstallViewStep::onLeave()
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
gs->insert( "packageOperations", QVariant( packageOperations ) );
}
+
+ Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
+// globalStorage->insert(GS::INITSYSTEM_KEY , OPENRC_PACKAGES_KEY) ; // TODO: per user option via globalStorage
+// globalStorage->insert(GS::DESKTOP_KEY , MATE_PACKAGES_KEY ) ; // TODO: per user option via globalStorage
+// globalStorage->insert(GS::DESKTOP_KEY , LXDE_PACKAGES_KEY) ; // TODO: per user option via globalStorage
+ gs->insert( GS::INITSYSTEM_KEY, PacstrapCppJob::SYSTEMD_PACKAGES_KEY) ; // TODO: per user option via globalStorage
+ gs->insert( GS::DESKTOP_KEY, m_widget->getWmDeKey() ) ; // TODO:
+ gs->insert( GS::IS_ONLINE_KEY, m_widget->getShouldNetInstall() );
}
@@ -187,45 +203,60 @@ NetInstallViewStep::setConfigurationMap( const QVariantMap& configurationMap )
if ( configurationMap.contains( "groupsUrl" ) &&
configurationMap.value( "groupsUrl" ).type() == QVariant::String )
{
+cDebug() << "NetInstallViewStep::setConfigurationMap() groupsUrl=" << configurationMap.value( "groupsUrl" ).toString();
+
+ // load package groups from netinstall.conf localStorage
+ if ( configurationMap.contains( GS::PACKAGE_GROUPS_KEY ) &&
+ configurationMap.value( GS::PACKAGE_GROUPS_KEY ).type() == QVariant::List &&
+ configurationMap.value( "groupsUrl" ).toString() == PACKAGE_GROUPS_FILE )
+ {
+ // convert local storage packages lists to YAML
+ QVariantList package_groups = configurationMap.value( GS::PACKAGE_GROUPS_KEY ).toList();
+ YAML::Emitter package_groups_yaml;
+ package_groups_yaml.SetOutputCharset(YAML::EscapeNonAscii);
+ package_groups_yaml << YAML::BeginSeq;
+ for ( int groups_n = 0; groups_n < package_groups.length(); ++groups_n )
+ {
+ QVariantMap package_group = package_groups.value(groups_n).toMap();
+ std::string group_name = package_group["name"].toString().toStdString();
+ std::string group_desc = package_group["description"].toString().toStdString();
+ std::string group_critical = package_group["critical"].toString().toStdString();
+ QStringList group_packages = package_group.value( "packages" ).toStringList();
+ std::vector< std::string > packages;
+ foreach ( const QString& package , group_packages )
+ packages.push_back( package.toStdString() );
+
+cDebug() << "NetInstallViewStep::setConfigurationMap() package_group[name]=" << QString::fromStdString(group_name);
+cDebug() << "NetInstallViewStep::setConfigurationMap() package_group[description]=" << QString::fromStdString(group_desc);
+cDebug() << "NetInstallViewStep::setConfigurationMap() package_group[critical]=" << QString::fromStdString(group_critical);
+cDebug() << "NetInstallViewStep::setConfigurationMap() package_group[packages]=" << group_packages;
+
+ package_groups_yaml << YAML::BeginMap;
+ package_groups_yaml << YAML::Key << "name" << YAML::Value << group_name;
+ package_groups_yaml << YAML::Key << "description" << YAML::Value << group_desc;
+ package_groups_yaml << YAML::Key << "critical" << YAML::Value << group_critical;
+ package_groups_yaml << YAML::Key << "packages" << YAML::Value << packages;
+ package_groups_yaml << YAML::EndMap;
+ }
+ package_groups_yaml << YAML::EndSeq;
+
+// DBG << "NetInstallViewStep::setConfigurationMap() err=" << QString(package_groups_yaml.GetLastError());
+
+ QFile package_groups_file( QString( PACKAGE_GROUPS_FILE ).remove(0, 7) );
+ if (package_groups_file.open( QIODevice::WriteOnly | QIODevice::Text ))
+ {
+ QTextStream out( &package_groups_file );
+ out << package_groups_yaml.c_str(); // TODO:
+ }
+ cDebug() << "wrote package groups from netinstall.conf to" << PACKAGE_GROUPS_FILE;
+ }
+ else cDebug() << "no package groups defined in netinstall.conf - trying 'groupsUrl'";
+
Calamares::JobQueue::instance()->globalStorage()->insert(
"groupsUrl", configurationMap.value( "groupsUrl" ).toString() );
m_widget->loadGroupList();
}
-/* TODO: include 'package-groups' in netinstall.conf localStorage
- // convert local storage packages lists to YAML
- QVariantList package_groups = configurationMap.value( GS::PACKAGE_GROUPS_KEY ).toList();
- YAML::Emitter package_groups_yaml;
- package_groups_yaml.SetOutputCharset(YAML::EscapeNonAscii);
- package_groups_yaml << YAML::BeginSeq;
- for ( int groups_n = 0; groups_n < package_groups.length(); ++groups_n )
- {
- QVariantMap package_group = package_groups.value(groups_n).toMap();
- std::string group_name = package_group["name"].toString().toStdString();
- std::string group_desc = package_group["description"].toString().toStdString();
- std::string group_critical = package_group["critical"].toString().toStdString();
- QStringList group_packages = package_group.value( "packages" ).toStringList();
- std::vector< std::string > packages;
- foreach ( const QString& package , group_packages )
- packages.push_back( package.toStdString() );
-DBG << "NetInstallViewStep::setConfigurationMap() package_group[name]=" << QString::fromStdString(group_name);
-DBG << "NetInstallViewStep::setConfigurationMap() package_group[description]=" << QString::fromStdString(group_desc);
-DBG << "NetInstallViewStep::setConfigurationMap() package_group[critical]=" << QString::fromStdString(group_critical);
-DBG << "NetInstallViewStep::setConfigurationMap() package_group[packages]=" << group_packages;
-
- package_groups_yaml << YAML::BeginMap;
- package_groups_yaml << YAML::Key << "name" << YAML::Value << group_name;
- package_groups_yaml << YAML::Key << "description" << YAML::Value << group_desc;
- package_groups_yaml << YAML::Key << "critical" << YAML::Value << group_critical;
- package_groups_yaml << YAML::Key << "packages";
- package_groups_yaml << YAML::Value << YAML::BeginSeq << packages << YAML::EndSeq;
- package_groups_yaml << YAML::EndMap;
- }
- package_groups_yaml << YAML::EndSeq;
-
-// DBG << "NetInstallViewStep::setConfigurationMap() err=" << QString(package_groups_yaml.GetLastError());
- m_widget->readGroups( QByteArray( package_groups_yaml.c_str() ) );
-*/
m_widget->loadEnvironmentComboboxes( configurationMap );
}
diff --git a/src/modules/netinstall/NetInstallViewStep.h b/src/modules/netinstall/NetInstallViewStep.h
index ee53f61ce..55bd8c343 100644
--- a/src/modules/netinstall/NetInstallViewStep.h
+++ b/src/modules/netinstall/NetInstallViewStep.h
@@ -64,6 +64,8 @@ public slots:
void nextIsReady( bool );
private:
+ static const QString PACKAGE_GROUPS_FILE;
+
NetInstallPage* m_widget;
bool m_nextEnabled;
QString m_prettyStatus;
diff --git a/src/modules/netinstall/netinstall.conf b/src/modules/netinstall/netinstall.conf
index 813372772..92efe35bb 100644
--- a/src/modules/netinstall/netinstall.conf
+++ b/src/modules/netinstall/netinstall.conf
@@ -1,7 +1,9 @@
---
# This is the URL that is retrieved to get the netinstall groups-and-packages
# data (which should be in the format described in netinstall.yaml).
-# groupsUrl: file:///usr/share/calamares/netinstall.yaml
+# groupsUrl: http://example.org/netinstall.php
+# or it can be a locally installed file (add netinstall.yaml to ./CMakeLists.txt)
+groupsUrl: file:///usr/share/calamares/netinstall.yaml
# If the installation can proceed without netinstall (e.g. the Live CD
# can create a working installed system, but netinstall is preferred
@@ -22,6 +24,8 @@ desktops:
de-name: Mate Desktop Environment
+# Package groups can be defined here rather than in a separate YAML file
+# if 'groupsUrl' is set exactly to NetInstallViewStep::PACKAGE_GROUPS_FILE.
package-groups:
- name: "Audio Production"
description: "Applications for Audio Production"
diff --git a/src/modules/netinstall/page_netinst.ui b/src/modules/netinstall/page_netinst.ui
index 63722977a..ec1c50d63 100644
--- a/src/modules/netinstall/page_netinst.ui
+++ b/src/modules/netinstall/page_netinst.ui
@@ -24,7 +24,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QLabel" name="WmDeLabel">
+ <widget class="QLabel" name="wmDeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -32,12 +32,12 @@
</sizepolicy>
</property>
<property name="text">
- <string></string>
+ <string>wmDeLabel</string>
</property>
</widget>
</item>
<item>
- <widget class="QComboBox" name="WmDeComboBox">
+ <widget class="QComboBox" name="wmDeCombobox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -45,7 +45,7 @@
</sizepolicy>
</property>
<property name="toolTip">
- <string></string>
+ <string/>
</property>
<property name="currentText">
<string/>
@@ -71,6 +71,13 @@
</property>
</spacer>
</item>
+ <item>
+ <widget class="QCheckBox" name="netinstallCheckbox">
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -96,7 +103,7 @@
<x>0</x>
<y>0</y>
<width>977</width>
- <height>366</height>
+ <height>379</height>
</rect>
</property>
<property name="font">
diff --git a/src/modules/welcome/checker/RequirementsChecker.cpp b/src/modules/welcome/checker/RequirementsChecker.cpp
index 653ba1ae7..80133d048 100644
--- a/src/modules/welcome/checker/RequirementsChecker.cpp
+++ b/src/modules/welcome/checker/RequirementsChecker.cpp
@@ -297,13 +297,13 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
}
Calamares::GlobalStorage* globalStorage = Calamares::JobQueue::instance()->globalStorage();
- bool has_isorepo = QDir("/isorepo").exists("isorepo.db.tar.gz");
+ bool has_isorepo = QDir( "/isorepo" ).exists( "isorepo.db.tar.gz" );
globalStorage->insert( GS::HAS_ISOREPO_KEY, has_isorepo );
if ( has_isorepo )
- m_entriesToRequire.removeAll("internet") ;
+ m_entriesToRequire.removeAll( "internet" ) ;
else
- m_entriesToRequire.append("internet") ;
- m_entriesToCheck.append("internet") ;
+ m_entriesToRequire.append( "internet" ) ;
+ m_entriesToCheck.append( "internet" ) ;
m_entriesToCheck.removeDuplicates() ;
m_entriesToRequire.removeDuplicates() ;
}