Merge branch 'master' of https://github.com/calamares/calamares into 3.2.x-stable

This commit is contained in:
Philip Müller 2019-01-11 21:51:54 +01:00
commit 07cd182fae
13 changed files with 120 additions and 45 deletions

11
CHANGES
View File

@ -8,7 +8,9 @@ website will have to do for older versions.
This release contains contributions from (alphabetically by first name):
- Alf Gaida
- aliveafter1000
- Arnaud Ferraris
- Caio Carvalho
- Collabora LTD
- Kevin Kofler
- Philip Mueller
- Scott Harvey
@ -32,10 +34,15 @@ This release contains contributions from (alphabetically by first name):
and Calamares no longer reserves 2GiB of space in calculations for internal
use (this means that it no longer mysteriously drops swap when the disk
size is close to the required installation size).
* The name of the type of default filesystem (e.g. ext4 or btrfs) is now handled
case- and localization-insensitively. This means that *btrfs* is now always
an acceptable spelling.
* The currently-selected disk device is remembered between manual partitioning
and the partitioning-overview pages. (Thanks to Arnaud)
* The *keyboard* module now handles the (bogus) Austrian keymap for
the system console properly.
the system console properly. (Thanks to Kevin)
* The *preservefiles* module now has a mechanism for setting the permissions
(and ownership) of preserved files.
(and ownership) of preserved files. (Thanks to Scott)
* New module *fsresizer* can be used to resize filesystems. It is intended
for use in OEM installs where an image of fixed size is created,
and then sized to the actual SD card the user has used.

View File

@ -366,7 +366,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira.</translation>
<message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="945"/>
<source>%1 will be shrunk to %2MB and a new %3MB partition will be created for %4.</source>
<translation type="unfinished"/>
<translation>%1 %2MB-ra txikituko da, eta %3MB-tako partizio berri bat sortuko da %4-(e)rako.</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="129"/>
@ -389,7 +389,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira.</translation>
<message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="928"/>
<source>&lt;strong&gt;Select a partition to shrink, then drag the bottom bar to resize&lt;/strong&gt;</source>
<translation type="unfinished"/>
<translation>&lt;strong&gt;Aukeratu partizioa txikitzeko eta gero arrastatu azpiko-barra tamaina aldatzeko&lt;/strong&gt;</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1043"/>
@ -427,7 +427,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira.</translation>
<message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1264"/>
<source>This storage device has %1 on it. What would you like to do?&lt;br/&gt;You will be able to review and confirm your choices before any change is made to the storage device.</source>
<translation type="unfinished"/>
<translation>Biltegiratze-gailuak %1 dauka. Zer egin nahiko zenuke? &lt;br/&gt;Zure aukerak berrikusteko eta berresteko aukera izango duzu aldaketak gauzatu aurretik biltegiratze-gailuan</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1241"/>
@ -435,7 +435,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira.</translation>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1292"/>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1316"/>
<source>&lt;strong&gt;Install alongside&lt;/strong&gt;&lt;br/&gt;The installer will shrink a partition to make room for %1.</source>
<translation type="unfinished"/>
<translation>&lt;strong&gt;Instalatu alboan&lt;/strong&gt;&lt;br/&gt;Instalatzaileak partizioa txikituko du lekua egiteko %1-(r)i.</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1245"/>
@ -443,7 +443,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira.</translation>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1300"/>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1324"/>
<source>&lt;strong&gt;Replace a partition&lt;/strong&gt;&lt;br/&gt;Replaces a partition with %1.</source>
<translation type="unfinished"/>
<translation>&lt;strong&gt;Ordeztu partizioa&lt;/strong&gt;&lt;br/&gt;ordezkatu partizioa %1-(e)kin.</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1287"/>

View File

@ -3,9 +3,6 @@
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# enolp <enolp@softastur.org>, 2017
#
#, fuzzy
msgid ""
msgstr ""
@ -13,7 +10,6 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-05 11:34-0400\n"
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
"Last-Translator: enolp <enolp@softastur.org>, 2017\n"
"Language-Team: Asturian (https://www.transifex.com/calamares/teams/20061/ast/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -86,15 +82,15 @@ msgstr ""
#: src/modules/dummypython/main.py:44
msgid "Dummy python job."
msgstr "Trabayu maniquín de python."
msgstr ""
#: src/modules/dummypython/main.py:97
msgid "Dummy python step {}"
msgstr "Pasu maniquín de python {}"
msgstr ""
#: src/modules/machineid/main.py:35
msgid "Generate machine-id."
msgstr "Xenerar machine-id."
msgstr ""
#: src/modules/packages/main.py:62
#, python-format

Binary file not shown.

View File

@ -4,7 +4,7 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Dirk Hein <bankman@mailbox.org>, 2017
# Adriaan de Groot <groot@kde.org>, 2017
# Christian Spaan, 2018
# Andreas Eitel, 2018
#
@ -115,11 +115,11 @@ msgstr "Pakete installieren "
msgid "Installing one package."
msgid_plural "Installing %(num)d packages."
msgstr[0] "Installiere ein Paket"
msgstr[1] "Installiere %(num)dPakete."
msgstr[1] "Installiere %(num)d Pakete."
#: src/modules/packages/main.py:70
#, python-format
msgid "Removing one package."
msgid_plural "Removing %(num)d packages."
msgstr[0] "Entferne ein Paket"
msgstr[1] "Entferne %(num)dPakete."
msgstr[1] "Entferne %(num)d Pakete."

View File

@ -4,7 +4,7 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# enolp <enolp@softastur.org>, 2017
# enolp <enolp@softastur.org>, 2019
#
#, fuzzy
msgid ""
@ -13,7 +13,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-05 11:34-0400\n"
"PO-Revision-Date: 2016-12-16 12:18+0000\n"
"Last-Translator: enolp <enolp@softastur.org>, 2017\n"
"Last-Translator: enolp <enolp@softastur.org>, 2019\n"
"Language-Team: Asturian (https://www.transifex.com/calamares/teams/20061/ast/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -23,7 +23,7 @@ msgstr ""
#: src/modules/dummypythonqt/main.py:84
msgid "Click me!"
msgstr "¡Prímime!"
msgstr "¡Fai clic en min!"
#: src/modules/dummypythonqt/main.py:94
msgid "A new QLabel."
@ -31,7 +31,7 @@ msgstr "Una QLabel nueva."
#: src/modules/dummypythonqt/main.py:97
msgid "Dummy PythonQt ViewStep"
msgstr ""
msgstr "ViewStep maniquín de PythonQT"
#: src/modules/dummypythonqt/main.py:183
msgid "The Dummy PythonQt Job"

View File

@ -2,6 +2,7 @@
*
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
* Copyright 2019, Collabora Ltd
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1523,3 +1524,16 @@ ChoicePage::updateSwapChoicesTr(QComboBox* box)
}
}
}
int
ChoicePage::lastSelectedDeviceIndex()
{
return m_lastSelectedDeviceIndex;
}
void
ChoicePage::setLastSelectedDeviceIndex( int index )
{
m_lastSelectedDeviceIndex = index;
m_drivesCombo->setCurrentIndex( m_lastSelectedDeviceIndex );
}

View File

@ -2,6 +2,7 @@
*
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org>
* Copyright 2019, Collabora Ltd
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -97,6 +98,9 @@ public:
*/
void applyActionChoice( ChoicePage::InstallChoice choice );
int lastSelectedDeviceIndex();
void setLastSelectedDeviceIndex( int index );
signals:
void nextStatusChanged( bool );
void actionChosen();

View File

@ -5,6 +5,7 @@
* Copyright 2018, Adriaan de Groot <groot@kde.org>
* Copyright 2018, Andrius Štikonas <andrius@stikonas.eu>
* Copyright 2018, Caio Jordão Carvalho <caiojcarvalho@gmail.com>
* Copyright 2019, Collabora Ltd
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -609,3 +610,15 @@ PartitionPage::getCurrentUsedMountpoints()
return mountPoints;
}
int
PartitionPage::selectedDeviceIndex()
{
return m_ui->deviceComboBox->currentIndex();
}
void
PartitionPage::selectDeviceByIndex ( int index )
{
m_ui->deviceComboBox->setCurrentIndex( index );
}

View File

@ -2,6 +2,7 @@
*
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org>
* Copyright 2019, Collabora Ltd
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -46,6 +47,9 @@ public:
void onRevertClicked();
int selectedDeviceIndex();
void selectDeviceByIndex( int index );
private:
QScopedPointer< Ui_PartitionPage > m_ui;
PartitionCoreModule* m_core;

View File

@ -3,6 +3,7 @@
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org>
* Copyright 2019, Collabora Ltd
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -286,6 +287,7 @@ PartitionViewStep::next()
if ( m_choicePage->currentChoice() == ChoicePage::Manual )
{
m_widget->setCurrentWidget( m_manualPartitionPage );
m_manualPartitionPage->selectDeviceByIndex( m_choicePage->lastSelectedDeviceIndex() );
if ( m_core->isDirty() )
m_manualPartitionPage->onRevertClicked();
}
@ -315,7 +317,10 @@ void
PartitionViewStep::back()
{
if ( m_widget->currentWidget() != m_choicePage )
{
m_widget->setCurrentWidget( m_choicePage );
m_choicePage->setLastSelectedDeviceIndex( m_manualPartitionPage->selectedDeviceIndex() );
}
}
@ -495,6 +500,61 @@ nameToChoice( QString name, bool& ok )
return SwapChoice::NoSwap;
}
/** @brief translate @p defaultFS into a recognized name
*
* Makes several attempts to translate the string into a
* name that KPMCore will recognize.
*/
static QString
findFS( QString defaultFS )
{
QStringList fsLanguage { QLatin1Literal( "C" ) }; // Required language list to turn off localization
if ( defaultFS.isEmpty() )
defaultFS = QStringLiteral( "ext4" );
if ( FileSystem::typeForName( defaultFS, fsLanguage ) != FileSystem::Unknown )
{
cDebug() << "Partition-module setting *defaultFileSystemType*" << defaultFS;
return defaultFS;
}
// First pass: try the default language instead of C locale
auto fsType = FileSystem::typeForName( defaultFS );
if ( fsType != FileSystem::Unknown )
{
defaultFS = FileSystem::nameForType( fsType, fsLanguage );
cWarning() << "Partition-module setting *defaultFileSystemType* changed" << defaultFS;
return defaultFS;
}
// Second pass: try case-insensitive, both unlocalized and localized
const auto fstypes = FileSystem::types();
for ( FileSystem::Type t : fstypes )
{
if ( ( 0 == QString::compare( defaultFS, FileSystem::nameForType( t, fsLanguage ), Qt::CaseInsensitive ) ) ||
( 0 == QString::compare( defaultFS, FileSystem::nameForType( t ), Qt::CaseInsensitive ) ) )
{
defaultFS = FileSystem::nameForType( fsType, fsLanguage );
cWarning() << "Partition-module setting *defaultFileSystemType* changed" << defaultFS;
return defaultFS;
}
}
cWarning() << "Partition-module setting *defaultFileSystemType* is bad (" << defaultFS << ") using ext4.";
defaultFS = QStringLiteral( "ext4" );
#ifdef DEBUG_FILESYSTEMS
// This bit is for distro's debugging their settings, and shows
// all the strings that KPMCore is matching against for FS type.
{
Logger::CLog d( Logger::LOGDEBUG );
using TR = Logger::DebugRow< int, QString >;
const auto fstypes = FileSystem::types();
d << "Available types (" << fstypes.count() << ')';
for ( FileSystem::Type t : fstypes )
d << TR( static_cast<int>( t ), FileSystem::nameForType( t, fsLanguage ) );
}
#endif
return defaultFS;
}
void
PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
@ -570,30 +630,7 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
gs->insert( "drawNestedPartitions", CalamaresUtils::getBool( configurationMap, "drawNestedPartitions", false ) );
gs->insert( "alwaysShowPartitionLabels", CalamaresUtils::getBool( configurationMap, "alwaysShowPartitionLabels", true ) );
gs->insert( "enableLuksAutomatedPartitioning", CalamaresUtils::getBool( configurationMap, "enableLuksAutomatedPartitioning", true ) );
QString defaultFS = CalamaresUtils::getString( configurationMap, "defaultFileSystemType" );
if ( defaultFS.isEmpty() )
defaultFS = QStringLiteral( "ext4" );
else
cDebug() << "Partition-module setting *defaultFileSystemType*" << defaultFS;
if ( FileSystem::typeForName( defaultFS ) == FileSystem::Unknown )
{
cWarning() << "Partition-module setting *defaultFileSystemType* is bad (" << defaultFS << ") using ext4.";
defaultFS = QStringLiteral( "ext4" );
#ifdef DEBUG_FILESYSTEMS
// This bit is for distro's debugging their settings, and shows
// all the strings that KPMCore is matching against for FS type.
{
Logger::CLog d( Logger::LOGDEBUG );
using TR = Logger::DebugRow< int, QString >;
const auto fstypes = FileSystem::types();
d << "Available types (" << fstypes.count() << ')';
for ( FileSystem::Type t : fstypes )
d << TR( static_cast<int>( t ), FileSystem::nameForType( t ) );
}
#endif
}
gs->insert( "defaultFileSystemType", defaultFS );
gs->insert( "defaultFileSystemType", findFS( CalamaresUtils::getString( configurationMap, "defaultFileSystemType" ) ) );
// Now that we have the config, we load the PartitionCoreModule in the background