Merge branch 'master' of https://github.com/calamares/calamares into development

This commit is contained in:
Philip 2017-10-24 08:26:09 -04:00
commit ee9860dc35
8 changed files with 52 additions and 17 deletions

View File

@ -10,7 +10,7 @@ services:
notifications: notifications:
irc: irc:
- "$IRC_NOTIFY_CHANNEL" - "chat.freenode.net#calamares"
install: install:
- docker build -t calamares . - docker build -t calamares .

View File

@ -166,7 +166,7 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX
### Bump version here ### Bump version here
set( CALAMARES_VERSION_MAJOR 3 ) set( CALAMARES_VERSION_MAJOR 3 )
set( CALAMARES_VERSION_MINOR 1 ) set( CALAMARES_VERSION_MINOR 1 )
set( CALAMARES_VERSION_PATCH 5 ) set( CALAMARES_VERSION_PATCH 7 )
set( CALAMARES_VERSION_RC 0 ) set( CALAMARES_VERSION_RC 0 )
set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} ) set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} )

View File

@ -8,7 +8,7 @@
# Copyright 2014, Daniel Hillenbrand <codeworkx@bbqlinux.org> # Copyright 2014, Daniel Hillenbrand <codeworkx@bbqlinux.org>
# Copyright 2014, Benjamin Vaudour <benjamin.vaudour@yahoo.fr> # Copyright 2014, Benjamin Vaudour <benjamin.vaudour@yahoo.fr>
# Copyright 2014, Kevin Kofler <kevin.kofler@chello.at> # Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
# Copyright 2015, Philip Mueller <philm@manjaro.org> # Copyright 2015-2017, Philip Mueller <philm@manjaro.org>
# Copyright 2016-2017, Teo Mrnjavac <teo@kde.org> # Copyright 2016-2017, Teo Mrnjavac <teo@kde.org>
# Copyright 2017, Alf Gaida <agaida@siduction.org> # Copyright 2017, Alf Gaida <agaida@siduction.org>
# Copyright 2017, Adriaan de Groot <groot@kde.org> # Copyright 2017, Adriaan de Groot <groot@kde.org>

View File

@ -1,3 +1,5 @@
# NOTE: you must have ckbcomp installed and runnable
# on the live system, for keyboard layout previews.
--- ---
# The name of the file to write X11 keyboard settings to # The name of the file to write X11 keyboard settings to
# The default value is the name used by upstream systemd-localed. # The default value is the name used by upstream systemd-localed.

View File

@ -20,6 +20,7 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>. * along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "utils/Logger.h"
#include "keyboardpreview.h" #include "keyboardpreview.h"
KeyBoardPreview::KeyBoardPreview( QWidget* parent ) KeyBoardPreview::KeyBoardPreview( QWidget* parent )
@ -113,10 +114,16 @@ bool KeyBoardPreview::loadCodes() {
process.setEnvironment(QStringList() << "LANG=C" << "LC_MESSAGES=C"); process.setEnvironment(QStringList() << "LANG=C" << "LC_MESSAGES=C");
process.start("ckbcomp", param); process.start("ckbcomp", param);
if (!process.waitForStarted()) if (!process.waitForStarted())
{
cDebug() << "WARNING: ckbcomp not found , keyboard preview disabled";
return false; return false;
}
if (!process.waitForFinished()) if (!process.waitForFinished())
{
cDebug() << "WARNING: ckbcomp failed, keyboard preview disabled";
return false; return false;
}
// Clear codes // Clear codes
codes.clear(); codes.clear();

View File

@ -101,7 +101,7 @@ NetInstallPage::dataIsHere( QNetworkReply* reply )
if ( !readGroups( reply->readAll() ) ) if ( !readGroups( reply->readAll() ) )
{ {
cDebug() << "Netinstall groups data was received, but invalid."; cDebug() << "Netinstall groups data was received, but invalid.";
ui->netinst_status->setText( tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" ) ); ui->netinst_status->setText( tr( "Network Installation. (Disabled: Received invalid groups data)" ) );
reply->deleteLater(); reply->deleteLater();
return; return;
} }

View File

@ -126,18 +126,26 @@ NetInstallViewStep::onLeave()
cDebug() << "Leaving netinstall, adding packages to be installed" cDebug() << "Leaving netinstall, adding packages to be installed"
<< "to global storage"; << "to global storage";
QMap<QString, QVariant> packagesWithOperation;
QList<PackageTreeItem::ItemData> packages = m_widget->selectedPackages(); QList<PackageTreeItem::ItemData> packages = m_widget->selectedPackages();
QVariantList installPackages; QVariantList installPackages;
QVariantList tryInstallPackages; QVariantList tryInstallPackages;
cDebug() << "Processing"; QVariantList packageOperations;
cDebug() << "Processing" << packages.length() << "packages from netinstall.";
for ( auto package : packages ) for ( auto package : packages )
{ {
QMap<QString, QVariant> details; QVariant details( package.packageName );
details.insert( "pre-script", package.preScript ); // If it's a package with a pre- or post-script, replace
details.insert( "package", package.packageName ); // with the more complicated datastructure.
details.insert( "post-script", package.postScript ); if (!package.preScript.isEmpty() || !package.postScript.isEmpty())
{
QMap<QString, QVariant> sdetails;
sdetails.insert( "pre-script", package.preScript );
sdetails.insert( "package", package.packageName );
sdetails.insert( "post-script", package.postScript );
details = sdetails;
}
if ( package.isCritical ) if ( package.isCritical )
installPackages.append( details ); installPackages.append( details );
else else
@ -145,14 +153,24 @@ NetInstallViewStep::onLeave()
} }
if ( !installPackages.empty() ) if ( !installPackages.empty() )
packagesWithOperation.insert( "install", QVariant( installPackages ) ); {
QMap<QString, QVariant> op;
op.insert( "install", QVariant( installPackages ) );
packageOperations.append(op);
cDebug() << " .." << installPackages.length() << "critical packages.";
}
if ( !tryInstallPackages.empty() ) if ( !tryInstallPackages.empty() )
packagesWithOperation.insert( "try_install", QVariant( tryInstallPackages ) ); {
QMap<QString, QVariant> op;
op.insert( "try_install", QVariant( tryInstallPackages ) );
packageOperations.append(op);
cDebug() << " .." << tryInstallPackages.length() << "non-critical packages.";
}
if ( !packagesWithOperation.isEmpty() ) if ( !packageOperations.isEmpty() )
{ {
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
gs->insert( "packageOperations", QVariant( packagesWithOperation ) ); gs->insert( "packageOperations", QVariant( packageOperations ) );
} }
} }

View File

@ -344,10 +344,18 @@ def subst_locale(plist):
def run_operations(pkgman, entry): def run_operations(pkgman, entry):
""" """
Call package manager with given parameters. Call package manager with suitable parameters for the given
package actions.
:param pkgman: :param pkgman: PackageManager
:param entry: This is the manager that does the actual work.
:param entry: dict
Keys are the actions -- e.g. "install" -- to take, and the values
are the (list of) packages to apply the action to. The actions are
not iterated in a specific order, so it is recommended to use only
one action per dictionary. The list of packages may be package
names (strings) or package information dictionaries with pre-
and post-scripts.
""" """
global group_packages, completed_packages, mode_packages global group_packages, completed_packages, mode_packages