Compare commits

..

73 Commits

Author SHA1 Message Date
Adriaan de Groot
1184229c4a Changes: pre-release housekeeping 2021-03-30 11:29:38 +02:00
Adriaan de Groot
9d4c2bf1c7 [displaymanager] Fix mismatch in spelling of "autologinUser"
In 4ffa79d4cf, the spelling
was changed to consistently be "autoLoginUser" in the *users*
module, but that changed the Global Storage key as well,
and the *displaymanager* module wasn't changed to follow.
2021-03-30 11:27:51 +02:00
Erik Dubois
d19c3b5458 Update main.py
Typo
2021-03-30 11:27:51 +02:00
Erik Dubois
f8494f27d5 displaymanager from arcolinux 2021-03-30 11:27:51 +02:00
Adriaan de Groot
ba89f03d8e Changes: post-release housekeeping
- mention the *packages* service in CHANGES for the previous release
2021-03-19 14:37:38 +01:00
Calamares CI
4243d5f41a i18n: [python] Automatic merge of Transifex translations 2021-03-19 14:23:08 +01:00
Calamares CI
64f9a2df26 i18n: [calamares] Automatic merge of Transifex translations 2021-03-19 14:23:07 +01:00
Adriaan de Groot
779e5ecf8f [libcalamaresui] Factor out the pastebin UI
- offer a convenience method for showing a popup and
  URL information and copying the URL to the clipboard
- use that from ViewManager (on failure) and DebugWindow (on demand)
2021-03-19 14:17:34 +01:00
Adriaan de Groot
981e96ea7f [calamares] Redo debug window tools
- make the tools tab buttons along the bottom row
- show the global storage tab by default

This costs little screen real-estate, makes the tools much more
visible and useful.
2021-03-19 13:51:30 +01:00
Adriaan de Groot
c54e417ff3 [calamares] Add a 'send log' button to the debug window
FIXES #1660
2021-03-19 13:38:06 +01:00
Adriaan de Groot
668921543a [libcalamaresui] Convenience method to check if paste would do anything 2021-03-19 13:36:40 +01:00
Adriaan de Groot
63e61e9924 Changes: pre-release housekeeping 2021-03-19 13:25:45 +01:00
Adriaan de Groot
5ed1dff655 Merge branch 'issue-1579' into calamares
FIXES #1579
2021-03-19 13:13:27 +01:00
Adriaan de Groot
3588f06767 [netinstall] Document groupsUrl with multiple entries 2021-03-19 12:49:37 +01:00
Adriaan de Groot
fdfe52efe2 [netinstall] Improve loader queue API a bit
- use load() to start loading
- the FetchNextUnless class is useful in more spots in
  the loading process
- set status explicitly on success (otherwise, a failure in a
  previous URL would leave a failure message lying around even
  when the module shows something useful)
2021-03-19 12:30:09 +01:00
Adriaan de Groot
03d086a233 [netinstall] Missing initialisations, split out slot
- m_queue was not initialized to nullptr, crashes
- split queue-is-done to a separate slot rather than a lambda
- prefer queueing calls to fetchNext(), for responsiveness
2021-03-19 11:46:46 +01:00
Adriaan de Groot
404a9ef98a [netinstall] Split off requesting netinstall data into a queue-manager
This is the actual "meat" of the branch, which makes the
netinstall module request one URL at a time until one succeeds.
2021-03-17 00:09:15 +01:00
Adriaan de Groot
186d32ebee [partition] More missing ; 2021-03-16 16:11:02 +01:00
Adriaan de Groot
2b4bc7adf4 [partition] Apply newer formatting tool 2021-03-16 16:08:13 +01:00
Adriaan de Groot
3b9c0bdf91 CI: don't allow clang-format 7 any more 2021-03-16 16:06:46 +01:00
Adriaan de Groot
bb426ebac4 [partition] Add missing ; (and apply coding style) 2021-03-16 16:01:25 +01:00
Adriaan de Groot
9341a84820 [libcalamares] Make the RETRANSLATE macros more statement-line
Require a ; after RETRANSLATE macros. They are statement-like;
this makes it easier for some of them to be recognized by
clang-format and resolves some existing weird formatting.
2021-03-16 14:55:26 +01:00
Adriaan de Groot
603a7106b3 [netinstall] Move package-listing wrangling to the Config object
Now all the business logic is in Config, the door is open to
building a QML-ified netinstall module. I'm not sure that
would be worth it: packagechooser offers more space for a
nice UI and should be QML'ed first.
2021-03-16 14:51:01 +01:00
Adriaan de Groot
9acd2fe458 [netinstall] Use the packages service 2021-03-16 14:38:52 +01:00
Adriaan de Groot
f1446736f8 [libcalamares] Expand tests a little
- do some additions and check they work
- drop the ";add" annotation on the source, this is not
  needed in the current situation with only adds available.
2021-03-16 14:37:13 +01:00
Adriaan de Groot
5b609565e2 [libcalamares] Make Packages API more flexible
- pass in the GS object; this makes mostly **testing** much easier
2021-03-16 14:14:02 +01:00
Adriaan de Groot
b868894371 [libcalamares] Start a packages service for netinstall and others 2021-03-16 13:50:15 +01:00
Adriaan de Groot
6662cb5f2d [netinstall] Swap parameters to makeSourceItem and document it 2021-03-16 13:17:33 +01:00
Adriaan de Groot
79b4f918fc [netinstall] Apply coding style 2021-03-16 13:10:35 +01:00
Adriaan de Groot
8e8525a941 [netinstall] Simplify slots in the UI page 2021-03-16 13:10:09 +01:00
Adriaan de Groot
a90f510b85 [libcalamares] Convenience for logging subentries
For methods that log a bunch of things, and which want to
consistently use SubEntry, but don't know when the **first**
log entry is within the method, Logger::Once can be used
to log one regular message (with function info) and the
rest are subentries.
2021-03-15 22:45:29 +01:00
Adriaan de Groot
72f67286a4 [libcalamares] Preserve type CDebug() if possible. 2021-03-15 21:41:27 +01:00
Adriaan de Groot
8fe2e1f68a [finished] Make the debug-log less cryptic 2021-03-15 21:22:20 +01:00
Adriaan de Groot
a3a1350dc7 [libcalamares] Don't complain if there isn't a preset
- If the module knows about a preset, then it should be registered
  even if there is not a value set for it specifically; this avoids
  complaints from isEditable() for fields that are known, but
  do not have a preset. (Reported by Anke)
2021-03-15 21:18:10 +01:00
Adriaan de Groot
a4c1f07521 [libcalamares] Reduce indentation-depth in apply() through early-return 2021-03-15 21:11:01 +01:00
Adriaan de Groot
33fec86ef6 [welcome] Improve logging of requirements-checking
- less chatty when 0-results come in
- compress the welcome debug to one output chunk
2021-03-15 20:53:59 +01:00
Adriaan de Groot
f8afb15c4c [libcalamaresui] Improve logging for QML modules
- mention which instance produces warnings
- tag additional debugging from the same method with Logger::SubEntry
2021-03-15 20:47:27 +01:00
Adriaan de Groot
6556f96442 Merge branch 'calamares' into issue-1579
Bring the branch up-to-date with the past few releases,
so it can be merged more easily once complete.
2021-03-15 13:10:21 +01:00
Adriaan de Groot
416c2c9689 [usersq] Reflect editable in the QML
- if presets prevent a field from being editable, don't allow
  the user to edit the field
- while here, mention the changes in usersq
2021-03-15 12:51:42 +01:00
Adriaan de Groot
44ac33845d Merge branch 'fix-usersq' into calamares 2021-03-15 12:41:01 +01:00
Adriaan de Groot
46f7e6c131 Merge branch 'hotfix-38' into calamares 2021-03-15 12:39:41 +01:00
Adriaan de Groot
8348bd2bb7 [usersq] Call setters for checkboxes 2021-03-15 12:36:54 +01:00
Adriaan de Groot
b17e01edff [usersq] Call setters to move values back from QML to the C++ side 2021-03-15 11:45:57 +01:00
Adriaan de Groot
b96ad4b166 [usersq] Hook up QML fields and the Config object
For properties, we can bind directly to the Config properties
for loginName, fullName, and also to checkbox-style (bool)
properties and passwords.
2021-03-15 00:24:10 +01:00
Adriaan de Groot
e60f8bcd06 [usersq] Tidy job creation and unnecessary code 2021-03-15 00:24:10 +01:00
Adriaan de Groot
4ffa79d4cf [users] In code, consistently [aA]utoLogin as name
There was a mix of autologin and autoLogin, leading to confusion
in the code. QML is sensitive to this, so go to one consistent name.
(Although the names of the settings in the `.conf` file are
different again)
2021-03-15 00:24:10 +01:00
Adriaan de Groot
287047fe1a [users] Tidy up job creation -- leave it to Config 2021-03-14 23:52:12 +01:00
Adriaan de Groot
e9908c84c2 Changes: document mount/fstab changes 2021-03-14 23:46:11 +01:00
Adriaan de Groot
98d42719e1 Merge pull request #1622 from Chrysostomus/btrfs-subvol
[fstab][mount] Create and mount btrfs subvolumes in generalized manner
2021-03-14 23:38:30 +01:00
Adriaan de Groot
413e160368 Changes: post-release housekeeping 2021-03-14 23:36:31 +01:00
Adriaan de Groot
04f4441182 [netinstall] Build up a list of urls, rather than just one
- the list is unused, and doesn't drive the loading of groups either;
  the existing one-string entry is used.
2021-02-09 15:06:53 +01:00
Adriaan de Groot
ca1ae6fd1d [netinstall] Support retranslation in the Config object 2021-02-09 11:06:59 +01:00
Adriaan de Groot
335ccbc149 [netinstall] Move other translation parts to Config 2021-02-09 10:58:11 +01:00
Adriaan de Groot
cf7391696e [netinstall] Continue moving settings to the Config object 2021-02-08 22:57:38 +01:00
Adriaan de Groot
dd8b893ee8 Changes: mention what this branch is for 2021-02-08 15:36:27 +01:00
Chrysostomus
16eff98a06 Don't use f-strings yet. 2021-02-07 15:39:38 +02:00
Chrysostomus
0c92a36a53 Remove unnecessary comment 2021-02-07 15:29:30 +02:00
Chrysostomus
6d55005da0 Mount subvolumes to correct mountpoints 2021-02-07 00:16:26 +02:00
Chrysostomus
b16bd6bb23 Fix name error 2021-02-06 20:03:30 +02:00
Chrysostomus
67aedd5582 Move comments closer to where they are used 2021-02-06 19:54:29 +02:00
Chrysostomus
16bf7925a2 Adjust comments 2021-02-06 19:48:09 +02:00
Chrysostomus
1896a38ccc Fix a typo 2021-02-06 01:38:03 +02:00
Chrysostomus
1e0295dc65 Fix name error 2021-02-03 22:55:11 +02:00
Chrysostomus
fcf6e2fb25 fix typos 2021-02-02 23:07:35 +02:00
Chrysostomus
8c0c84f162 Create all fstab entries one way instead of having special handling 2021-01-27 15:41:01 +02:00
Chrysostomus
14fbbd92dc Get configured subvolumes from the global storage 2021-01-26 22:56:31 +02:00
Chrysostomus
092374d08c Add modified list to global storage 2021-01-26 22:48:02 +02:00
Chrysostomus
f53f43ad03 Remove some unnecessary bits 2021-01-26 22:42:35 +02:00
Chrysostomus
4b6718b354 Further generalize subvolume handling 2021-01-26 22:35:42 +02:00
Chrysostomus
942221c764 Generalize subvolume handling 2021-01-26 22:24:50 +02:00
Chrysostomus
945effb048 Amend subvolumes to include path 2021-01-26 22:13:29 +02:00
Chrysostomus
b5cfa5109e Add schema definition 2021-01-26 21:34:11 +02:00
Chrysostomus
4ab30569c2 Add default configuration 2021-01-26 21:31:33 +02:00
76 changed files with 1250 additions and 680 deletions

46
CHANGES
View File

@@ -7,6 +7,52 @@ contributors are listed. Note that Calamares does not have a historical
changelog -- this log starts with version 3.2.0. The release notes on the
website will have to do for older versions.
# 3.2.40 (unreleased) #
This release contains contributions from (alphabetically by first name):
- No external contributors yet
## Core ##
- No core changes yet
## Modules ##
- No module changes yet
# 3.2.39.1 (2021-03-30) #
This hotfix release corrects a regression in the *displaymanager*
module caused by changes in the *users* module; autologin was
internally renamed and no longer recognized by the *displaymanager*
module. (Reported by Erik Dubois, #1665)
# 3.2.39 (2021-03-19) #
This release contains contributions from (alphabetically by first name):
- Matti Hyttinen
## Core ##
- A *packages* service has been added to the core, for use by
*netinstall* module and any others that need to set up
package information for the *packages* module.
## Modules ##
- The *mount* module has gained a configurable setup for btrfs volumes.
If your distro has a default-to-btrfs setup, it can skip the hard-
coded setup (which Calamares has had for a long time with @home
and similar) and introduce a custom btrfs configuration through the
`mount.conf` file. See issues #1659 and #1661 for warnings about
using this in production.
- *netinstall* now supports fallbacks for the groups data.
Instead of a single URL, multiple URLs may be specified in
a list and Calamares goes through them until one is successfully
retrieved. Older configurations with a single string are
treated like a one-item list. #1579
- The *usersq* module now connects to the internal configuration
object and may be usable for regular installations.
# 3.2.38.1 (2021-03-15) #
This hotfix release is for this item in the release notes of 3.2.38:

View File

@@ -41,7 +41,7 @@
# TODO:3.3: Require CMake 3.12
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
project( CALAMARES
VERSION 3.2.38.1
VERSION 3.2.39.1
LANGUAGES C CXX
)

View File

@@ -36,7 +36,12 @@ test -x "$AS" || { echo "! $AS is not executable."; exit 1 ; }
test -x "$CF" || { echo "! $CF is not executable."; exit 1 ; }
unmangle_clang_format=""
if expr `"$CF" --version | tr -dc '[^.0-9]' | cut -d . -f 1` '<' 10 > /dev/null ; then
format_version=`"$CF" --version | tr -dc '[^.0-9]' | cut -d . -f 1`
if expr "$format_version" '<' 8 > /dev/null ; then
echo "! Clang-format version 8+ required"
exit 1
fi
if expr "$format_version" '<' 10 > /dev/null ; then
:
else
unmangle_clang_format=$( dirname $0 )/../.clang-format

View File

@@ -6,7 +6,7 @@
<message>
<location filename="../src/modules/partition/jobs/AutoMountManagementJob.cpp" line="22"/>
<source>Manage auto-mount settings</source>
<translation type="unfinished"/>
<translation>Gestió dels paràmetres dels muntatges automàtics</translation>
</message>
</context>
<context>
@@ -318,7 +318,11 @@
%1
Link copied to clipboard</source>
<translation type="unfinished"/>
<translation>El registre d'instal·lació s'ha penjat a
%1
L'enllaç s'ha copiat al porta-retalls.</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="224"/>
@@ -854,12 +858,12 @@ L'instal·lador es tancarà i tots els canvis es perdran.</translation>
<message>
<location filename="../src/modules/finished/Config.cpp" line="145"/>
<source>The setup of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>La configuració de %1 no s'ha completat correctament.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="146"/>
<source>The installation of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>La instal·lació de %1 no s'ha completat correctament.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="150"/>
@@ -973,12 +977,12 @@ L'instal·lador es tancarà i tots els canvis es perdran.</translation>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="117"/>
<source>Create new %1MiB partition on %3 (%2) with entries %4.</source>
<translation type="unfinished"/>
<translation>Crea una partició nova de %1 MiB a %3 (%2) amb entrades %4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="125"/>
<source>Create new %1MiB partition on %3 (%2).</source>
<translation type="unfinished"/>
<translation>Crea una partició nova de %1 MiB a %3 (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="132"/>
@@ -988,12 +992,12 @@ L'instal·lador es tancarà i tots els canvis es perdran.</translation>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="149"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2) with entries &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Crea una partició nova de &lt;strong&gt;%1 MiB&lt;/strong&gt; a &lt;strong&gt;%3&lt;/strong&gt; (%2) amb entrades &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="157"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2).</source>
<translation type="unfinished"/>
<translation>Crea una partició nova de &lt;strong&gt;%1 MiB&lt;/strong&gt; a &lt;strong&gt;%3&lt;/strong&gt; (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="164"/>
@@ -1341,7 +1345,7 @@ L'instal·lador es tancarà i tots els canvis es perdran.</translation>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="195"/>
<source>Install %1 on &lt;strong&gt;new&lt;/strong&gt; %2 system partition with features &lt;em&gt;%3&lt;/em&gt;</source>
<translation type="unfinished"/>
<translation>Instal·la %1 a la partició de sistema &lt;strong&gt;nova&lt;/strong&gt; %2 amb funcions &lt;em&gt;%3&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="203"/>
@@ -1351,27 +1355,27 @@ L'instal·lador es tancarà i tots els canvis es perdran.</translation>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="212"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt; and features &lt;em&gt;%3&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Estableix la partició &lt;strong&gt;nova&lt;/strong&gt; %2 amb el punt de muntatge &lt;strong&gt;%1&lt;/strong&gt; i funcions &lt;em&gt;%3&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="220"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt;%3.</source>
<translation type="unfinished"/>
<translation>Estableix la partició &lt;strong&gt;nova&lt;/strong&gt; %2 amb el punt de muntatge &lt;strong&gt;%1&lt;/strong&gt; %3.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="234"/>
<source>Install %2 on %3 system partition &lt;strong&gt;%1&lt;/strong&gt; with features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Instal·la %2 a la partició de sistema %3 &lt;strong&gt;%1&lt;/strong&gt; amb funcions &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="253"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt; and features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Estableix la partició %3 &lt;strong&gt;%1&lt;/strong&gt; amb el punt de muntatge &lt;strong&gt;%2&lt;/strong&gt; i funcions &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="262"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt;%4.</source>
<translation type="unfinished"/>
<translation>Estableix la partició %3 &lt;strong&gt;%1&lt;/strong&gt; amb el punt de muntatge &lt;strong&gt;%2&lt;/strong&gt; %4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="243"/>
@@ -3961,29 +3965,31 @@ La configuració pot continuar, però algunes característiques podrien estar in
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="36"/>
<source>Installation Completed</source>
<translation type="unfinished"/>
<translation>Instal·lació acabada</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="43"/>
<source>%1 has been installed on your computer.&lt;br/&gt;
You may now restart into your new system, or continue using the Live environment.</source>
<translation type="unfinished"/>
<translation>%1 s'ha instal·lat a l'ordinador. &lt;br/&gt;
Ara podeu reiniciar-lo per tal d'accedir al sistema operatiu nou o bé continuar usant l'entorn autònom.</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="65"/>
<source>Close Installer</source>
<translation type="unfinished"/>
<translation>Tanca l'instal·lador</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="71"/>
<source>Restart System</source>
<translation type="unfinished"/>
<translation>Reinicia el sistema</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="89"/>
<source>&lt;p&gt;A full log of the install is available as installation.log in the home directory of the Live user.&lt;br/&gt;
This log is copied to /var/log/installation.log of the target system.&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Hi ha disponible un registre complet de la instal·lació com a installation.log al directori de lusuari autònom.&lt;br/&gt;
Aquest registre es copia a /var/log/installation.log del sistema de destinació.&lt;/p&gt;</translation>
</message>
</context>
<context>

View File

@@ -304,12 +304,12 @@
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="212"/>
<source>Install Log Paste URL</source>
<translation type="unfinished"/>
<translation>Retadreso de la alglua servilo</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="197"/>
<source>The upload was unsuccessful. No web-paste was done.</source>
<translation type="unfinished"/>
<translation>Alŝuto malsukcesinta. Neniu transpoŝigis al la reto.</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="208"/>
@@ -318,7 +318,11 @@
%1
Link copied to clipboard</source>
<translation type="unfinished"/>
<translation>La protokolo de instalado estis enpoŝtita al:
%1
La retadreso estis copiita al vian tondujon.</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="224"/>

View File

@@ -6,7 +6,7 @@
<message>
<location filename="../src/modules/partition/jobs/AutoMountManagementJob.cpp" line="22"/>
<source>Manage auto-mount settings</source>
<translation type="unfinished"/>
<translation>Hallitse 'auto-mount' asetuksia</translation>
</message>
</context>
<context>
@@ -318,7 +318,11 @@
%1
Link copied to clipboard</source>
<translation type="unfinished"/>
<translation>Asennuksen loki on lähetetty
%1
Linkki kopioitu leikepöydälle</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="224"/>
@@ -855,12 +859,12 @@ Asennus voi jatkua, mutta jotkin toiminnot saattavat olla pois käytöstä.</tra
<message>
<location filename="../src/modules/finished/Config.cpp" line="145"/>
<source>The setup of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>Määrityksen %1 asennus ei onnistunut.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="146"/>
<source>The installation of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>Asennus %1 ei onnistunut.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="150"/>
@@ -974,12 +978,12 @@ Asennus voi jatkua, mutta jotkin toiminnot saattavat olla pois käytöstä.</tra
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="117"/>
<source>Create new %1MiB partition on %3 (%2) with entries %4.</source>
<translation type="unfinished"/>
<translation>Luo uusi %1MiB osio kohteeseen %3 (%2), jossa on %4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="125"/>
<source>Create new %1MiB partition on %3 (%2).</source>
<translation type="unfinished"/>
<translation>Luo uusi %1MiB osio kohteeseen %3 (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="132"/>
@@ -989,12 +993,12 @@ Asennus voi jatkua, mutta jotkin toiminnot saattavat olla pois käytöstä.</tra
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="149"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2) with entries &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Luo uusi &lt;strong&gt;%1MiB&lt;/strong&gt; osio kohteeseen &lt;strong&gt;%3&lt;/strong&gt; (%2) jossa on &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="157"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2).</source>
<translation type="unfinished"/>
<translation>Luo uusi &lt;strong&gt;%1MiB&lt;/strong&gt; osio kohteeseen &lt;strong&gt;%3&lt;/strong&gt; (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="164"/>
@@ -1342,7 +1346,7 @@ Asennus voi jatkua, mutta jotkin toiminnot saattavat olla pois käytöstä.</tra
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="195"/>
<source>Install %1 on &lt;strong&gt;new&lt;/strong&gt; %2 system partition with features &lt;em&gt;%3&lt;/em&gt;</source>
<translation type="unfinished"/>
<translation>Asenna %1 &lt;strong&gt;uusi&lt;/strong&gt; %2 järjestelmäosio ominaisuuksilla &lt;em&gt;%3&lt;/em&gt;</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="203"/>
@@ -1352,27 +1356,27 @@ Asennus voi jatkua, mutta jotkin toiminnot saattavat olla pois käytöstä.</tra
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="212"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt; and features &lt;em&gt;%3&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Määritä &lt;strong&gt;uusi&lt;/strong&gt; %2 osio liitospisteellä &lt;strong&gt;%1&lt;/strong&gt; ja ominaisuuksilla &lt;em&gt;%3&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="220"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt;%3.</source>
<translation type="unfinished"/>
<translation>Määritä &lt;strong&gt;uusi&lt;/strong&gt; %2 osio liitospisteellä &lt;strong&gt;%1&lt;/strong&gt;%3.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="234"/>
<source>Install %2 on %3 system partition &lt;strong&gt;%1&lt;/strong&gt; with features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Asenna %2 - %3 järjestelmäosio &lt;strong&gt;%1&lt;/strong&gt; ominaisuuksilla &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="253"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt; and features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Määritä %3 osio &lt;strong&gt;%1&lt;/strong&gt; liitospisteellä &lt;strong&gt;%2&lt;/strong&gt; ja ominaisuuksilla &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="262"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt;%4.</source>
<translation type="unfinished"/>
<translation>Määritä %3 osio &lt;strong&gt;%1&lt;/strong&gt; liitospisteellä &lt;strong&gt;%2&lt;/strong&gt;%4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="243"/>
@@ -3963,29 +3967,31 @@ Asennus voi jatkua, mutta jotkin toiminnot saattavat olla pois käytöstä.</tra
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="36"/>
<source>Installation Completed</source>
<translation type="unfinished"/>
<translation>Asennus suoritettu</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="43"/>
<source>%1 has been installed on your computer.&lt;br/&gt;
You may now restart into your new system, or continue using the Live environment.</source>
<translation type="unfinished"/>
<translation>%1 on asennettu tietokoneellesi.&lt;br/&gt;
Voit käynnistää nyt uuden järjestelmän tai jatkaa Live-ympäristön käyttöä. </translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="65"/>
<source>Close Installer</source>
<translation type="unfinished"/>
<translation>Sulje asennusohjelma</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="71"/>
<source>Restart System</source>
<translation type="unfinished"/>
<translation>Käynnistä järjestelmä</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="89"/>
<source>&lt;p&gt;A full log of the install is available as installation.log in the home directory of the Live user.&lt;br/&gt;
This log is copied to /var/log/installation.log of the target system.&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Täydellinen loki asennuksesta on saatavana nimellä install.log Live-käyttäjän kotihakemistossa.&lt;br/&gt;
Tämä loki on kopioitu /var/log/installation.log tiedostoon.&lt;/p&gt;</translation>
</message>
</context>
<context>

View File

@@ -6,7 +6,7 @@
<message>
<location filename="../src/modules/partition/jobs/AutoMountManagementJob.cpp" line="22"/>
<source>Manage auto-mount settings</source>
<translation type="unfinished"/>
<translation>Tvarkyti automatinio prijungimo nustatymus</translation>
</message>
</context>
<context>
@@ -322,7 +322,11 @@
%1
Link copied to clipboard</source>
<translation type="unfinished"/>
<translation>Diegimo žurnalas paskelbtas į
%1
Nuoroda nukopijuota į iškarpinę</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="224"/>
@@ -858,12 +862,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti.</translation>
<message>
<location filename="../src/modules/finished/Config.cpp" line="145"/>
<source>The setup of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>%1 sąranka nebuvo užbaigta sėkmingai.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="146"/>
<source>The installation of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>%1 nebuvo užbaigtas sėkmingai.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="150"/>
@@ -977,12 +981,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti.</translation>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="117"/>
<source>Create new %1MiB partition on %3 (%2) with entries %4.</source>
<translation type="unfinished"/>
<translation>Sukurti naują %1MiB skaidinį ties %3 (%2) su įrašais %4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="125"/>
<source>Create new %1MiB partition on %3 (%2).</source>
<translation type="unfinished"/>
<translation>Sukurti naują %1MiB skaidinį ties %3 (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="132"/>
@@ -992,12 +996,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti.</translation>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="149"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2) with entries &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Sukurti naują &lt;strong&gt;%1MiB&lt;/strong&gt; skaidinį ties &lt;strong&gt;%3&lt;/strong&gt; (%2) su įrašais &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="157"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2).</source>
<translation type="unfinished"/>
<translation>Sukurti naują &lt;strong&gt;%1MiB&lt;/strong&gt; skaidinį ties &lt;strong&gt;%3&lt;/strong&gt; (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="164"/>
@@ -1345,7 +1349,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti.</translation>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="195"/>
<source>Install %1 on &lt;strong&gt;new&lt;/strong&gt; %2 system partition with features &lt;em&gt;%3&lt;/em&gt;</source>
<translation type="unfinished"/>
<translation>Įdiegti %1 &lt;strong&gt;naujame&lt;/strong&gt; %2 sistemos skaidinyje su ypatybėmis &lt;em&gt;%3&lt;/em&gt;</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="203"/>
@@ -1355,27 +1359,27 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti.</translation>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="212"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt; and features &lt;em&gt;%3&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Nustatyti &lt;strong&gt;naują&lt;/strong&gt; %2 skaidinį su prijungimo tašku &lt;strong&gt;%1&lt;/strong&gt; ir ypatybėmis &lt;em&gt;%3&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="220"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt;%3.</source>
<translation type="unfinished"/>
<translation>Nustatyti &lt;strong&gt;naują&lt;/strong&gt; %2 skaidinį su prijungimo tašku &lt;strong&gt;%1&lt;/strong&gt;%3.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="234"/>
<source>Install %2 on %3 system partition &lt;strong&gt;%1&lt;/strong&gt; with features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Įdiegti %2 sistemą %3 sistemos skaidinyje &lt;strong&gt;%1&lt;/strong&gt; su ypatybėmis &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="253"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt; and features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Nustatyti %3 skaidinį &lt;strong&gt;%1&lt;/strong&gt; su prijungimo tašku &lt;strong&gt;%2&lt;/strong&gt; ir ypatybėmis &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="262"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt;%4.</source>
<translation type="unfinished"/>
<translation>Nustatyti %3 skaidinį &lt;strong&gt;%1&lt;/strong&gt; su prijungimo tašku &lt;strong&gt;%2&lt;/strong&gt;%4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="243"/>
@@ -3983,29 +3987,31 @@ Išvestis:
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="36"/>
<source>Installation Completed</source>
<translation type="unfinished"/>
<translation>Diegimas užbaigtas</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="43"/>
<source>%1 has been installed on your computer.&lt;br/&gt;
You may now restart into your new system, or continue using the Live environment.</source>
<translation type="unfinished"/>
<translation>%1 įdiegta jūsų kompiuteryje.&lt;br/&gt;
Galite naujo paleisti kompiuterį dabar ir naudotis savo naująja sistema; arba galite ir toliau naudotis demonstracine aplinka.</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="65"/>
<source>Close Installer</source>
<translation type="unfinished"/>
<translation>Užverti diegimo programą</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="71"/>
<source>Restart System</source>
<translation type="unfinished"/>
<translation>Paleisti sistemą naujo</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="89"/>
<source>&lt;p&gt;A full log of the install is available as installation.log in the home directory of the Live user.&lt;br/&gt;
This log is copied to /var/log/installation.log of the target system.&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Pilnas diegimo žurnalas yra prieinamas kaip installation.log failas, esantis demonstracinio naudotojo namų kataloge.&lt;br/&gt;
Šis žurnalas yra nukopijuotas paskirties sistemoje į failą /var/log/installation.log.&lt;/p&gt;</translation>
</message>
</context>
<context>

View File

@@ -6,7 +6,7 @@
<message>
<location filename="../src/modules/partition/jobs/AutoMountManagementJob.cpp" line="22"/>
<source>Manage auto-mount settings</source>
<translation type="unfinished"/>
<translation>Gerir definições de montagem automática</translation>
</message>
</context>
<context>
@@ -318,7 +318,11 @@
%1
Link copied to clipboard</source>
<translation type="unfinished"/>
<translation>Registo de instalação publicado em
%1
Ligação copiada para a área de transferência</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="224"/>
@@ -854,12 +858,12 @@ O instalador será encerrado e todas as alterações serão perdidas.</translati
<message>
<location filename="../src/modules/finished/Config.cpp" line="145"/>
<source>The setup of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>A configuração de %1 não foi concluída com sucesso.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="146"/>
<source>The installation of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>A instalação de %1 não foi concluída com sucesso.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="150"/>
@@ -973,12 +977,12 @@ O instalador será encerrado e todas as alterações serão perdidas.</translati
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="117"/>
<source>Create new %1MiB partition on %3 (%2) with entries %4.</source>
<translation type="unfinished"/>
<translation>Criar nova partição de %1MiB em %3 (%2) com entradas %4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="125"/>
<source>Create new %1MiB partition on %3 (%2).</source>
<translation type="unfinished"/>
<translation>Criar nova partição de %1MiB em %3 (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="132"/>
@@ -988,12 +992,12 @@ O instalador será encerrado e todas as alterações serão perdidas.</translati
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="149"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2) with entries &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Criar nova partição de &lt;strong&gt;%1MiB&lt;/strong&gt; em &lt;strong&gt;%3&lt;/strong&gt; (%2) com entradas &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="157"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2).</source>
<translation type="unfinished"/>
<translation>Criar nova partição de &lt;strong&gt;%1MiB&lt;/strong&gt; em &lt;strong&gt;%3&lt;/strong&gt; (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="164"/>
@@ -1341,7 +1345,7 @@ O instalador será encerrado e todas as alterações serão perdidas.</translati
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="195"/>
<source>Install %1 on &lt;strong&gt;new&lt;/strong&gt; %2 system partition with features &lt;em&gt;%3&lt;/em&gt;</source>
<translation type="unfinished"/>
<translation>Instalar %1 na &lt;strong&gt;nova&lt;/strong&gt; partição do sistema %2 com funcionalidades &lt;em&gt;%3&lt;/em&gt;</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="203"/>
@@ -1351,27 +1355,27 @@ O instalador será encerrado e todas as alterações serão perdidas.</translati
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="212"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt; and features &lt;em&gt;%3&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Configurar &lt;strong&gt;nova&lt;/strong&gt; partição %2 com ponto de montagem &lt;strong&gt;%1&lt;/strong&gt; e funcionalidades &lt;em&gt;%3&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="220"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt;%3.</source>
<translation type="unfinished"/>
<translation>Configurar &lt;strong&gt;nova&lt;/strong&gt; partição %2 com ponto de montagem &lt;strong&gt;%1&lt;/strong&gt;%3.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="234"/>
<source>Install %2 on %3 system partition &lt;strong&gt;%1&lt;/strong&gt; with features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Instalar %2 em %3 partição do sistema &lt;strong&gt;%1&lt;/strong&gt; com funcionalidades &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="253"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt; and features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Configurar %3 partição &lt;strong&gt;%1&lt;/strong&gt; com ponto de montagem &lt;strong&gt;%2&lt;/strong&gt; e funcionalidades &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="262"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt;%4.</source>
<translation type="unfinished"/>
<translation>Configurar %3 partição &lt;strong&gt;%1&lt;/strong&gt; com ponto de montagem &lt;strong&gt;%2&lt;/strong&gt;%4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="243"/>
@@ -3961,29 +3965,31 @@ Saída de Dados:
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="36"/>
<source>Installation Completed</source>
<translation type="unfinished"/>
<translation>Instalação Concluída</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="43"/>
<source>%1 has been installed on your computer.&lt;br/&gt;
You may now restart into your new system, or continue using the Live environment.</source>
<translation type="unfinished"/>
<translation>%1 foi instalado no seu computador.&lt;br/&gt;
Pode agora reiniciar no seu novo sistema, ou continuar a utilizar o ambiente Live.</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="65"/>
<source>Close Installer</source>
<translation type="unfinished"/>
<translation>Fechar Instalador</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="71"/>
<source>Restart System</source>
<translation type="unfinished"/>
<translation>Reiniciar Sistema</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="89"/>
<source>&lt;p&gt;A full log of the install is available as installation.log in the home directory of the Live user.&lt;br/&gt;
This log is copied to /var/log/installation.log of the target system.&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;Um registo completo da instalação está disponível como installation.log no diretório home do utilizador Live.&lt;br/&gt;
Este registo é copiado para /var/log/installation.log do sistema de destino.&lt;/p&gt;</translation>
</message>
</context>
<context>

View File

@@ -52,7 +52,7 @@
<message>
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="146"/>
<source>%1 (%2)</source>
<translation type="unfinished"/>
<translation>%1 (%2)</translation>
</message>
</context>
<context>
@@ -2888,7 +2888,7 @@ Output:
<message>
<location filename="../src/libcalamares/locale/Label.cpp" line="29"/>
<source>%1 (%2)</source>
<translation type="unfinished"/>
<translation>%1 (%2)</translation>
</message>
<message>
<location filename="../src/libcalamares/partition/FileSystem.cpp" line="28"/>

View File

@@ -6,7 +6,7 @@
<message>
<location filename="../src/modules/partition/jobs/AutoMountManagementJob.cpp" line="22"/>
<source>Manage auto-mount settings</source>
<translation type="unfinished"/>
<translation>Hantera inställningar för automatisk montering</translation>
</message>
</context>
<context>
@@ -318,7 +318,11 @@
%1
Link copied to clipboard</source>
<translation type="unfinished"/>
<translation>Installationslogg postad till
%1
Länken kopierades till urklipp</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="224"/>
@@ -853,12 +857,12 @@ Alla ändringar kommer att gå förlorade.</translation>
<message>
<location filename="../src/modules/finished/Config.cpp" line="145"/>
<source>The setup of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>Installationen av %1 slutfördes inte korrekt.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="146"/>
<source>The installation of %1 did not complete successfully.</source>
<translation type="unfinished"/>
<translation>Installationen av %1 slutfördes inte korrekt.</translation>
</message>
<message>
<location filename="../src/modules/finished/Config.cpp" line="150"/>
@@ -972,12 +976,12 @@ Alla ändringar kommer att gå förlorade.</translation>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="117"/>
<source>Create new %1MiB partition on %3 (%2) with entries %4.</source>
<translation type="unfinished"/>
<translation>Skapa ny %1MiB partition på %3 (%2) med poster %4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="125"/>
<source>Create new %1MiB partition on %3 (%2).</source>
<translation type="unfinished"/>
<translation>Skapa ny %1MiB partition på %3 (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="132"/>
@@ -987,12 +991,12 @@ Alla ändringar kommer att gå förlorade.</translation>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="149"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2) with entries &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Skapa ny &lt;strong&gt;%1MiB&lt;/strong&gt; partition på &lt;strong&gt;%3&lt;/strong&gt; (%2) med poster &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="157"/>
<source>Create new &lt;strong&gt;%1MiB&lt;/strong&gt; partition on &lt;strong&gt;%3&lt;/strong&gt; (%2).</source>
<translation type="unfinished"/>
<translation>Skapa ny &lt;strong&gt;%1MiB&lt;/strong&gt; partition på &lt;strong&gt;%3&lt;/strong&gt; (%2).</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="164"/>
@@ -1340,7 +1344,7 @@ Alla ändringar kommer att gå förlorade.</translation>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="195"/>
<source>Install %1 on &lt;strong&gt;new&lt;/strong&gt; %2 system partition with features &lt;em&gt;%3&lt;/em&gt;</source>
<translation type="unfinished"/>
<translation>Installera %1 på &lt;strong&gt;ny&lt;/strong&gt; %2 system partition med funktioner &lt;em&gt;%3&lt;/em&gt;</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="203"/>
@@ -1350,27 +1354,27 @@ Alla ändringar kommer att gå förlorade.</translation>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="212"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt; and features &lt;em&gt;%3&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Skapa &lt;strong&gt;ny&lt;/strong&gt;%2 partition med monteringspunkt &lt;strong&gt;%1&lt;/strong&gt; och funktioner &lt;em&gt;%3&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="220"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt;%3.</source>
<translation type="unfinished"/>
<translation>Skapa &lt;strong&gt;ny&lt;/strong&gt; %2 partition med monteringspunkt &lt;strong&gt;%1&lt;/strong&gt;%3.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="234"/>
<source>Install %2 on %3 system partition &lt;strong&gt;%1&lt;/strong&gt; with features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Installera %2 på %3 system partition &lt;strong&gt;%1&lt;/strong&gt; med funktioner &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="253"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt; and features &lt;em&gt;%4&lt;/em&gt;.</source>
<translation type="unfinished"/>
<translation>Skapa %3 partition &lt;strong&gt;%1&lt;/strong&gt;med monteringspunkt &lt;strong&gt;%2&lt;/strong&gt;och funktioner &lt;em&gt;%4&lt;/em&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="262"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt;%4.</source>
<translation type="unfinished"/>
<translation>Skapa %3 partition &lt;strong&gt;%1&lt;/strong&gt; med monteringspunkt &lt;strong&gt;%2&lt;/strong&gt; %4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="243"/>
@@ -3961,29 +3965,31 @@ Installationen kan inte fortsätta.&lt;/p&gt;</translation>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="36"/>
<source>Installation Completed</source>
<translation type="unfinished"/>
<translation>Installationen är klar</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="43"/>
<source>%1 has been installed on your computer.&lt;br/&gt;
You may now restart into your new system, or continue using the Live environment.</source>
<translation type="unfinished"/>
<translation>%1 har installerats din dator. &lt;br/&gt;
Du kan nu starta om i ditt nya system eller fortsätta använda Live-miljön. </translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="65"/>
<source>Close Installer</source>
<translation type="unfinished"/>
<translation>Stäng installationsprogrammet</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="71"/>
<source>Restart System</source>
<translation type="unfinished"/>
<translation>Starta om System</translation>
</message>
<message>
<location filename="../src/modules/finishedq/finishedq.qml" line="89"/>
<source>&lt;p&gt;A full log of the install is available as installation.log in the home directory of the Live user.&lt;br/&gt;
This log is copied to /var/log/installation.log of the target system.&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;En fullständig logg över installationen är tillgänglig som installation.log i hemkatalogen av Live användaren.&lt;br/&gt;
Denna logg är kopierad till /var/log/installation.log på målsystemet.&lt;/p&gt;</translation>
</message>
</context>
<context>

View File

@@ -4,7 +4,7 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# xxmn77 <xxmn77@gmail.com>, 2020
# Xəyyam Qocayev <xxmn77@gmail.com>, 2020
#
#, fuzzy
msgid ""
@@ -13,7 +13,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-14 16:14+0100\n"
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
"Last-Translator: xxmn77 <xxmn77@gmail.com>, 2020\n"
"Last-Translator: Xəyyam Qocayev <xxmn77@gmail.com>, 2020\n"
"Language-Team: Azerbaijani (https://www.transifex.com/calamares/teams/20061/az/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@@ -4,7 +4,7 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# xxmn77 <xxmn77@gmail.com>, 2020
# Xəyyam Qocayev <xxmn77@gmail.com>, 2020
#
#, fuzzy
msgid ""
@@ -13,7 +13,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-14 16:14+0100\n"
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
"Last-Translator: xxmn77 <xxmn77@gmail.com>, 2020\n"
"Last-Translator: Xəyyam Qocayev <xxmn77@gmail.com>, 2020\n"
"Language-Team: Azerbaijani (Azerbaijan) (https://www.transifex.com/calamares/teams/20061/az_AZ/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@@ -134,9 +134,10 @@ getWidgetSidebar( Calamares::DebugWindowManager* debug,
{
QPushButton* debugWindowBtn = new QPushButton;
debugWindowBtn->setObjectName( "debugButton" );
CALAMARES_RETRANSLATE_WIDGET( debugWindowBtn,
debugWindowBtn->setText( QCoreApplication::translate(
CalamaresWindow::staticMetaObject.className(), "Show debug information" ) ); )
CALAMARES_RETRANSLATE_WIDGET(
debugWindowBtn,
debugWindowBtn->setText( QCoreApplication::translate( CalamaresWindow::staticMetaObject.className(),
"Show debug information" ) ); );
sideLayout->addWidget( debugWindowBtn );
debugWindowBtn->setFlat( true );
debugWindowBtn->setCheckable( true );
@@ -365,7 +366,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
CALAMARES_RETRANSLATE( const auto* branding = Calamares::Branding::instance();
setWindowTitle( Calamares::Settings::instance()->isSetupMode()
? tr( "%1 Setup Program" ).arg( branding->productName() )
: tr( "%1 Installer" ).arg( branding->productName() ) ); )
: tr( "%1 Installer" ).arg( branding->productName() ) ); );
const Calamares::Branding* const branding = Calamares::Branding::instance();
using ImageEntry = Calamares::Branding::ImageEntry;

View File

@@ -20,6 +20,7 @@
#include "modulesystem/Module.h"
#include "modulesystem/ModuleManager.h"
#include "utils/Logger.h"
#include "utils/Paste.h"
#include "utils/Retranslator.h"
#ifdef WITH_PYTHONQT
@@ -213,7 +214,11 @@ DebugWindow::DebugWindow()
}
} );
CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); setWindowTitle( tr( "Debug information" ) ); )
// Send Log button only if it would be useful
m_ui->sendLogButton->setVisible( CalamaresUtils::Paste::isEnabled() );
connect( m_ui->sendLogButton, &QPushButton::clicked, [this]() { CalamaresUtils::Paste::doLogUploadUI( this ); } );
CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); setWindowTitle( tr( "Debug information" ) ); );
}

View File

@@ -21,7 +21,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="globalStorageTab">
<attribute name="title">
@@ -92,49 +92,64 @@ SPDX-License-Identifier: GPL-3.0-or-later
</item>
</layout>
</widget>
<widget class="QWidget" name="toolsTab">
<attribute name="title">
<string>Tools</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPushButton" name="crashButton">
<property name="text">
<string notr="true">Crash now</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="reloadStylesheetButton">
<property name="text">
<string>Reload Stylesheet</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="widgetTreeButton">
<property name="text">
<string>Widget Tree</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="crashButton">
<property name="toolTip">
<string>Crashes Calamares, so that Dr. Konqui can look at it.</string>
</property>
<property name="text">
<string notr="true">Crash now</string>
</property>
<property name="icon">
<iconset theme="data-error"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="reloadStylesheetButton">
<property name="toolTip">
<string>Reloads the stylesheet from the branding directory.</string>
</property>
<property name="text">
<string>Reload Stylesheet</string>
</property>
<property name="icon">
<iconset theme="preferences-web-browser-stylesheets"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="widgetTreeButton">
<property name="toolTip">
<string>Displays the tree of widget names in the log (for stylesheet debugging).</string>
</property>
<property name="text">
<string>Widget Tree</string>
</property>
<property name="icon">
<iconset theme="view-list-tree"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="sendLogButton">
<property name="toolTip">
<string>Uploads the session log to the configured pastebin.</string>
</property>
<property name="text">
<string>Send Session Log</string>
</property>
<property name="icon">
<iconset theme="upload-media"/>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>

View File

@@ -59,6 +59,9 @@ set( libSources
# Network service
network/Manager.cpp
# Packages service
packages/Globals.cpp
# Partition service
partition/Mount.cpp
partition/PartitionSize.cpp
@@ -228,6 +231,12 @@ calamares_add_test(
network/Tests.cpp
)
calamares_add_test(
libcalamarespackagestest
SOURCES
packages/Tests.cpp
)
calamares_add_test(
libcalamarespartitiontest
SOURCES

View File

@@ -94,26 +94,41 @@ Config::ApplyPresets::apply( const char* fieldName )
if ( !prop.isValid() )
{
cWarning() << "Applying invalid property" << fieldName;
return *this;
}
const QString key( fieldName );
if ( key.isEmpty() )
{
cWarning() << "Applying empty field";
return *this;
}
if ( m_c.d->m_presets->find( key ).isValid() )
{
cWarning() << "Applying duplicate property" << fieldName;
return *this;
}
if ( m_map.contains( key ) )
{
// Key has an explicit setting
QVariantMap m = CalamaresUtils::getSubMap( m_map, key, m_bogus );
QVariant value = m[ "value" ];
bool editable = CalamaresUtils::getBool( m, "editable", true );
if ( value.isValid() )
{
m_c.setProperty( fieldName, value );
}
m_c.d->m_presets->append( PresetField { key, value, editable } );
}
else
{
const QString key( fieldName );
if ( !key.isEmpty() && m_c.d->m_presets->find( key ).isValid() )
{
cWarning() << "Applying duplicate property" << fieldName;
}
else if ( !key.isEmpty() && m_map.contains( key ) )
{
QVariantMap m = CalamaresUtils::getSubMap( m_map, key, m_bogus );
QVariant value = m[ "value" ];
bool editable = CalamaresUtils::getBool( m, "editable", true );
if ( value.isValid() )
{
m_c.setProperty( fieldName, value );
}
m_c.d->m_presets->append( PresetField { key, value, editable } );
}
// There is no setting, but since we apply() this field,
// we do know about it; put in a preset so that looking
// it up won't complani.
m_c.d->m_presets->append( PresetField { key, QVariant(), true } );
}
return *this;
}

View File

@@ -85,9 +85,9 @@ void
RequirementsChecker::addCheckedRequirements( Module* m )
{
RequirementsList l = m->checkRequirements();
cDebug() << "Got" << l.count() << "requirement results from" << m->name();
if ( l.count() > 0 )
{
cDebug() << "Got" << l.count() << "requirement results from" << m->name();
m_model->addRequirementsList( l );
}

View File

@@ -0,0 +1,68 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#include "Globals.h"
#include "GlobalStorage.h"
#include "utils/Logger.h"
bool
CalamaresUtils::Packages::setGSPackageAdditions( Calamares::GlobalStorage* gs,
const Calamares::ModuleSystem::InstanceKey& module,
const QVariantList& installPackages,
const QVariantList& tryInstallPackages )
{
static const char PACKAGEOP[] = "packageOperations";
// Check if there's already a PACAKGEOP entry in GS, and if so we'll
// extend that one (overwriting the value in GS at the end of this method)
QVariantList packageOperations = gs->contains( PACKAGEOP ) ? gs->value( PACKAGEOP ).toList() : QVariantList();
cDebug() << "Existing package operations length" << packageOperations.length();
const QString key = module.toString();
// Clear out existing operations for this module, going backwards:
// Sometimes we remove an item, and we don't want the index to
// fall off the end of the list.
bool somethingRemoved = false;
for ( int index = packageOperations.length() - 1; 0 <= index; index-- )
{
const QVariantMap op = packageOperations.at( index ).toMap();
if ( op.contains( "source" ) && op.value( "source" ).toString() == key )
{
cDebug() << Logger::SubEntry << "Removing existing operations for" << key;
packageOperations.removeAt( index );
somethingRemoved = true;
}
}
if ( !installPackages.empty() )
{
QVariantMap op;
op.insert( "install", QVariant( installPackages ) );
op.insert( "source", key );
packageOperations.append( op );
cDebug() << Logger::SubEntry << installPackages.length() << "critical packages.";
}
if ( !tryInstallPackages.empty() )
{
QVariantMap op;
op.insert( "try_install", QVariant( tryInstallPackages ) );
op.insert( "source", key );
packageOperations.append( op );
cDebug() << Logger::SubEntry << tryInstallPackages.length() << "non-critical packages.";
}
if ( somethingRemoved || !packageOperations.isEmpty() )
{
gs->insert( PACKAGEOP, packageOperations );
return true;
}
return false;
}

View File

@@ -0,0 +1,36 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef LIBCALAMARES_PACKAGES_GLOBALS_H
#define LIBCALAMARES_PACKAGES_GLOBALS_H
#include "GlobalStorage.h"
#include "modulesystem/InstanceKey.h"
namespace CalamaresUtils
{
namespace Packages
{
/** @brief Sets the install-packages GS keys for the given module
*
* This replaces previously-set install-packages lists for the
* given module by the two new lists.
*
* Returns @c true if anything was changed, @c false otherwise.
*/
bool setGSPackageAdditions( Calamares::GlobalStorage* gs,
const Calamares::ModuleSystem::InstanceKey& module,
const QVariantList& installPackages,
const QVariantList& tryInstallPackages );
// void setGSPackageRemovals( const Calamares::ModuleSystem::InstanceKey& key, const QVariantList& removePackages );
} // namespace Packages
} // namespace CalamaresUtils
#endif

View File

@@ -0,0 +1,88 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#include "Globals.h"
#include "GlobalStorage.h"
#include "utils/Logger.h"
#include <QtTest/QtTest>
class PackagesTests : public QObject
{
Q_OBJECT
public:
PackagesTests() {}
~PackagesTests() override {}
private Q_SLOTS:
void initTestCase();
void testEmpty();
void testAdd();
};
void
PackagesTests::initTestCase()
{
Logger::setupLogLevel( Logger::LOGDEBUG );
}
void
PackagesTests::testEmpty()
{
Calamares::GlobalStorage gs;
const QString topKey( "packageOperations" );
Calamares::ModuleSystem::InstanceKey k( "this", "that" );
QVERIFY( !gs.contains( topKey ) );
QCOMPARE( k.toString(), "this@that" );
// Adding nothing at all does nothing
QVERIFY( !CalamaresUtils::Packages::setGSPackageAdditions( &gs, k, QVariantList(), QVariantList() ) );
QVERIFY( !gs.contains( topKey ) );
}
void
PackagesTests::testAdd()
{
Calamares::GlobalStorage gs;
const QString topKey( "packageOperations" );
Calamares::ModuleSystem::InstanceKey k( "this", "that" );
QVERIFY( !gs.contains( topKey ) );
QVERIFY(
CalamaresUtils::Packages::setGSPackageAdditions( &gs, k, QVariantList { QString( "vim" ) }, QVariantList() ) );
QVERIFY( gs.contains( topKey ) );
auto actionList = gs.value( topKey ).toList();
QCOMPARE( actionList.length(), 1 );
auto action = actionList[ 0 ].toMap();
QVERIFY( action.contains( "install" ) );
auto op = action[ "install" ].toList();
QCOMPARE( op.length(), 1 );
cDebug() << op;
QVERIFY( CalamaresUtils::Packages::setGSPackageAdditions(
&gs, k, QVariantList { QString( "vim" ), QString( "emacs" ) }, QVariantList() ) );
QVERIFY( gs.contains( topKey ) );
actionList = gs.value( topKey ).toList();
QCOMPARE( actionList.length(), 1 );
action = actionList[ 0 ].toMap();
QVERIFY( action.contains( "install" ) );
op = action[ "install" ].toList();
QCOMPARE( op.length(), 2 );
QCOMPARE( action[ "source" ].toString(), k.toString() );
cDebug() << op;
}
QTEST_GUILESS_MAIN( PackagesTests )
#include "utils/moc-warnings.h"
#include "Tests.moc"

View File

@@ -22,6 +22,8 @@
namespace Logger
{
class Once;
struct FuncSuppressor
{
explicit constexpr FuncSuppressor( const char[] );
@@ -57,7 +59,8 @@ public:
explicit CDebug( unsigned int debugLevel = LOGDEBUG, const char* func = nullptr );
virtual ~CDebug();
friend QDebug& operator<<( CDebug&&, const FuncSuppressor& );
friend CDebug& operator<<( CDebug&&, const FuncSuppressor& );
friend CDebug& operator<<( CDebug&&, Once& );
private:
QString m_msg;
@@ -65,11 +68,12 @@ private:
const char* m_funcinfo = nullptr;
};
inline QDebug&
inline CDebug&
operator<<( CDebug&& s, const FuncSuppressor& f )
{
s.m_funcinfo = nullptr;
return s << f.m_s;
s << f.m_s;
return s;
}
inline QDebug&
@@ -285,6 +289,33 @@ operator<<( QDebug& s, const Pointer& p )
s << '@' << p.ptr << Quote;
return s;
}
class Once
{
public:
Once()
: m( true )
{
}
friend CDebug& operator<<( CDebug&&, Once& );
private:
bool m = false;
};
inline CDebug&
operator<<( CDebug&& s, Once& o )
{
if ( o.m )
{
o.m = false;
return s;
}
s.m_funcinfo = nullptr;
s << SubEntry;
return s;
}
} // namespace Logger
#define cDebug() Logger::CDebug( Logger::LOGDEBUG, Q_FUNC_INFO )

View File

@@ -91,15 +91,16 @@ private:
} // namespace CalamaresUtils
#define CALAMARES_RETRANSLATE( body ) CalamaresUtils::Retranslator::attachRetranslator( this, [=] { body } );
#define CALAMARES_RETRANSLATE( body ) CalamaresUtils::Retranslator::attachRetranslator( this, [=] { body } )
#define CALAMARES_RETRANSLATE_WIDGET( widget, body ) \
CalamaresUtils::Retranslator::attachRetranslator( widget, [=] { body } );
CalamaresUtils::Retranslator::attachRetranslator( widget, [=] { body } )
#define CALAMARES_RETRANSLATE_SLOT( slotfunc ) \
do \
{ \
this->connect( CalamaresUtils::Retranslator::retranslatorFor( this ), \
&CalamaresUtils::Retranslator::languageChange, \
this, \
slotfunc ); \
}
} while ( 0 )
#endif

View File

@@ -81,7 +81,7 @@ ViewManager::ViewManager( QObject* parent )
connect( JobQueue::instance(), &JobQueue::failed, this, &ViewManager::onInstallationFailed );
connect( JobQueue::instance(), &JobQueue::finished, this, &ViewManager::next );
CALAMARES_RETRANSLATE_SLOT( &ViewManager::updateButtonLabels )
CALAMARES_RETRANSLATE_SLOT( &ViewManager::updateButtonLabels );
}
@@ -190,26 +190,7 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
connect( msgBox, &QMessageBox::buttonClicked, [msgBox]( QAbstractButton* button ) {
if ( msgBox->buttonRole( button ) == QMessageBox::ButtonRole::YesRole )
{
QString pasteUrl = CalamaresUtils::Paste::doLogUpload( msgBox );
QString pasteUrlMessage;
if ( pasteUrl.isEmpty() )
{
pasteUrlMessage = tr( "The upload was unsuccessful. No web-paste was done." );
}
else
{
QClipboard* clipboard = QApplication::clipboard();
clipboard->setText( pasteUrl, QClipboard::Clipboard );
if ( clipboard->supportsSelection() )
{
clipboard->setText( pasteUrl, QClipboard::Selection );
}
QString pasteUrlFmt = tr( "Install log posted to\n\n%1\n\nLink copied to clipboard" );
pasteUrlMessage = pasteUrlFmt.arg( pasteUrl );
}
QMessageBox::critical( nullptr, tr( "Install Log Paste URL" ), pasteUrlMessage );
CalamaresUtils::Paste::doLogUploadUI( msgBox );
}
QApplication::quit();
} );

View File

@@ -61,7 +61,6 @@ ModuleManager::init()
QTimer::singleShot( 0, this, &ModuleManager::doInit );
}
void
ModuleManager::doInit()
{
@@ -72,6 +71,7 @@ ModuleManager::doInit()
// the module name, and must contain a settings file named module.desc.
// If at any time the module loading procedure finds something unexpected, it
// silently skips to the next module or search path. --Teo 6/2014
Logger::Once deb;
for ( const QString& path : m_paths )
{
QDir currentDir( path );
@@ -88,12 +88,12 @@ ModuleManager::doInit()
QFileInfo descriptorFileInfo( currentDir.absoluteFilePath( QLatin1String( "module.desc" ) ) );
if ( !descriptorFileInfo.exists() )
{
cDebug() << bad_descriptor << descriptorFileInfo.absoluteFilePath() << "(missing)";
cDebug() << deb << bad_descriptor << descriptorFileInfo.absoluteFilePath() << "(missing)";
continue;
}
if ( !descriptorFileInfo.isReadable() )
{
cDebug() << bad_descriptor << descriptorFileInfo.absoluteFilePath() << "(unreadable)";
cDebug() << deb << bad_descriptor << descriptorFileInfo.absoluteFilePath() << "(unreadable)";
continue;
}
@@ -118,12 +118,12 @@ ModuleManager::doInit()
}
else
{
cDebug() << "ModuleManager module search path does not exist:" << path;
cDebug() << deb << "ModuleManager module search path does not exist:" << path;
}
}
// At this point m_availableDescriptorsByModuleName is filled with
// the modules that were found in the search paths.
cDebug() << "Found" << m_availableDescriptorsByModuleName.count() << "modules";
cDebug() << deb << "Found" << m_availableDescriptorsByModuleName.count() << "modules";
QTimer::singleShot( 10, this, &ModuleManager::initDone );
}

View File

@@ -14,10 +14,14 @@
#include "utils/Logger.h"
#include "utils/Units.h"
#include <QApplication>
#include <QClipboard>
#include <QFile>
#include <QFileInfo>
#include <QMessageBox>
#include <QTcpSocket>
#include <QUrl>
#include <QWidget>
using namespace CalamaresUtils::Units;
@@ -126,3 +130,41 @@ CalamaresUtils::Paste::doLogUpload( QObject* parent )
}
return QString();
}
QString
CalamaresUtils::Paste::doLogUploadUI( QWidget* parent )
{
// These strings originated in the ViewManager class
QString pasteUrl = CalamaresUtils::Paste::doLogUpload( parent );
QString pasteUrlMessage;
if ( pasteUrl.isEmpty() )
{
pasteUrlMessage = QCoreApplication::translate( "Calamares::ViewManager",
"The upload was unsuccessful. No web-paste was done." );
}
else
{
QClipboard* clipboard = QApplication::clipboard();
clipboard->setText( pasteUrl, QClipboard::Clipboard );
if ( clipboard->supportsSelection() )
{
clipboard->setText( pasteUrl, QClipboard::Selection );
}
QString pasteUrlFmt = QCoreApplication::translate( "Calamares::ViewManager",
"Install log posted to\n\n%1\n\nLink copied to clipboard" );
pasteUrlMessage = pasteUrlFmt.arg( pasteUrl );
}
QMessageBox::critical(
nullptr, QCoreApplication::translate( "Calamares::ViewManager", "Install Log Paste URL" ), pasteUrlMessage );
return pasteUrl;
}
bool
CalamaresUtils::Paste::isEnabled()
{
auto [ type, serverUrl ] = Calamares::Branding::instance()->uploadServer();
return type != Calamares::Branding::UploadServerType::None;
}

View File

@@ -13,17 +13,30 @@
#include <QString>
class QObject;
class QWidget;
namespace CalamaresUtils
{
namespace Paste
{
/** @brief Send the current log file to a pastebin
*
* Returns the (string) URL that the pastebin gives us.
*/
QString doLogUpload( QObject* parent );
/** @brief Send the current log file to a pastebin
*
* As doLogUpload(), but also sets the clipboard and displays
* a message saying it's been done.
*/
QString doLogUploadUI( QWidget* parent );
/** @brief Is paste enabled?
*
* Checks the branding instance if paste can be done.
*/
bool isEnabled();
} // namespace Paste
} // namespace CalamaresUtils

View File

@@ -168,7 +168,7 @@ QmlViewStep::loadComplete()
}
if ( m_qmlComponent->isReady() && !m_qmlObject )
{
cDebug() << "QML component complete" << m_qmlFileName;
cDebug() << Logger::SubEntry << "QML component complete" << m_qmlFileName << "creating object";
// Don't do this again
disconnect( m_qmlComponent, &QQmlComponent::statusChanged, this, &QmlViewStep::loadComplete );
@@ -196,7 +196,7 @@ QmlViewStep::showQml()
{
if ( !m_qmlWidget || !m_qmlObject )
{
cDebug() << "showQml() called but no QML object";
cWarning() << "showQml() called but no QML object";
return;
}
if ( m_spinner )
@@ -208,7 +208,7 @@ QmlViewStep::showQml()
}
else
{
cDebug() << "showQml() called twice";
cWarning() << "showQml() called twice";
}
if ( ViewManager::instance()->currentStep() == this )
@@ -228,7 +228,7 @@ QmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
= CalamaresUtils::qmlSearchNames().find( CalamaresUtils::getString( configurationMap, "qmlSearch" ), ok );
if ( !ok )
{
cDebug() << "Bad QML search mode.";
cWarning() << "Bad QML search mode set for" << moduleInstanceKey();
}
QString qmlFile = CalamaresUtils::getString( configurationMap, "qmlFilename" );
@@ -253,7 +253,7 @@ QmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
}
else
{
cWarning() << "QML configuration set after component has loaded.";
cWarning() << "QML configuration set after component" << moduleInstanceKey() << "has loaded.";
}
}

View File

@@ -43,7 +43,7 @@ SlideshowQML::SlideshowQML( QWidget* parent )
, m_qmlComponent( nullptr )
, m_qmlObject( nullptr )
{
m_qmlShow->setObjectName("qml");
m_qmlShow->setObjectName( "qml" );
CalamaresUtils::registerQmlModels();
@@ -53,7 +53,7 @@ SlideshowQML::SlideshowQML( QWidget* parent )
cDebug() << "QML import paths:" << Logger::DebugList( m_qmlShow->engine()->importPathList() );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
CALAMARES_RETRANSLATE( if ( m_qmlShow ) { m_qmlShow->engine()->retranslate(); } )
CALAMARES_RETRANSLATE( if ( m_qmlShow ) { m_qmlShow->engine()->retranslate(); } );
#endif
if ( Branding::instance()->slideshowAPI() == 2 )
@@ -205,7 +205,7 @@ SlideshowPictures::SlideshowPictures( QWidget* parent )
, m_imageIndex( 0 )
, m_images( Branding::instance()->slideshowImages() )
{
m_label->setObjectName("image");
m_label->setObjectName( "image" );
m_label->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
m_label->setAlignment( Qt::AlignCenter );

View File

@@ -175,7 +175,6 @@ desktop_environments = [
'/usr/bin/budgie-session', 'budgie-desktop' # Budgie v8
),
DesktopEnvironment('/usr/bin/gnome-session', 'gnome'),
DesktopEnvironment('/usr/bin/startxfce4', 'xfce'),
DesktopEnvironment('/usr/bin/cinnamon-session-cinnamon', 'cinnamon'),
DesktopEnvironment('/usr/bin/mate-session', 'mate'),
DesktopEnvironment('/usr/bin/enlightenment_start', 'enlightenment'),
@@ -184,9 +183,18 @@ desktop_environments = [
DesktopEnvironment('/usr/bin/lxqt-session', 'lxqt'),
DesktopEnvironment('/usr/bin/pekwm', 'pekwm'),
DesktopEnvironment('/usr/bin/pantheon-session', 'pantheon'),
DesktopEnvironment('/usr/bin/i3', 'i3'),
DesktopEnvironment('/usr/bin/startdde', 'deepin'),
DesktopEnvironment('/usr/bin/openbox-session', 'openbox')
DesktopEnvironment('/usr/bin/startxfce4', 'xfce'),
DesktopEnvironment('/usr/bin/openbox-session', 'openbox'),
DesktopEnvironment('/usr/bin/i3', 'i3'),
DesktopEnvironment('/usr/bin/awesome', 'awesome'),
DesktopEnvironment('/usr/bin/bspwm', 'bspwm'),
DesktopEnvironment('/usr/bin/herbstluftwm', 'herbstluftwm'),
DesktopEnvironment('/usr/bin/qtile', 'qtile'),
DesktopEnvironment('/usr/bin/xmonad', 'xmonad'),
DesktopEnvironment('/usr/bin/dwm', 'dwm'),
DesktopEnvironment('/usr/bin/jwm', 'jwm'),
DesktopEnvironment('/usr/bin/icewm-session', 'icewm-session'),
]
@@ -946,7 +954,7 @@ def run():
else:
enable_basic_setup = False
username = libcalamares.globalstorage.value("autologinUser")
username = libcalamares.globalstorage.value("autoLoginUser")
if username is not None:
do_autologin = True
libcalamares.utils.debug("Setting up autologin for user {!s}.".format(username))

View File

@@ -111,8 +111,8 @@ Config::onInstallationFailed( const QString& message, const QString& details )
void
Config::doRestart( bool restartAnyway )
{
cDebug() << "mode=" << restartModes().find( restartNowMode() ) << " user?" << restartNowWanted() << "arg?"
<< restartAnyway;
cDebug() << "mode=" << restartModes().find( restartNowMode() ) << " user wants restart?" << restartNowWanted()
<< "force restart?" << restartAnyway;
if ( restartNowMode() != RestartMode::Never && restartAnyway )
{
cDebug() << Logger::SubEntry << "Running restart command" << m_restartNowCommand;
@@ -124,9 +124,11 @@ Config::doRestart( bool restartAnyway )
void
Config::doNotify( bool hasFailed, bool sendAnyway )
{
const char* const failName = hasFailed ? "failed" : "succeeded";
if ( !sendAnyway )
{
cDebug() << "Notification failed?" << hasFailed << "not sent.";
cDebug() << "Notification not sent; completion:" << failName;
return;
}
@@ -134,7 +136,7 @@ Config::doNotify( bool hasFailed, bool sendAnyway )
"org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" );
if ( notify.isValid() )
{
cDebug() << "Sending notification of completion. Failed?" << hasFailed;
cDebug() << "Sending notification of completion:" << failName;
QString title;
QString message;

View File

@@ -183,37 +183,19 @@ class FstabGenerator(object):
print(FSTAB_HEADER, file=fstab_file)
for partition in self.partitions:
# Special treatment for a btrfs root with @, @home and @swap
# subvolumes
# Special treatment for a btrfs subvolumes
if (partition["fs"] == "btrfs"
and partition["mountPoint"] == "/"):
output = subprocess.check_output(['btrfs',
'subvolume',
'list',
self.root_mount_point])
output_lines = output.splitlines()
for line in output_lines:
if line.endswith(b'path @'):
root_entry = partition
root_entry["subvol"] = "@"
dct = self.generate_fstab_line_info(root_entry)
if dct:
# Subvolume list has been created in mount.conf and curated in mount module,
# so all subvolumes here should be safe to add to fstab
btrfs_subvolumes = libcalamares.globalstorage.value("btrfsSubvolumes")
for s in btrfs_subvolumes:
mount_entry = partition
mount_entry["mountPoint"] = s["mountPoint"]
mount_entry["subvol"] = s["subvolume"]
dct = self.generate_fstab_line_info(mount_entry)
if dct:
self.print_fstab_line(dct, file=fstab_file)
elif line.endswith(b'path @home'):
home_entry = partition
home_entry["mountPoint"] = "/home"
home_entry["subvol"] = "@home"
dct = self.generate_fstab_line_info(home_entry)
if dct:
self.print_fstab_line(dct, file=fstab_file)
elif line.endswith(b'path @swap'):
swap_part_entry = partition
swap_part_entry["mountPoint"] = "/swap"
swap_part_entry["subvol"] = "@swap"
dct = self.generate_fstab_line_info(swap_part_entry)
if dct:
self.print_fstab_line(dct, file=fstab_file)
else:
dct = self.generate_fstab_line_info(partition)
if dct:

View File

@@ -99,5 +99,6 @@ void
InteractiveTerminalPage::setCommand( const QString& command )
{
m_command = command;
CALAMARES_RETRANSLATE( m_headerLabel->setText( tr( "Executing script: &nbsp;<code>%1</code>" ).arg( m_command ) ); )
CALAMARES_RETRANSLATE(
m_headerLabel->setText( tr( "Executing script: &nbsp;<code>%1</code>" ).arg( m_command ) ); );
}

View File

@@ -70,9 +70,8 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent )
cDebug() << "Variants now" << model->rowCount() << model->currentIndex();
}
connect( ui->buttonRestore, &QPushButton::clicked, [ config = config ] {
config->keyboardModels()->setCurrentIndex();
} );
connect(
ui->buttonRestore, &QPushButton::clicked, [config = config] { config->keyboardModels()->setCurrentIndex(); } );
connect( ui->physicalModelSelector,
QOverload< int >::of( &QComboBox::currentIndexChanged ),
@@ -83,25 +82,24 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent )
ui->physicalModelSelector,
&QComboBox::setCurrentIndex );
connect(
ui->layoutSelector->selectionModel(),
&QItemSelectionModel::currentChanged,
[ this ]( const QModelIndex& current ) { m_config->keyboardLayouts()->setCurrentIndex( current.row() ); } );
connect( config->keyboardLayouts(), &KeyboardLayoutModel::currentIndexChanged, [ this ]( int index ) {
connect( ui->layoutSelector->selectionModel(),
&QItemSelectionModel::currentChanged,
[this]( const QModelIndex& current ) { m_config->keyboardLayouts()->setCurrentIndex( current.row() ); } );
connect( config->keyboardLayouts(), &KeyboardLayoutModel::currentIndexChanged, [this]( int index ) {
ui->layoutSelector->setCurrentIndex( m_config->keyboardLayouts()->index( index ) );
m_keyboardPreview->setLayout( m_config->keyboardLayouts()->key( index ) );
m_keyboardPreview->setVariant( m_config->keyboardVariants()->key( m_config->keyboardVariants()->currentIndex() ) );
m_keyboardPreview->setVariant(
m_config->keyboardVariants()->key( m_config->keyboardVariants()->currentIndex() ) );
} );
connect(
ui->variantSelector->selectionModel(),
&QItemSelectionModel::currentChanged,
[ this ]( const QModelIndex& current ) { m_config->keyboardVariants()->setCurrentIndex( current.row() ); } );
connect( config->keyboardVariants(), &KeyboardVariantsModel::currentIndexChanged, [ this ]( int index ) {
connect( ui->variantSelector->selectionModel(),
&QItemSelectionModel::currentChanged,
[this]( const QModelIndex& current ) { m_config->keyboardVariants()->setCurrentIndex( current.row() ); } );
connect( config->keyboardVariants(), &KeyboardVariantsModel::currentIndexChanged, [this]( int index ) {
ui->variantSelector->setCurrentIndex( m_config->keyboardVariants()->index( index ) );
m_keyboardPreview->setVariant( m_config->keyboardVariants()->key( index ) );
} );
CALAMARES_RETRANSLATE_SLOT( &KeyboardPage::retranslate )
CALAMARES_RETRANSLATE_SLOT( &KeyboardPage::retranslate );
}
KeyboardPage::~KeyboardPage()

View File

@@ -105,7 +105,7 @@ LicensePage::LicensePage( QWidget* parent )
connect( ui->acceptCheckBox, &QCheckBox::toggled, this, &LicensePage::checkAcceptance );
CALAMARES_RETRANSLATE_SLOT( &LicensePage::retranslate )
CALAMARES_RETRANSLATE_SLOT( &LicensePage::retranslate );
}
void

View File

@@ -117,7 +117,7 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
connect( m_localeChangeButton, &QPushButton::clicked, this, &LocalePage::changeLocale );
connect( m_formatsChangeButton, &QPushButton::clicked, this, &LocalePage::changeFormats );
CALAMARES_RETRANSLATE_SLOT( &LocalePage::updateLocaleLabels )
CALAMARES_RETRANSLATE_SLOT( &LocalePage::updateLocaleLabels );
}

View File

@@ -32,9 +32,6 @@ def pretty_name():
def mount_partition(root_mount_point, partition, partitions):
"""
Do a single mount of @p partition inside @p root_mount_point.
The @p partitions are used to handle btrfs special-cases:
then subvolumes are created for root and home.
"""
# Create mount point with `+` rather than `os.path.join()` because
# `partition["mountPoint"]` starts with a '/'.
@@ -74,36 +71,29 @@ def mount_partition(root_mount_point, partition, partitions):
partition.get("options", "")) != 0:
libcalamares.utils.warning("Cannot mount {}".format(device))
# If the root partition is btrfs, we create a subvolume "@"
# for the root mount point.
# If a separate /home partition isn't defined, we also create
# a subvolume "@home".
# If a swapfile is used, we also create a subvolume "@swap".
# Finally we remount all of the above on the correct paths.
# Special handling for btrfs subvolumes. Create the subvolumes listed in mount.conf
if fstype == "btrfs" and partition["mountPoint"] == '/':
has_home_mount_point = False
# Root has been mounted to btrfs volume -> create subvolumes from configuration
btrfs_subvolumes = libcalamares.job.configuration.get("btrfsSubvolumes") or []
subvolume_mountpoints = [d['mountPoint'] for d in btrfs_subvolumes]
# Check if listed mountpoints besides / are already present and don't create subvolume for those
for p in partitions:
if "mountPoint" not in p or not p["mountPoint"]:
continue
if p["mountPoint"] == "/home":
has_home_mount_point = True
break
needs_swap_subvolume = False
if p["mountPoint"] in subvolume_mountpoints and p["mountPoint"] != '/':
btrfs_subvolumes = [d for d in btrfs_subvolumes if d['mountPoint'] != p["mountPoint"]]
# Check if we need a subvolume for swap file
swap_choice = global_storage.value( "partitionChoices" )
if swap_choice:
swap_choice = swap_choice.get( "swap", None )
if swap_choice and swap_choice == "file":
needs_swap_subvolume = True
subprocess.check_call(['btrfs', 'subvolume', 'create',
root_mount_point + '/@'])
if not has_home_mount_point:
btrfs_subvolumes.append({'mountPoint': '/swap', 'subvolume': '/@swap'})
# Store created list in global storage so it can be used in the fstab module
libcalamares.globalstorage.insert("btrfsSubvolumes", btrfs_subvolumes)
# Create the subvolumes that are in the completed list
for s in btrfs_subvolumes:
subprocess.check_call(['btrfs', 'subvolume', 'create',
root_mount_point + '/@home'])
if needs_swap_subvolume:
subprocess.check_call(['btrfs', 'subvolume', 'create',
root_mount_point + '/@swap'])
root_mount_point + s['subvolume']])
subprocess.check_call(["umount", "-v", root_mount_point])
@@ -112,24 +102,14 @@ def mount_partition(root_mount_point, partition, partitions):
if "luksMapperName" in partition:
device = os.path.join("/dev/mapper", partition["luksMapperName"])
if libcalamares.utils.mount(device,
mount_point,
# Mount the subvolumes
for s in btrfs_subvolumes:
mount_option = "subvol={}".format(s['subvolume'])
subvolume_mountpoint = mount_point[:-1] + s['mountPoint']
if libcalamares.utils.mount(device,
subvolume_mountpoint,
fstype,
",".join(["subvol=@", partition.get("options", "")])) != 0:
libcalamares.utils.warning("Cannot mount {}".format(device))
if not has_home_mount_point:
if libcalamares.utils.mount(device,
root_mount_point + "/home",
fstype,
",".join(["subvol=@home", partition.get("options", "")])) != 0:
libcalamares.utils.warning("Cannot mount {}".format(device))
if needs_swap_subvolume:
if libcalamares.utils.mount(device,
root_mount_point + "/swap",
fstype,
",".join(["subvol=@swap", partition.get("options", "")])) != 0:
",".join([mount_option, partition.get("options", "")])) != 0:
libcalamares.utils.warning("Cannot mount {}".format(device))

View File

@@ -40,3 +40,17 @@ extraMountsEfi:
- device: efivarfs
fs: efivarfs
mountPoint: /sys/firmware/efi/efivars
# Btrfs subvolumes to create if root filesystem is on btrfs volume.
# If mountpoint is mounted already to another partition, it is ignored.
# Separate subvolume for swapfile is handled separately and automatically.
btrfsSubvolumes:
- mountPoint: /
subvolume: /@
- mountPoint: /home
subvolume: /@home
- mountPoint: /var/cache
subvolume: /@cache
- mountPoint: /var/log
subvolume: /@log

View File

@@ -29,3 +29,12 @@ properties:
mountPoint: { type: string }
options: { type: string }
required: [ device, mountPoint ]
btrfsSubvolumes:
type: array
items:
type: object
additionalProperties: false
properties:
mountPoint: { type: string }
subvolume: { type: string }
required: [ subvolume, mountPoint ]

View File

@@ -8,6 +8,7 @@ calamares_add_plugin( netinstall
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
Config.cpp
LoaderQueue.cpp
NetInstallViewStep.cpp
NetInstallPage.cpp
PackageTreeItem.cpp

View File

@@ -12,10 +12,15 @@
#include "Config.h"
#include "LoaderQueue.h"
#include "GlobalStorage.h"
#include "JobQueue.h"
#include "network/Manager.h"
#include "packages/Globals.h"
#include "utils/Logger.h"
#include "utils/RAII.h"
#include "utils/Yaml.h"
#include "utils/Retranslator.h"
#include "utils/Variant.h"
#include <QNetworkReply>
@@ -23,10 +28,20 @@ Config::Config( QObject* parent )
: QObject( parent )
, m_model( new PackageModel( this ) )
{
CALAMARES_RETRANSLATE_SLOT( &Config::retranslate );
}
Config::~Config() {}
void
Config::retranslate()
{
emit statusChanged( status() );
emit sidebarLabelChanged( sidebarLabel() );
emit titleLabelChanged( titleLabel() );
}
QString
Config::status() const
{
@@ -39,9 +54,11 @@ Config::status() const
case Status::FailedBadData:
return tr( "Network Installation. (Disabled: Received invalid groups data)" );
case Status::FailedInternalError:
return tr( "Network Installation. (Disabled: internal error)" );
return tr( "Network Installation. (Disabled: Internal error)" );
case Status::FailedNetworkError:
return tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" );
case Status::FailedNoData:
return tr( "Network Installation. (Disabled: No package list)" );
}
__builtin_unreachable();
}
@@ -54,92 +71,114 @@ Config::setStatus( Status s )
emit statusChanged( status() );
}
QString
Config::sidebarLabel() const
{
return m_sidebarLabel ? m_sidebarLabel->get() : tr( "Package selection" );
}
QString
Config::titleLabel() const
{
return m_titleLabel ? m_titleLabel->get() : QString();
}
void
Config::loadGroupList( const QVariantList& groupData )
{
m_model->setupModelData( groupData );
if ( m_model->rowCount() < 1 )
{
cWarning() << "NetInstall groups data was empty.";
setStatus( Status::FailedNoData );
}
else
{
setStatus( Status::Ok );
}
emit statusReady();
}
void
Config::loadGroupList( const QUrl& url )
Config::loadingDone()
{
if ( !url.isValid() )
if ( m_queue )
{
setStatus( Status::FailedBadConfiguration );
m_queue->deleteLater();
m_queue = nullptr;
}
}
void
Config::setConfigurationMap( const QVariantMap& configurationMap )
{
setRequired( CalamaresUtils::getBool( configurationMap, "required", false ) );
// Get the translations, if any
bool bogus = false;
auto label = CalamaresUtils::getSubMap( configurationMap, "label", bogus );
// Use a different class name for translation lookup because the
// .. table of strings lives in NetInstallViewStep.cpp and moving them
// .. around is annoying for translators.
static const char className[] = "NetInstallViewStep";
if ( label.contains( "sidebar" ) )
{
m_sidebarLabel = new CalamaresUtils::Locale::TranslatedString( label, "sidebar", className );
}
if ( label.contains( "title" ) )
{
m_titleLabel = new CalamaresUtils::Locale::TranslatedString( label, "title", className );
}
using namespace CalamaresUtils::Network;
cDebug() << "NetInstall loading groups from" << url;
QNetworkReply* reply = Manager::instance().asynchronousGet(
url,
RequestOptions( RequestOptions::FakeUserAgent | RequestOptions::FollowRedirect, std::chrono::seconds( 30 ) ) );
if ( !reply )
// Lastly, load the groups data
const QString key = QStringLiteral( "groupsUrl" );
const auto& groupsUrlVariant = configurationMap.value( key );
if ( groupsUrlVariant.type() == QVariant::String )
{
cDebug() << Logger::Continuation << "request failed immediately.";
setStatus( Status::FailedBadConfiguration );
m_queue = new LoaderQueue( this );
m_queue->append( SourceItem::makeSourceItem( groupsUrlVariant.toString(), configurationMap ) );
}
else
else if ( groupsUrlVariant.type() == QVariant::List )
{
m_reply = reply;
connect( reply, &QNetworkReply::finished, this, &Config::receivedGroupData );
m_queue = new LoaderQueue( this );
for ( const auto& s : groupsUrlVariant.toStringList() )
{
m_queue->append( SourceItem::makeSourceItem( s, configurationMap ) );
}
}
if ( m_queue && m_queue->count() > 0 )
{
cDebug() << "Loading netinstall from" << m_queue->count() << "alternate sources.";
connect( m_queue, &LoaderQueue::done, this, &Config::loadingDone );
m_queue->load();
}
}
void
Config::receivedGroupData()
Config::finalizeGlobalStorage( const Calamares::ModuleSystem::InstanceKey& key )
{
if ( !m_reply || !m_reply->isFinished() )
auto packages = model()->getPackages();
// This netinstall module may add two sub-steps to the packageOperations,
// one for installing and one for try-installing.
QVariantList installPackages;
QVariantList tryInstallPackages;
for ( const auto& package : packages )
{
cWarning() << "NetInstall data called too early.";
setStatus( Status::FailedInternalError );
return;
}
cDebug() << "NetInstall group data received" << m_reply->size() << "bytes from" << m_reply->url();
cqDeleter< QNetworkReply > d { m_reply };
// If m_required is *false* then we still say we're ready
// even if the reply is corrupt or missing.
if ( m_reply->error() != QNetworkReply::NoError )
{
cWarning() << "unable to fetch netinstall package lists.";
cDebug() << Logger::SubEntry << "Netinstall reply error: " << m_reply->error();
cDebug() << Logger::SubEntry << "Request for url: " << m_reply->url().toString()
<< " failed with: " << m_reply->errorString();
setStatus( Status::FailedNetworkError );
return;
}
QByteArray yamlData = m_reply->readAll();
try
{
YAML::Node groups = YAML::Load( yamlData.constData() );
if ( groups.IsSequence() )
if ( package->isCritical() )
{
loadGroupList( CalamaresUtils::yamlSequenceToVariant( groups ) );
}
else if ( groups.IsMap() )
{
auto map = CalamaresUtils::yamlMapToVariant( groups );
loadGroupList( map.value( "groups" ).toList() );
installPackages.append( package->toOperation() );
}
else
{
cWarning() << "NetInstall groups data does not form a sequence.";
}
if ( m_model->rowCount() < 1 )
{
cWarning() << "NetInstall groups data was empty.";
tryInstallPackages.append( package->toOperation() );
}
}
catch ( YAML::Exception& e )
{
CalamaresUtils::explainYamlException( e, yamlData, "netinstall groups data" );
setStatus( Status::FailedBadData );
}
CalamaresUtils::Packages::setGSPackageAdditions(
Calamares::JobQueue::instance()->globalStorage(), key, installPackages, tryInstallPackages );
}

View File

@@ -14,10 +14,15 @@
#include "PackageModel.h"
#include <QObject>
#include <QUrl>
#include "locale/TranslatableConfiguration.h"
#include "modulesystem/InstanceKey.h"
class QNetworkReply;
#include <QObject>
#include <QVariantMap>
#include <memory>
class LoaderQueue;
class Config : public QObject
{
@@ -26,17 +31,25 @@ class Config : public QObject
Q_PROPERTY( PackageModel* packageModel MEMBER m_model FINAL )
Q_PROPERTY( QString status READ status NOTIFY statusChanged FINAL )
// Translations, of the module name (for sidebar) and above the list
Q_PROPERTY( QString sidebarLabel READ sidebarLabel NOTIFY sidebarLabelChanged FINAL )
Q_PROPERTY( QString titleLabel READ titleLabel NOTIFY titleLabelChanged FINAL )
public:
Config( QObject* parent = nullptr );
~Config() override;
void setConfigurationMap( const QVariantMap& configurationMap );
enum class Status
{
Ok,
FailedBadConfiguration,
FailedInternalError,
FailedNetworkError,
FailedBadData
FailedBadData,
FailedNoData
};
QString status() const;
@@ -45,12 +58,10 @@ public:
bool required() const { return m_required; }
void setRequired( bool r ) { m_required = r; }
/** @brief Retrieves the groups, with name, description and packages
*
* Loads data from the given URL. Once done, the data is parsed
* and passed on to the other loadGroupList() method.
*/
void loadGroupList( const QUrl& url );
PackageModel* model() const { return m_model; }
QString sidebarLabel() const;
QString titleLabel() const;
/** @brief Fill model from parsed data.
*
@@ -59,18 +70,28 @@ public:
*/
void loadGroupList( const QVariantList& groupData );
PackageModel* model() const { return m_model; }
/** @brief Write the selected package lists to global storage
*
* Since the config doesn't know what module it is for,
* pass in an instance key.
*/
void finalizeGlobalStorage( const Calamares::ModuleSystem::InstanceKey& key );
signals:
Q_SIGNALS:
void statusChanged( QString status ); ///< Something changed
void sidebarLabelChanged( QString label );
void titleLabelChanged( QString label );
void statusReady(); ///< Loading groups is complete
private slots:
void receivedGroupData(); ///< From async-loading group data
private Q_SLOTS:
void retranslate();
void loadingDone();
private:
CalamaresUtils::Locale::TranslatedString* m_sidebarLabel = nullptr; // As it appears in the sidebar
CalamaresUtils::Locale::TranslatedString* m_titleLabel = nullptr;
PackageModel* m_model = nullptr;
QNetworkReply* m_reply = nullptr; // For fetching data
LoaderQueue* m_queue = nullptr;
Status m_status = Status::Ok;
bool m_required = false;
};

View File

@@ -0,0 +1,194 @@
/*
* SPDX-FileCopyrightText: 2016 Luca Giambonini <almack@chakraos.org>
* SPDX-FileCopyrightText: 2016 Lisa Vitolo <shainer@chakraos.org>
* SPDX-FileCopyrightText: 2017 Kyle Robbertze <krobbertze@gmail.com>
* SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#include "LoaderQueue.h"
#include "Config.h"
#include "network/Manager.h"
#include "utils/Logger.h"
#include "utils/RAII.h"
#include "utils/Yaml.h"
#include <QNetworkReply>
#include <QTimer>
/** @brief Call fetchNext() on the queue if it can
*
* On destruction, a new call to fetchNext() is queued, so that
* the queue continues loading. Calling release() before the
* destructor skips the fetchNext(), ending the queue-loading.
*/
class FetchNextUnless
{
public:
FetchNextUnless( LoaderQueue* q )
: m_q( q )
{
}
~FetchNextUnless()
{
if ( m_q )
{
QMetaObject::invokeMethod( m_q, "fetchNext", Qt::QueuedConnection );
}
}
void release() { m_q = nullptr; }
private:
LoaderQueue* m_q = nullptr;
};
SourceItem
SourceItem::makeSourceItem( const QString& groupsUrl, const QVariantMap& configurationMap )
{
if ( groupsUrl == QStringLiteral( "local" ) )
{
return SourceItem { QUrl(), configurationMap.value( "groups" ).toList() };
}
else
{
return SourceItem { QUrl { groupsUrl }, QVariantList() };
}
}
LoaderQueue::LoaderQueue( Config* parent )
: QObject( parent )
, m_config( parent )
{
}
void
LoaderQueue::append( SourceItem&& i )
{
m_queue.append( std::move( i ) );
}
void
LoaderQueue::load()
{
QMetaObject::invokeMethod( this, "fetchNext", Qt::QueuedConnection );
}
void
LoaderQueue::fetchNext()
{
if ( m_queue.isEmpty() )
{
m_config->setStatus( Config::Status::FailedBadData );
emit done();
return;
}
auto source = m_queue.takeFirst();
if ( source.isLocal() )
{
m_config->loadGroupList( source.data );
emit done();
}
else
{
fetch( source.url );
}
}
void
LoaderQueue::fetch( const QUrl& url )
{
FetchNextUnless next( this );
if ( !url.isValid() )
{
m_config->setStatus( Config::Status::FailedBadConfiguration );
cDebug() << "Invalid URL" << url;
return;
}
using namespace CalamaresUtils::Network;
cDebug() << "NetInstall loading groups from" << url;
QNetworkReply* reply = Manager::instance().asynchronousGet(
url,
RequestOptions( RequestOptions::FakeUserAgent | RequestOptions::FollowRedirect, std::chrono::seconds( 30 ) ) );
if ( !reply )
{
cDebug() << Logger::SubEntry << "Request failed immediately.";
// If nobody sets a different status, this will remain
m_config->setStatus( Config::Status::FailedBadConfiguration );
}
else
{
// When the network request is done, **then** we might
// do the next item from the queue, so don't call fetchNext() now.
next.release();
m_reply = reply;
connect( reply, &QNetworkReply::finished, this, &LoaderQueue::dataArrived );
}
}
void
LoaderQueue::dataArrived()
{
FetchNextUnless finished( this );
if ( !m_reply || !m_reply->isFinished() )
{
cWarning() << "NetInstall data called too early.";
m_config->setStatus( Config::Status::FailedInternalError );
return;
}
cDebug() << "NetInstall group data received" << m_reply->size() << "bytes from" << m_reply->url();
cqDeleter< QNetworkReply > d { m_reply };
// If m_required is *false* then we still say we're ready
// even if the reply is corrupt or missing.
if ( m_reply->error() != QNetworkReply::NoError )
{
cWarning() << "unable to fetch netinstall package lists.";
cDebug() << Logger::SubEntry << "Netinstall reply error: " << m_reply->error();
cDebug() << Logger::SubEntry << "Request for url: " << m_reply->url().toString()
<< " failed with: " << m_reply->errorString();
m_config->setStatus( Config::Status::FailedNetworkError );
return;
}
QByteArray yamlData = m_reply->readAll();
try
{
YAML::Node groups = YAML::Load( yamlData.constData() );
if ( groups.IsSequence() )
{
finished.release();
m_config->loadGroupList( CalamaresUtils::yamlSequenceToVariant( groups ) );
emit done();
}
else if ( groups.IsMap() )
{
finished.release();
auto map = CalamaresUtils::yamlMapToVariant( groups );
m_config->loadGroupList( map.value( "groups" ).toList() );
emit done();
}
else
{
cWarning() << "NetInstall groups data does not form a sequence.";
}
}
catch ( YAML::Exception& e )
{
CalamaresUtils::explainYamlException( e, yamlData, "netinstall groups data" );
m_config->setStatus( Config::Status::FailedBadData );
}
}

View File

@@ -0,0 +1,77 @@
/*
* SPDX-FileCopyrightText: 2016 Luca Giambonini <almack@chakraos.org>
* SPDX-FileCopyrightText: 2016 Lisa Vitolo <shainer@chakraos.org>
* SPDX-FileCopyrightText: 2017 Kyle Robbertze <krobbertze@gmail.com>
* SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef NETINSTALL_LOADERQUEUE_H
#define NETINSTALL_LOADERQUEUE_H
#include <QQueue>
#include <QUrl>
#include <QVariantList>
class Config;
class QNetworkReply;
/** @brief Data about an entry in *groupsUrl*
*
* This can be a specific URL, or "local" which uses data stored
* in the configuration file itself.
*/
struct SourceItem
{
QUrl url;
QVariantList data;
bool isUrl() const { return url.isValid(); }
bool isLocal() const { return !data.isEmpty(); }
bool isValid() const { return isUrl() || isLocal(); }
/** @brief Create a SourceItem
*
* If the @p groupsUrl is @c "local" then the *groups* key in
* the @p configurationMap is used as the source; otherwise the
* string is used as an actual URL.
*/
static SourceItem makeSourceItem( const QString& groupsUrl, const QVariantMap& configurationMap );
};
/** @brief Queue of source items to load
*
* Queue things up by calling append() and then kick things off
* by calling load(). This will try to load the items, in order;
* the first one that succeeds will end the loading process.
*
* Signal done() is emitted when done (also when all of the items fail).
*/
class LoaderQueue : public QObject
{
Q_OBJECT
public:
LoaderQueue( Config* parent );
void append( SourceItem&& i );
int count() const { return m_queue.count(); }
public Q_SLOTS:
void load();
void fetchNext();
void fetch( const QUrl& url );
void dataArrived();
Q_SIGNALS:
void done();
private:
QQueue< SourceItem > m_queue;
Config* m_config = nullptr;
QNetworkReply* m_reply = nullptr;
};
#endif

View File

@@ -33,40 +33,16 @@ NetInstallPage::NetInstallPage( Config* c, QWidget* parent )
ui->setupUi( this );
ui->groupswidget->header()->setSectionResizeMode( QHeaderView::ResizeToContents );
ui->groupswidget->setModel( c->model() );
connect( c, &Config::statusChanged, this, &NetInstallPage::setStatus );
connect( c, &Config::statusChanged, ui->netinst_status, &QLabel::setText );
connect( c, &Config::titleLabelChanged, [ui = this->ui]( const QString title ) {
ui->label->setVisible( !title.isEmpty() );
ui->label->setText( title );
} );
connect( c, &Config::statusReady, this, &NetInstallPage::expandGroups );
setPageTitle( nullptr );
CALAMARES_RETRANSLATE_SLOT( &NetInstallPage::retranslate )
}
NetInstallPage::~NetInstallPage() {}
void
NetInstallPage::setPageTitle( CalamaresUtils::Locale::TranslatedString* t )
{
m_title.reset( t );
if ( !m_title )
{
ui->label->hide();
}
else
{
ui->label->show();
}
retranslate();
}
void
NetInstallPage::retranslate()
{
if ( m_title )
{
ui->label->setText( m_title->get() ); // That's get() on the TranslatedString
}
ui->netinst_status->setText( m_config->status() );
}
void
NetInstallPage::expandGroups()
{
@@ -82,12 +58,6 @@ NetInstallPage::expandGroups()
}
}
void
NetInstallPage::setStatus( QString s )
{
ui->netinst_status->setText( s );
}
void
NetInstallPage::onActivate()
{

View File

@@ -37,23 +37,8 @@ public:
NetInstallPage( Config* config, QWidget* parent = nullptr );
~NetInstallPage() override;
/** @brief Sets the page title
*
* In situations where there is more than one netinstall page,
* or you want some explanatory title above the treeview,
* set the page title. This page takes ownership of the
* TranslatedString object.
*
* Set to nullptr to remove the title.
*/
void setPageTitle( CalamaresUtils::Locale::TranslatedString* );
void onActivate();
public slots:
void retranslate();
void setStatus( QString s );
/** @brief Expand entries that should be pre-expanded.
*
* Follows the *expanded* key / the startExpanded field in the
@@ -64,8 +49,6 @@ public slots:
private:
Config* m_config;
Ui::Page_NetInst* ui;
std::unique_ptr< CalamaresUtils::Locale::TranslatedString > m_title; // Above the treeview
};
#endif // NETINSTALLPAGE_H

View File

@@ -11,12 +11,6 @@
#include "NetInstallViewStep.h"
#include "GlobalStorage.h"
#include "JobQueue.h"
#include "utils/Logger.h"
#include "utils/Variant.h"
#include "NetInstallPage.h"
CALAMARES_PLUGIN_FACTORY_DEFINITION( NetInstallViewStepFactory, registerPlugin< NetInstallViewStep >(); )
@@ -24,7 +18,6 @@ CALAMARES_PLUGIN_FACTORY_DEFINITION( NetInstallViewStepFactory, registerPlugin<
NetInstallViewStep::NetInstallViewStep( QObject* parent )
: Calamares::ViewStep( parent )
, m_widget( new NetInstallPage( &m_config ) )
, m_sidebarLabel( nullptr )
, m_nextEnabled( false )
{
connect( &m_config, &Config::statusReady, this, &NetInstallViewStep::nextIsReady );
@@ -37,20 +30,22 @@ NetInstallViewStep::~NetInstallViewStep()
{
m_widget->deleteLater();
}
delete m_sidebarLabel;
}
QString
NetInstallViewStep::prettyName() const
{
return m_sidebarLabel ? m_sidebarLabel->get() : tr( "Package selection" );
return m_config.sidebarLabel();
#if defined( TABLE_OF_TRANSLATIONS )
__builtin_unreachable();
// This is a table of "standard" labels for this module. If you use them
// in the label: sidebar: section of the config file, the existing
// translations can be used.
//
// These translations still live here, even though the lookup
// code is in the Config class.
tr( "Package selection" );
tr( "Office software" );
tr( "Office package" );
@@ -125,70 +120,7 @@ NetInstallViewStep::onActivate()
void
NetInstallViewStep::onLeave()
{
auto packages = m_config.model()->getPackages();
cDebug() << "Netinstall: Processing" << packages.length() << "packages.";
static const char PACKAGEOP[] = "packageOperations";
// Check if there's already a PACAKGEOP entry in GS, and if so we'll
// extend that one (overwriting the value in GS at the end of this method)
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
QVariantList packageOperations = gs->contains( PACKAGEOP ) ? gs->value( PACKAGEOP ).toList() : QVariantList();
cDebug() << Logger::SubEntry << "Existing package operations length" << packageOperations.length();
// Clear out existing operations for this module, going backwards:
// Sometimes we remove an item, and we don't want the index to
// fall off the end of the list.
bool somethingRemoved = false;
for ( int index = packageOperations.length() - 1; 0 <= index; index-- )
{
const QVariantMap op = packageOperations.at( index ).toMap();
if ( op.contains( "source" ) && op.value( "source" ).toString() == moduleInstanceKey().toString() )
{
cDebug() << Logger::SubEntry << "Removing existing operations for" << moduleInstanceKey();
packageOperations.removeAt( index );
somethingRemoved = true;
}
}
// This netinstall module may add two sub-steps to the packageOperations,
// one for installing and one for try-installing.
QVariantList installPackages;
QVariantList tryInstallPackages;
for ( const auto& package : packages )
{
if ( package->isCritical() )
{
installPackages.append( package->toOperation() );
}
else
{
tryInstallPackages.append( package->toOperation() );
}
}
if ( !installPackages.empty() )
{
QVariantMap op;
op.insert( "install", QVariant( installPackages ) );
op.insert( "source", moduleInstanceKey().toString() );
packageOperations.append( op );
cDebug() << Logger::SubEntry << installPackages.length() << "critical packages.";
}
if ( !tryInstallPackages.empty() )
{
QVariantMap op;
op.insert( "try_install", QVariant( tryInstallPackages ) );
op.insert( "source", moduleInstanceKey().toString() );
packageOperations.append( op );
cDebug() << Logger::SubEntry << tryInstallPackages.length() << "non-critical packages.";
}
if ( somethingRemoved || !packageOperations.isEmpty() )
{
gs->insert( PACKAGEOP, packageOperations );
}
m_config.finalizeGlobalStorage( moduleInstanceKey() );
}
void
@@ -201,35 +133,5 @@ NetInstallViewStep::nextIsReady()
void
NetInstallViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{
m_config.setRequired( CalamaresUtils::getBool( configurationMap, "required", false ) );
QString groupsUrl = CalamaresUtils::getString( configurationMap, "groupsUrl" );
if ( !groupsUrl.isEmpty() )
{
// Keep putting groupsUrl into the global storage,
// even though it's no longer used for in-module data-passing.
Calamares::JobQueue::instance()->globalStorage()->insert( "groupsUrl", groupsUrl );
if ( groupsUrl == QStringLiteral( "local" ) )
{
QVariantList l = configurationMap.value( "groups" ).toList();
m_config.loadGroupList( l );
}
else
{
m_config.loadGroupList( groupsUrl );
}
}
bool bogus = false;
auto label = CalamaresUtils::getSubMap( configurationMap, "label", bogus );
if ( label.contains( "sidebar" ) )
{
m_sidebarLabel = new CalamaresUtils::Locale::TranslatedString( label, "sidebar", metaObject()->className() );
}
if ( label.contains( "title" ) )
{
m_widget->setPageTitle(
new CalamaresUtils::Locale::TranslatedString( label, "title", metaObject()->className() ) );
}
m_config.setConfigurationMap( configurationMap );
}

View File

@@ -14,7 +14,6 @@
#include "Config.h"
#include "DllMacro.h"
#include "locale/TranslatableConfiguration.h"
#include "utils/PluginFactory.h"
#include "viewpages/ViewStep.h"
@@ -56,7 +55,6 @@ private:
Config m_config;
NetInstallPage* m_widget;
CalamaresUtils::Locale::TranslatedString* m_sidebarLabel; // As it appears in the sidebar
bool m_nextEnabled = false;
};

View File

@@ -32,20 +32,21 @@
# This module supports multiple instances through the *label* key,
# which allows you to distinguish them in the UI.
---
# 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), e.g.:
# ```
# groupsUrl: http://example.org/netinstall.php
# ```
# or it can be a locally installed file:
# ```
# groupsUrl: file:///usr/share/calamares/netinstall.yaml
# ```
# or it can be the special-case literal string "local":
# ```
# groupsUrl: local
# ```
# The *groupsUrl* determines where the data for the netinstall groups-and-
# packages comes from. The value of the key may be:
#
# - a single string (this is treated as a list with just that string in it)
# - a list of strings
#
# Each string is treated as a URL (see below for special cases. The
# list is examined **in order** and each URL is tried in turn. The
# first URL to load successfully -- even if it yields 0 packages --
# ends the process. This allows using a network URL and a (fallback)
# local URL for package lists, or for using multiple mirrors of
# netinstall data.
#
# The URL must point to a YAML file that follows the format described
# below at the key *groups* -- except for the special case URL "local".
# Note that the contents of the groups file is the **important**
# part of the configuration of this module. It specifies what
# groups and packages the user may select (and so what commands are to
@@ -59,12 +60,27 @@
# must have a list-of-groups as value; if the file does not have
# a top-level key *groups*, then the file must contain only a list of groups.
#
# As a special case, setting *groupsUrl* to the literal string
# `local` means that the data is obtained from **this** config
# file, under the key *groups*.
# Each item in the list *groupsUrl* may be:
# - A remote URL like `http://example.org/netinstall.php`
# - A local file URL like `file:///usr/share/calamares/netinstall.yaml`
# - The special-case literal string `local`
#
# Non-special case URLs are loaded as YAML; if the load succeeds, then
# they are interpreted like the *groups* key below. The special case
# `local` loads the data directly from **this** file.
#
groupsUrl: local
# Alternate form:
# groupsUrl: [ local ]
# Net-based package list, with fallback to local file
# groupsUrl:
# - http://example.com/calamares/netinstall.yaml
# - file:///etc/calamares/modules/netinstall.yaml
# If the installation can proceed without netinstall (e.g. the Live CD
# can create a working installed system, but netinstall is preferred
# to bring it up-to-date or extend functionality) leave this set to

View File

@@ -29,7 +29,7 @@ public:
{
m_ui->setupUi( this );
CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); )
CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); );
}
~OEMPage() override;

View File

@@ -28,7 +28,7 @@ PackageChooserPage::PackageChooserPage( PackageChooserMode mode, QWidget* parent
m_introduction.screenshot = QPixmap( QStringLiteral( ":/images/no-selection.png" ) );
ui->setupUi( this );
CALAMARES_RETRANSLATE( updateLabels(); )
CALAMARES_RETRANSLATE( updateLabels(); );
switch ( mode )
{

View File

@@ -53,7 +53,7 @@ BootInfoWidget::BootInfoWidget( QWidget* parent )
m_bootIcon->setPalette( palette );
m_bootLabel->setPalette( palette );
CALAMARES_RETRANSLATE( retranslateUi(); )
CALAMARES_RETRANSLATE( retranslateUi(); );
}
void

View File

@@ -119,7 +119,7 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent )
// Drive selector + preview
CALAMARES_RETRANSLATE( retranslateUi( this ); m_drivesLabel->setText( tr( "Select storage de&vice:" ) );
m_previewBeforeLabel->setText( tr( "Current:" ) );
m_previewAfterLabel->setText( tr( "After:" ) ); )
m_previewAfterLabel->setText( tr( "After:" ) ); );
m_previewBeforeFrame->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
m_previewAfterFrame->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
@@ -298,7 +298,7 @@ ChoicePage::setupChoices()
CALAMARES_RETRANSLATE( m_somethingElseButton->setText( tr( "<strong>Manual partitioning</strong><br/>"
"You can create or resize partitions yourself." ) );
updateSwapChoicesTr( m_eraseSwapChoiceComboBox ); )
updateSwapChoicesTr( m_eraseSwapChoiceComboBox ); );
}
@@ -1303,7 +1303,7 @@ ChoicePage::setupActions()
m_replaceButton->setText( tr( "<strong>Replace a partition</strong><br/>"
"Replaces a partition with %1." )
.arg( Calamares::Branding::instance()->shortVersionedName() ) ); )
.arg( Calamares::Branding::instance()->shortVersionedName() ) ); );
m_replaceButton->hide();
m_alongsideButton->hide();
@@ -1337,7 +1337,7 @@ ChoicePage::setupActions()
m_replaceButton->setText( tr( "<strong>Replace a partition</strong><br/>"
"Replaces a partition with %1." )
.arg( Calamares::Branding::instance()->shortVersionedName() ) ); )
.arg( Calamares::Branding::instance()->shortVersionedName() ) ); );
}
else
{
@@ -1358,7 +1358,7 @@ ChoicePage::setupActions()
m_replaceButton->setText( tr( "<strong>Replace a partition</strong><br/>"
"Replaces a partition with %1." )
.arg( Calamares::Branding::instance()->shortVersionedName() ) ); )
.arg( Calamares::Branding::instance()->shortVersionedName() ) ); );
}
}
else
@@ -1383,7 +1383,7 @@ ChoicePage::setupActions()
m_replaceButton->setText( tr( "<strong>Replace a partition</strong><br/>"
"Replaces a partition with %1." )
.arg( Calamares::Branding::instance()->shortVersionedName() ) ); )
.arg( Calamares::Branding::instance()->shortVersionedName() ) ); );
}
#ifdef DEBUG_PARTITION_UNSAFE

View File

@@ -54,7 +54,7 @@ DeviceInfoWidget::DeviceInfoWidget( QWidget* parent )
m_ptIcon->setPalette( palette );
m_ptLabel->setPalette( palette );
CALAMARES_RETRANSLATE_SLOT( &DeviceInfoWidget::retranslateUi )
CALAMARES_RETRANSLATE_SLOT( &DeviceInfoWidget::retranslateUi );
}

View File

@@ -35,7 +35,7 @@ EncryptWidget::EncryptWidget( QWidget* parent )
setFixedHeight( m_ui->m_passphraseLineEdit->height() ); // Avoid jumping up and down
updateState();
CALAMARES_RETRANSLATE_SLOT( &EncryptWidget::retranslate )
CALAMARES_RETRANSLATE_SLOT( &EncryptWidget::retranslate );
}

View File

@@ -117,7 +117,7 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent )
m_ui->label_3->hide();
}
CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); )
CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); );
}
PartitionPage::~PartitionPage() {}

View File

@@ -67,7 +67,7 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
m_waitingWidget = new WaitingWidget( QString() );
m_widget->addWidget( m_waitingWidget );
CALAMARES_RETRANSLATE( m_waitingWidget->setText( tr( "Gathering system information..." ) ); )
CALAMARES_RETRANSLATE( m_waitingWidget->setText( tr( "Gathering system information..." ) ); );
m_core = new PartitionCoreModule( this ); // Unusable before init is complete!
// We're not done loading, but we need the configuration map first.

View File

@@ -50,7 +50,7 @@ ReplaceWidget::ReplaceWidget( PartitionCoreModule* core, QComboBox* devicesCombo
updateFromCurrentDevice( devicesComboBox );
} );
CALAMARES_RETRANSLATE( onPartitionSelected(); )
CALAMARES_RETRANSLATE( onPartitionSelected(); );
}

View File

@@ -85,7 +85,7 @@ PlasmaLnfPage::PlasmaLnfPage( Config* config, QWidget* parent )
"You can also skip this step and configure the look-and-feel "
"once the system is installed. Clicking on a look-and-feel "
"selection will give you a live preview of that look-and-feel." ) );
} )
} );
auto* view = new QListView( this );
view->setModel( m_config->themeModel() );

View File

@@ -48,7 +48,7 @@ SummaryPage::SummaryPage( const SummaryViewStep* thisViewStep, QWidget* parent )
headerLabel->setText( tr( "This is an overview of what will happen once you start "
"the setup procedure." ) );
else headerLabel->setText( tr( "This is an overview of what will happen once you start "
"the install procedure." ) ); )
"the install procedure." ) ); );
layout->addWidget( headerLabel );
layout->addWidget( m_scrollArea );
m_scrollArea->setWidgetResizable( true );

View File

@@ -28,7 +28,7 @@ TrackingPage::TrackingPage( Config* config, QWidget* parent )
, ui( new Ui::TrackingPage )
{
ui->setupUi( this );
CALAMARES_RETRANSLATE_SLOT( &TrackingPage::retranslate )
CALAMARES_RETRANSLATE_SLOT( &TrackingPage::retranslate );
ui->noneCheckBox->setChecked( true );
ui->noneCheckBox->setEnabled( false );

View File

@@ -59,11 +59,11 @@ updateGSAutoLogin( bool doAutoLogin, const QString& login )
if ( doAutoLogin && !login.isEmpty() )
{
gs->insert( "autologinUser", login );
gs->insert( "autoLoginUser", login );
}
else
{
gs->remove( "autologinUser" );
gs->remove( "autoLoginUser" );
}
if ( login.isEmpty() )
@@ -142,13 +142,13 @@ insertInGlobalStorage( const QString& key, const QString& group )
}
void
Config::setAutologinGroup( const QString& group )
Config::setAutoLoginGroup( const QString& group )
{
if ( group != m_autologinGroup )
if ( group != m_autoLoginGroup )
{
m_autologinGroup = group;
insertInGlobalStorage( QStringLiteral( "autologinGroup" ), group );
emit autologinGroupChanged( group );
m_autoLoginGroup = group;
insertInGlobalStorage( QStringLiteral( "autoLoginGroup" ), group );
emit autoLoginGroupChanged( group );
}
}
@@ -162,9 +162,9 @@ Config::groupsForThisUser() const
{
l << g.name();
}
if ( doAutoLogin() && !autologinGroup().isEmpty() )
if ( doAutoLogin() && !autoLoginGroup().isEmpty() )
{
l << autologinGroup();
l << autoLoginGroup();
}
return l;
@@ -814,13 +814,13 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
// Now it might be explicitly set to empty, which is ok
setUserShell( shell );
setAutologinGroup( CalamaresUtils::getString( configurationMap, "autologinGroup" ) );
setAutoLoginGroup( CalamaresUtils::getString( configurationMap, "autoLoginGroup" ) );
setSudoersGroup( CalamaresUtils::getString( configurationMap, "sudoersGroup" ) );
m_hostNameActions = getHostNameActions( configurationMap );
setConfigurationDefaultGroups( configurationMap, m_defaultGroups );
m_doAutoLogin = CalamaresUtils::getBool( configurationMap, "doAutologin", false );
m_doAutoLogin = CalamaresUtils::getBool( configurationMap, "doAutoLogin", false );
m_writeRootPassword = CalamaresUtils::getBool( configurationMap, "setRootPassword", true );
Calamares::JobQueue::instance()->globalStorage()->insert( "setRootPassword", m_writeRootPassword );

View File

@@ -92,7 +92,7 @@ class PLUGINDLLEXPORT Config : public Calamares::ModuleSystem::Config
Q_PROPERTY( QString userShell READ userShell WRITE setUserShell NOTIFY userShellChanged )
Q_PROPERTY( QString autologinGroup READ autologinGroup WRITE setAutologinGroup NOTIFY autologinGroupChanged )
Q_PROPERTY( QString autoLoginGroup READ autoLoginGroup WRITE setAutoLoginGroup NOTIFY autoLoginGroupChanged )
Q_PROPERTY( QString sudoersGroup READ sudoersGroup WRITE setSudoersGroup NOTIFY sudoersGroupChanged )
Q_PROPERTY( bool doAutoLogin READ doAutoLogin WRITE setAutoLogin NOTIFY autoLoginChanged )
@@ -185,7 +185,7 @@ public:
QString userShell() const { return m_userShell; }
/// The group of which auto-login users must be a member
QString autologinGroup() const { return m_autologinGroup; }
QString autoLoginGroup() const { return m_autoLoginGroup; }
/// The group of which users who can "sudo" must be a member
QString sudoersGroup() const { return m_sudoersGroup; }
@@ -217,7 +217,7 @@ public:
const QList< GroupDescription >& defaultGroups() const { return m_defaultGroups; }
/** @brief the names of all the groups for the current user
*
* Takes into account defaultGroups and autologin behavior.
* Takes into account defaultGroups and autoLogin behavior.
*/
QStringList groupsForThisUser() const;
@@ -253,8 +253,8 @@ public Q_SLOTS:
*/
void setUserShell( const QString& path );
/// Sets the autologin group; empty is ignored
void setAutologinGroup( const QString& group );
/// Sets the autoLogin group; empty is ignored
void setAutoLoginGroup( const QString& group );
/// Sets the sudoer group; empty is ignored
void setSudoersGroup( const QString& group );
@@ -266,7 +266,7 @@ public Q_SLOTS:
/// Sets the host name (flags it as "custom")
void setHostName( const QString& host );
/// Sets the autologin flag
/// Sets the autoLogin flag
void setAutoLogin( bool b );
/// Set to true to use the user password, unchanged, for root too
@@ -281,7 +281,7 @@ public Q_SLOTS:
signals:
void userShellChanged( const QString& );
void autologinGroupChanged( const QString& );
void autoLoginGroupChanged( const QString& );
void sudoersGroupChanged( const QString& );
void fullNameChanged( const QString& );
void loginNameChanged( const QString& );
@@ -305,7 +305,7 @@ private:
QList< GroupDescription > m_defaultGroups;
QString m_userShell;
QString m_autologinGroup;
QString m_autoLoginGroup;
QString m_sudoersGroup;
QString m_fullName;
QString m_loginName;

View File

@@ -184,11 +184,11 @@ SetupGroupsJob::exec()
tr( "These groups are missing in the target system: %1" ).arg( missingGroups.join( ',' ) ) );
}
if ( m_config->doAutoLogin() && !m_config->autologinGroup().isEmpty() )
if ( m_config->doAutoLogin() && !m_config->autoLoginGroup().isEmpty() )
{
const QString autologinGroup = m_config->autologinGroup();
const QString autoLoginGroup = m_config->autoLoginGroup();
(void)ensureGroupsExistInTarget(
QList< GroupDescription >() << GroupDescription( autologinGroup ), availableGroups, missingGroups );
QList< GroupDescription >() << GroupDescription( autoLoginGroup ), availableGroups, missingGroups );
}
return Calamares::JobResult::ok();

View File

@@ -83,13 +83,13 @@ UserTests::testGetSet()
}
{
const QString al( "autolg" );
QCOMPARE( c.autologinGroup(), QString() );
c.setAutologinGroup( al );
QCOMPARE( c.autologinGroup(), al );
QCOMPARE( c.autoLoginGroup(), QString() );
c.setAutoLoginGroup( al );
QCOMPARE( c.autoLoginGroup(), al );
QVERIFY( !c.doAutoLogin() );
c.setAutoLogin( true );
QVERIFY( c.doAutoLogin() );
QCOMPARE( c.autologinGroup(), al );
QCOMPARE( c.autoLoginGroup(), al );
}
{
const QString su( "sudogrp" );

View File

@@ -140,7 +140,7 @@ UsersPage::UsersPage( Config* config, QWidget* parent )
config, &Config::requireStrongPasswordsChanged, ui->checkBoxRequireStrongPassword, &QCheckBox::setChecked );
}
CALAMARES_RETRANSLATE_SLOT( &UsersPage::retranslate )
CALAMARES_RETRANSLATE_SLOT( &UsersPage::retranslate );
onReuseUserPasswordChanged( m_config->reuseUserPasswordForRoot() );
onFullNameTextEdited( m_config->fullName() );

View File

@@ -88,10 +88,10 @@ UsersViewStep::isAtEnd() const
}
QList< Calamares::job_ptr >
Calamares::JobList
UsersViewStep::jobs() const
{
return m_jobs;
return m_config->createJobs();
}
@@ -108,7 +108,6 @@ UsersViewStep::onActivate()
void
UsersViewStep::onLeave()
{
m_jobs = m_config->createJobs();
m_config->finalizeGlobalStorage();
}

View File

@@ -39,7 +39,7 @@ public:
bool isAtBeginning() const override;
bool isAtEnd() const override;
QList< Calamares::job_ptr > jobs() const override;
Calamares::JobList jobs() const override;
void onActivate() override;
void onLeave() override;
@@ -48,8 +48,6 @@ public:
private:
UsersPage* m_widget;
Calamares::JobList m_jobs;
Config* m_config;
};

View File

@@ -12,16 +12,12 @@
#include "UsersQmlViewStep.h"
#include "SetHostNameJob.h"
#include "SetPasswordJob.h"
#include "GlobalStorage.h"
#include "JobQueue.h"
#include "utils/Logger.h"
#include "utils/NamedEnum.h"
#include "utils/Variant.h"
#include "GlobalStorage.h"
#include "JobQueue.h"
CALAMARES_PLUGIN_FACTORY_DEFINITION( UsersQmlViewStepFactory, registerPlugin< UsersQmlViewStep >(); )
UsersQmlViewStep::UsersQmlViewStep( QObject* parent )
@@ -43,59 +39,41 @@ bool
UsersQmlViewStep::isNextEnabled() const
{
return m_config->isReady();
//return true;
}
bool
UsersQmlViewStep::isBackEnabled() const
{
return true;
}
bool
UsersQmlViewStep::isAtBeginning() const
{
return true;
}
bool
UsersQmlViewStep::isAtEnd() const
{
return true;
}
QList< Calamares::job_ptr >
Calamares::JobList
UsersQmlViewStep::jobs() const
{
return m_jobs;
return m_config->createJobs();
}
void
UsersQmlViewStep::onActivate()
{
//m_config->onActivate();
//QmlViewStep::onActivate();
}
void
UsersQmlViewStep::onLeave()
{
m_jobs = m_config->createJobs();
m_config->finalizeGlobalStorage();
}
void
UsersQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{
m_config->setConfigurationMap( configurationMap );
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
setContextProperty( "Users", m_config );
}

View File

@@ -12,14 +12,14 @@
#ifndef USERSQMLVIEWSTEP_H
#define USERSQMLVIEWSTEP_H
#include <QObject>
#include <utils/PluginFactory.h>
#include <viewpages/QmlViewStep.h>
#include <DllMacro.h>
// Config from users module
#include "Config.h"
#include "DllMacro.h"
#include "utils/PluginFactory.h"
#include "viewpages/QmlViewStep.h"
#include <QObject>
#include <QVariant>
class PLUGINDLLEXPORT UsersQmlViewStep : public Calamares::QmlViewStep
@@ -37,9 +37,8 @@ public:
bool isAtBeginning() const override;
bool isAtEnd() const override;
QList< Calamares::job_ptr > jobs() const override;
Calamares::JobList jobs() const override;
void onActivate() override;
void onLeave() override;
void setConfigurationMap( const QVariantMap& configurationMap ) override;
@@ -48,7 +47,6 @@ public:
private:
Config* m_config;
Calamares::JobList m_jobs;
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( UsersQmlViewStepFactory )

View File

@@ -56,10 +56,12 @@ Kirigami.ScrollablePage {
id: _userNameField
width: parent.width
enabled: config.isEditable("fullName")
placeholderText: qsTr("Your Full Name")
onTextChanged: config.fullNameChanged(text)
background: Rectangle {
text: config.fullName
onTextChanged: config.setFullName(text);
background: Rectangle {
color: "#FBFBFB" // Kirigami.Theme.backgroundColor
radius: 2
opacity: 0.9
@@ -84,9 +86,10 @@ Kirigami.ScrollablePage {
id: _userLoginField
width: parent.width
enabled: config.isEditable("loginName")
placeholderText: qsTr("Login Name")
//text: config.userName
onTextEdited: config.loginNameStatusChanged(text)
text: config.loginName
onTextChanged: config.setLoginName(text)
background: Rectangle {
@@ -124,7 +127,8 @@ Kirigami.ScrollablePage {
width: parent.width
placeholderText: qsTr("Computer Name")
text: config.hostName
onTextEdited: config.hostNameStatusChanged(text)
onTextChanged: config.setHostName(text)
background: Rectangle {
color: "#FBFBFB" // Kirigami.Theme.backgroundColor
@@ -164,10 +168,12 @@ Kirigami.ScrollablePage {
id: _passwordField
width: parent.width / 2 - 10
placeholderText: qsTr("Password")
text: config.userPassword
onTextChanged: config.setUserPassword(text)
echoMode: TextInput.Password
passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase
onTextChanged: config.userPasswordStatusChanged(text, _verificationPasswordField.text)
background: Rectangle {
@@ -183,10 +189,12 @@ Kirigami.ScrollablePage {
id: _verificationPasswordField
width: parent.width / 2 - 10
placeholderText: qsTr("Repeat Password")
text: config.userPasswordSecondary
onTextChanged: config.setUserPasswordSecondary(text)
echoMode: TextInput.Password
passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase
onTextChanged: config.userPasswordSecondaryChanged(_passwordField.text, text)
background: Rectangle {
@@ -211,17 +219,14 @@ Kirigami.ScrollablePage {
CheckBox {
visible: config.allowWeakPasswords
//visible: false
visible: config.permitWeakPasswords
text: qsTr("Validate passwords quality")
checked: config.allowWeakPasswordsDefault
onToggled: config.allowWeakPasswordsDefault = !config.allowWeakPasswordsDefault
checked: config.requireStrongPasswords
onCheckedChanged: config.setRequireStrongPasswords(checked)
}
Label {
visible: config.allowWeakPasswords
//visible: false
visible: config.permitWeakPasswords
width: parent.width
text: qsTr("When this box is checked, password-strength checking is done and you will not be able to use a weak password.")
font.weight: Font.Thin
@@ -230,24 +235,20 @@ Kirigami.ScrollablePage {
}
CheckBox {
text: qsTr("Log in automatically without asking for the password")
checked: config.doAutologin
onToggled: config.doAutologin = !config.doAutologin
checked: config.doAutoLogin
onCheckedChanged: config.setAutoLogin(checked)
}
CheckBox {
id: root
visible: config.doReusePassword
visible: config.writeRootPassword
text: qsTr("Reuse user password as root password")
checked: config.reuseUserPasswordForRoot
//checked: false
onToggled: config.reuseUserPasswordForRoot = !config.reuseUserPasswordForRoot
onCheckedChanged: config.setReuseUserPasswordForRoot(checked)
}
Label {
visible: root.checked
width: parent.width
text: qsTr("Use the same password for the administrator account.")
@@ -277,10 +278,12 @@ Kirigami.ScrollablePage {
id: _rootPasswordField
width: parent.width / 2 -10
placeholderText: qsTr("Root Password")
text: config.rootPassword
onTextChanged: config.setRootPassword(text)
echoMode: TextInput.Password
passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase
onTextChanged: config.rootPasswordChanged(text, _verificationRootPasswordField.text)
background: Rectangle {
@@ -296,10 +299,12 @@ Kirigami.ScrollablePage {
id: _verificationRootPasswordField
width: parent.width / 2 -10
placeholderText: qsTr("Repeat Root Password")
text: config.rootPasswordSecondary
onTextChanged: config.setRootPasswordSecondary(text)
echoMode: TextInput.Password
passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase
onTextChanged: config.rootPasswordSecondaryChanged(_rootPasswordField.text, text)
background: Rectangle {

View File

@@ -30,7 +30,7 @@ Config::Config( QObject* parent )
{
initLanguages();
CALAMARES_RETRANSLATE_SLOT( &Config::retranslate )
CALAMARES_RETRANSLATE_SLOT( &Config::retranslate );
}
void

View File

@@ -75,7 +75,7 @@ WelcomePage::WelcomePage( Config* conf, QWidget* parent )
initLanguages();
CALAMARES_RETRANSLATE_SLOT( &WelcomePage::retranslate )
CALAMARES_RETRANSLATE_SLOT( &WelcomePage::retranslate );
connect( ui->aboutButton, &QPushButton::clicked, this, &WelcomePage::showAboutBox );
connect( Calamares::ModuleManager::instance(),

View File

@@ -34,7 +34,8 @@ CheckerContainer::CheckerContainer( const Calamares::RequirementsModel& model, Q
CalamaresUtils::unmarginLayout( mainLayout );
mainLayout->addWidget( m_waitingWidget );
CALAMARES_RETRANSLATE( if ( m_waitingWidget ) m_waitingWidget->setText( tr( "Gathering system information..." ) ); )
CALAMARES_RETRANSLATE( if ( m_waitingWidget )
m_waitingWidget->setText( tr( "Gathering system information..." ) ); );
}
CheckerContainer::~CheckerContainer()

View File

@@ -107,14 +107,12 @@ GeneralRequirements::checkRequirements()
&& ( availableSize.height() >= CalamaresUtils::windowMinimumHeight );
qint64 requiredStorageB = CalamaresUtils::GiBtoBytes( m_requiredStorageGiB );
cDebug() << "Need at least storage bytes:" << requiredStorageB;
if ( m_entriesToCheck.contains( "storage" ) )
{
enoughStorage = checkEnoughStorage( requiredStorageB );
}
qint64 requiredRamB = CalamaresUtils::GiBtoBytes( m_requiredRamGiB );
cDebug() << "Need at least ram bytes:" << requiredRamB;
if ( m_entriesToCheck.contains( "ram" ) )
{
enoughRam = checkEnoughRam( requiredRamB );
@@ -135,10 +133,18 @@ GeneralRequirements::checkRequirements()
isRoot = checkIsRoot();
}
using TNum = Logger::DebugRow< const char*, qint64 >;
using TR = Logger::DebugRow< const char*, MaybeChecked >;
cDebug() << "GeneralRequirements output:" << TR( "enoughStorage", enoughStorage ) << TR( "enoughRam", enoughRam )
<< TR( "hasPower", hasPower ) << TR( "hasInternet", hasInternet ) << TR( "isRoot", isRoot );
// clang-format off
cDebug() << "GeneralRequirements output:"
<< TNum( "storage", requiredStorageB )
<< TR( "enoughStorage", enoughStorage )
<< TNum( "RAM", requiredRamB )
<< TR( "enoughRam", enoughRam )
<< TR( "hasPower", hasPower )
<< TR( "hasInternet", hasInternet )
<< TR( "isRoot", isRoot );
// clang-format on
Calamares::RequirementsList checkEntries;
foreach ( const QString& entry, m_entriesToCheck )
{

View File

@@ -121,7 +121,7 @@ ResultsListDialog::ResultsListDialog( const Calamares::RequirementsModel& model,
connect( buttonBox, &QDialogButtonBox::clicked, this, &QDialog::close );
CALAMARES_RETRANSLATE_SLOT( &ResultsListDialog::retranslate )
CALAMARES_RETRANSLATE_SLOT( &ResultsListDialog::retranslate );
retranslate(); // Do it now to fill in the texts
}
@@ -216,7 +216,7 @@ ResultsListWidget::ResultsListWidget( const Calamares::RequirementsModel& model,
m_explanation->setAlignment( Qt::AlignCenter );
}
CALAMARES_RETRANSLATE_SLOT( &ResultsListWidget::retranslate )
CALAMARES_RETRANSLATE_SLOT( &ResultsListWidget::retranslate );
retranslate();
}