From 49a584377e8d4fdf14c59b3d5ef8d92af6e5b0c0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 4 Apr 2020 23:10:22 +0200 Subject: [PATCH 01/15] [unpackfs] Refactor counting an entry - This does not have to live in the Operation - Uses only the local imgmountdir (where the entry is mounted) --- src/modules/unpackfs/main.py | 52 +++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index b08315968..354d1c4c9 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -77,6 +77,33 @@ class UnpackEntry: def is_file(self): return self.sourcefs == "file" + def do_count(self, imgmountdir): + fslist = "" + + if self.sourcefs == "squashfs": + if shutil.which("unsquashfs") is None: + utils.warning("Failed to find unsquashfs") + + return (_("Failed to unpack image \"{}\"").format(self.source), + _("Failed to find unsquashfs, make sure you have the squashfs-tools package installed")) + + fslist = subprocess.check_output( + ["unsquashfs", "-l", self.source] + ) + + elif self.sourcefs == "ext4": + fslist = subprocess.check_output( + ["find", imgmountdir, "-type", "f"] + ) + + elif self.is_file(): + # Hasn't been mounted, copy directly; find handles both + # files and directories. + fslist = subprocess.check_output(["find", self.source, "-type", "f"]) + + self.total = len(fslist.splitlines()) + return self.total + ON_POSIX = 'posix' in sys.builtin_module_names @@ -240,30 +267,7 @@ class UnpackOperation: self.mount_image(entry, imgmountdir) - fslist = "" - - if entry.sourcefs == "squashfs": - if shutil.which("unsquashfs") is None: - utils.warning("Failed to find unsquashfs") - - return (_("Failed to unpack image \"{}\"").format(entry.source), - _("Failed to find unsquashfs, make sure you have the squashfs-tools package installed")) - - fslist = subprocess.check_output( - ["unsquashfs", "-l", entry.source] - ) - - elif entry.sourcefs == "ext4": - fslist = subprocess.check_output( - ["find", imgmountdir, "-type", "f"] - ) - - elif entry.is_file(): - # Hasn't been mounted, copy directly; find handles both - # files and directories. - fslist = subprocess.check_output(["find", entry.source, "-type", "f"]) - - entry.total = len(fslist.splitlines()) + entry.do_count(imgmountdir) # Fill in the entry.total self.report_progress() error_msg = self.unpack_image(entry, imgmountdir) From 7e4cb28c1c262ee24ca99a4920e7d204bd50545e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 4 Apr 2020 23:19:08 +0200 Subject: [PATCH 02/15] [unpackfs] Refactor mounting for an entry - The entry knows where it should be mounted, and can remember that - mount_entry() didn't use self, so made no sense as a method of the Operation class --- src/modules/unpackfs/main.py | 72 +++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 354d1c4c9..350a01a69 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -52,7 +52,8 @@ class UnpackEntry: :param sourcefs: :param destination: """ - __slots__ = ['source', 'sourcefs', 'destination', 'copied', 'total', 'exclude', 'excludeFile'] + __slots__ = ['source', 'sourcefs', 'destination', 'copied', 'total', 'exclude', 'excludeFile', + 'mountPoint'] def __init__(self, source, sourcefs, destination): """ @@ -73,6 +74,7 @@ class UnpackEntry: self.excludeFile = None self.copied = 0 self.total = 0 + self.mountPoint = None def is_file(self): return self.sourcefs == "file" @@ -104,6 +106,39 @@ class UnpackEntry: self.total = len(fslist.splitlines()) return self.total + def do_mount(self, base): + """ + Mount given @p entry as loop device underneath @p base + + A *file* entry (e.g. one with *sourcefs* set to *file*) + is not mounted and just ignored. + + :param entry: the entry to mount (source is the important property) + :param imgmountdir: where to mount it + + :returns: None, but throws if the mount failed + """ + imgbasename = os.path.splitext( + os.path.basename(self.source))[0] + imgmountdir = os.path.join(base, imgbasename) + os.makedirs(imgmountdir, exist_ok=True) + + # This is where it *would* go (files bail out before actually mounting) + self.mountPoint = imgmountdir + + if self.is_file(): + return + + if os.path.isdir(self.source): + r = mount(self.source, imgmountdir, "", "--bind") + elif os.path.isfile(self.source): + r = mount(self.source, imgmountdir, self.sourcefs, "loop") + else: # self.source is a device + r = mount(self.source, imgmountdir, self.sourcefs, "") + + if r != 0: + raise subprocess.CalledProcessError(r, "mount") + ON_POSIX = 'posix' in sys.builtin_module_names @@ -260,17 +295,11 @@ class UnpackOperation: try: for entry in self.entries: - imgbasename = os.path.splitext( - os.path.basename(entry.source))[0] - imgmountdir = os.path.join(source_mount_path, imgbasename) - os.makedirs(imgmountdir, exist_ok=True) - - self.mount_image(entry, imgmountdir) - + entry.do_mount(source_mount_path) entry.do_count(imgmountdir) # Fill in the entry.total self.report_progress() - error_msg = self.unpack_image(entry, imgmountdir) + error_msg = self.unpack_image(entry, entry.mountPoint) if error_msg: return (_("Failed to unpack image \"{}\"").format(entry.source), @@ -280,31 +309,6 @@ class UnpackOperation: finally: shutil.rmtree(source_mount_path, ignore_errors=True, onerror=None) - def mount_image(self, entry, imgmountdir): - """ - Mount given @p entry as loop device on @p imgmountdir. - - A *file* entry (e.g. one with *sourcefs* set to *file*) - is not mounted and just ignored. - - :param entry: the entry to mount (source is the important property) - :param imgmountdir: where to mount it - - :returns: None, but throws if the mount failed - """ - if entry.is_file(): - return - - if os.path.isdir(entry.source): - r = mount(entry.source, imgmountdir, "", "--bind") - elif os.path.isfile(entry.source): - r = mount(entry.source, imgmountdir, entry.sourcefs, "loop") - else: # entry.source is a device - r = mount(entry.source, imgmountdir, entry.sourcefs, "") - - if r != 0: - raise subprocess.CalledProcessError(r, "mount") - def unpack_image(self, entry, imgmountdir): """ From 9b14bf6826655e295b2540832e9debc964f31e7b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 4 Apr 2020 23:42:20 +0200 Subject: [PATCH 03/15] [unpackfs] Rework progress reporting - Slice overall progress into chunks, with each chunk of equal size (as long as we have no overall count information) and place the progress of the current chunk into its own slice. --- src/modules/unpackfs/main.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 350a01a69..6398109ea 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -269,19 +269,27 @@ class UnpackOperation: """ progress = float(0) - done = 0 + done = 0 # Done and total apply to the entry now-unpacking total = 0 - complete = 0 + complete = 0 # This many are already finished for entry in self.entries: if entry.total == 0: + # Total 0 hasn't counted yet continue - total += entry.total - done += entry.copied if entry.total == entry.copied: complete += 1 + else: + # There is at most *one* entry in-progress + total = entry.total + done = entry.copied + break if done > 0 and total > 0: - progress = 0.05 + (0.90 * done / total) + (0.05 * complete / len(self.entries)) + # Pretend that each entry represents an equal amount of work; + # the complete ones count as 100% of their own fraction + # (and have *not* been counted in total or done), while + # total/done represents the fraction of the current fraction. + progress = ( 1.0 * complete / len(self.entries) ) + ( ( 1.0 / len(self.entries) ) * done / total ) job.setprogress(progress) From 391bd1098faeeb3583f31edee9cd831e6695dbd7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 10:48:34 +0200 Subject: [PATCH 04/15] [unpackfs] An entry knows where it is mounted - `imgmountdir` no longer defined in `UnpackOperation.run()` --- src/modules/unpackfs/main.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 6398109ea..be0dec959 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -79,7 +79,10 @@ class UnpackEntry: def is_file(self): return self.sourcefs == "file" - def do_count(self, imgmountdir): + def do_count(self): + """ + Counts the number of files this entry has. + """ fslist = "" if self.sourcefs == "squashfs": @@ -95,7 +98,7 @@ class UnpackEntry: elif self.sourcefs == "ext4": fslist = subprocess.check_output( - ["find", imgmountdir, "-type", "f"] + ["find", self.mountPoint, "-type", "f"] ) elif self.is_file(): @@ -113,8 +116,7 @@ class UnpackEntry: A *file* entry (e.g. one with *sourcefs* set to *file*) is not mounted and just ignored. - :param entry: the entry to mount (source is the important property) - :param imgmountdir: where to mount it + :param base: directory to place all the mounts in. :returns: None, but throws if the mount failed """ @@ -304,7 +306,7 @@ class UnpackOperation: try: for entry in self.entries: entry.do_mount(source_mount_path) - entry.do_count(imgmountdir) # Fill in the entry.total + entry.do_count() # Fill in the entry.total self.report_progress() error_msg = self.unpack_image(entry, entry.mountPoint) From 21f060c3fd506bf733ae19da9c1b3f587a50799b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 10:52:32 +0200 Subject: [PATCH 05/15] [unpackfs] Check for squashfs tools earlier --- src/modules/unpackfs/main.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index be0dec959..3084484b6 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -86,12 +86,6 @@ class UnpackEntry: fslist = "" if self.sourcefs == "squashfs": - if shutil.which("unsquashfs") is None: - utils.warning("Failed to find unsquashfs") - - return (_("Failed to unpack image \"{}\"").format(self.source), - _("Failed to find unsquashfs, make sure you have the squashfs-tools package installed")) - fslist = subprocess.check_output( ["unsquashfs", "-l", self.source] ) @@ -397,6 +391,9 @@ def run(): supported_filesystems = get_supported_filesystems() # Bail out before we start when there are obvious problems + # - unsupported filesystems + # - non-existent sources + # - missing tools for specific FS for entry in job.configuration["unpack"]: source = os.path.abspath(entry["source"]) sourcefs = entry["sourcefs"] @@ -410,6 +407,12 @@ def run(): utils.warning("The source filesystem \"{}\" does not exist".format(source)) return (_("Bad unsquash configuration"), _("The source filesystem \"{}\" does not exist").format(source)) + if sourcefs == "squashfs": + if shutil.which("unsquashfs") is None: + utils.warning("Failed to find unsquashfs") + + return (_("Failed to unpack image \"{}\"").format(self.source), + _("Failed to find unsquashfs, make sure you have the squashfs-tools package installed")) unpack = list() From 88c75fb5dc70fe3ab0a1aadbc241ea6df4bac177 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 11:08:16 +0200 Subject: [PATCH 06/15] [libcalamares] Simplify program-arguments creation --- src/libcalamares/utils/CalamaresUtilsSystem.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index c464e93f6..9e3cad4f9 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -137,7 +137,7 @@ System::runCommand( System::RunLocation location, QProcess process; QString program; - QStringList arguments; + QStringList arguments( args ); if ( location == System::RunLocation::RunInTarget ) { @@ -149,13 +149,11 @@ System::runCommand( System::RunLocation location, } program = "chroot"; - arguments = QStringList( { destDir } ); - arguments << args; + arguments.prepend( destDir ); } else { program = "env"; - arguments << args; } process.setProgram( program ); From 752399ca6b7d8421901e978abb31a36c3fee72ff Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 11:15:10 +0200 Subject: [PATCH 07/15] [libcalamares] Error out on empty command - an empty command isn't going to work (although it might successfully run chroot or env in the target system, that's not useful) - while here, move variable declarations closer to their use. --- src/libcalamares/utils/CalamaresUtilsSystem.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index 9e3cad4f9..d2f331919 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -124,7 +124,11 @@ System::runCommand( System::RunLocation location, const QString& stdInput, std::chrono::seconds timeoutSec ) { - QString output; + if ( args.isEmpty() ) + { + cWarning() << "Cannot run an empty program list"; + return ProcessResult::Code::FailedToStart; + } Calamares::GlobalStorage* gs = Calamares::JobQueue::instance() ? Calamares::JobQueue::instance()->globalStorage() : nullptr; @@ -135,7 +139,6 @@ System::runCommand( System::RunLocation location, return ProcessResult::Code::NoWorkingDirectory; } - QProcess process; QString program; QStringList arguments( args ); @@ -156,6 +159,7 @@ System::runCommand( System::RunLocation location, program = "env"; } + QProcess process; process.setProgram( program ); process.setArguments( arguments ); process.setProcessChannelMode( QProcess::MergedChannels ); @@ -195,7 +199,7 @@ System::runCommand( System::RunLocation location, return ProcessResult::Code::TimedOut; } - output.append( QString::fromLocal8Bit( process.readAllStandardOutput() ).trimmed() ); + QString output = QString::fromLocal8Bit( process.readAllStandardOutput() ).trimmed(); if ( process.exitStatus() == QProcess::CrashExit ) { From 4abb87ccca33e8110315fa791df5c39e0012634d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 11:17:47 +0200 Subject: [PATCH 08/15] [libcalamares] Improve reporting on process failures - In production, cDebug() might not show up, so the log will not contain the lines saying what program is being run; - Errors should at least mention the program name, but "env" or "chroot" is not useful, so pull that from *args*, which is the command we actually want to run. --- src/libcalamares/utils/CalamaresUtilsSystem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index d2f331919..f70de8ea2 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -181,7 +181,7 @@ System::runCommand( System::RunLocation location, process.start(); if ( !process.waitForStarted() ) { - cWarning() << "Process failed to start" << process.error(); + cWarning() << "Process" << args.first() << "failed to start" << process.error(); return ProcessResult::Code::FailedToStart; } @@ -195,7 +195,7 @@ System::runCommand( System::RunLocation location, ? ( static_cast< int >( std::chrono::milliseconds( timeoutSec ).count() ) ) : -1 ) ) { - cWarning().noquote().nospace() << "Timed out. Output so far:\n" << process.readAllStandardOutput(); + cWarning().noquote().nospace() << "Process" << args.first() << "timed out. Output so far:\n" << process.readAllStandardOutput(); return ProcessResult::Code::TimedOut; } @@ -203,7 +203,7 @@ System::runCommand( System::RunLocation location, if ( process.exitStatus() == QProcess::CrashExit ) { - cWarning().noquote().nospace() << "Process crashed. Output so far:\n" << output; + cWarning().noquote().nospace() << "Process" << args.first() << "crashed. Output so far:\n" << output; return ProcessResult::Code::Crashed; } From f33c737e99e34f12f1de67d929edea87e341ff12 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 11:56:39 +0200 Subject: [PATCH 09/15] [libcalamares] Pretty debug formatting - toggle nospace() and noquote() part-way through the line, so that they only affect the output obtained from the external command. --- src/libcalamares/utils/CalamaresUtilsSystem.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index f70de8ea2..651ac2c1e 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -195,7 +195,7 @@ System::runCommand( System::RunLocation location, ? ( static_cast< int >( std::chrono::milliseconds( timeoutSec ).count() ) ) : -1 ) ) { - cWarning().noquote().nospace() << "Process" << args.first() << "timed out. Output so far:\n" << process.readAllStandardOutput(); + ( cWarning() << "Process" << args.first() << "timed out after" << timeoutSec.count() << "s. Output so far:\n" ).noquote().nospace() << process.readAllStandardOutput(); return ProcessResult::Code::TimedOut; } @@ -203,7 +203,7 @@ System::runCommand( System::RunLocation location, if ( process.exitStatus() == QProcess::CrashExit ) { - cWarning().noquote().nospace() << "Process" << args.first() << "crashed. Output so far:\n" << output; + ( cWarning() << "Process" << args.first() << "crashed. Output so far:\n" ).noquote().nospace() << output; return ProcessResult::Code::Crashed; } @@ -212,8 +212,7 @@ System::runCommand( System::RunLocation location, bool showDebug = ( !Calamares::Settings::instance() ) || ( Calamares::Settings::instance()->debugMode() ); if ( ( r != 0 ) || showDebug ) { - cDebug() << "Target cmd:" << RedactedList( args ); - cDebug().noquote().nospace() << "Target output:\n" << output; + ( cDebug() << "Target cmd:" << RedactedList( args ) << "output:\n" ).noquote().nospace() << output; } return ProcessResult( r, output ); } From af0d04d52357a8f05920a4859c0a19f739c1fc00 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 16:54:02 +0200 Subject: [PATCH 10/15] [unpackfs] Report progress more carefully - Mark entries as totally-done - Show a message when counting an entry --- src/modules/unpackfs/main.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 3084484b6..1a4059848 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -43,6 +43,11 @@ _ = gettext.translation("calamares-python", def pretty_name(): return _("Filling up filesystems.") +# This is going to be changed from various methods +status = pretty_name() + +def pretty_status_message(): + return status class UnpackEntry: """ @@ -229,6 +234,9 @@ def file_copy(source, entry, progress_cb): process.wait() progress_cb(num_files_copied, num_files_total_local) # Push towards 100% + # Mark this entry as really done + entry.copied = entry.total + # 23 is the return code rsync returns if it cannot write extended # attributes (with -X) because the target file system does not support it, # e.g., the FAT EFI system partition. We need -X because distributions @@ -280,13 +288,15 @@ class UnpackOperation: done = entry.copied break - if done > 0 and total > 0: + if total > 0: # Pretend that each entry represents an equal amount of work; # the complete ones count as 100% of their own fraction # (and have *not* been counted in total or done), while # total/done represents the fraction of the current fraction. - progress = ( 1.0 * complete / len(self.entries) ) + ( ( 1.0 / len(self.entries) ) * done / total ) + progress = ( ( 1.0 * complete ) / len(self.entries) ) + ( ( 1.0 / len(self.entries) ) * ( 1.0 * done / total ) ) + global status + status = _("Unpacking image {}/{}, file {}/{}").format((complete+1),len(self.entries),done, total) job.setprogress(progress) def run(self): @@ -295,10 +305,14 @@ class UnpackOperation: :return: """ + global status source_mount_path = tempfile.mkdtemp() try: + job.setprogress(0.0) for entry in self.entries: + status = _("Starting to unpack {}").format(entry.source) + job.setprogress(0.0) entry.do_mount(source_mount_path) entry.do_count() # Fill in the entry.total From facf5af589d0c9f60270929715f7cefb905d5ae1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 17:06:53 +0200 Subject: [PATCH 11/15] [unpackfs] Don't jump back in progress while counting --- src/modules/unpackfs/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 1a4059848..50ee5b1a0 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -309,10 +309,10 @@ class UnpackOperation: source_mount_path = tempfile.mkdtemp() try: - job.setprogress(0.0) + complete = 0 for entry in self.entries: status = _("Starting to unpack {}").format(entry.source) - job.setprogress(0.0) + job.setprogress( ( 1.0 * complete ) / len(self.entries) ) entry.do_mount(source_mount_path) entry.do_count() # Fill in the entry.total From bea41465e273cd945b6f59a6be8b835786c85f3d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 17:08:27 +0200 Subject: [PATCH 12/15] [unpackfs] Update progress around every 1% --- src/modules/unpackfs/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 50ee5b1a0..a82cab61e 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -202,6 +202,9 @@ def file_copy(source, entry, progress_cb): # last_num_files_copied trails num_files_copied, and whenever at least 100 more # files have been copied, progress is reported and last_num_files_copied is updated. last_num_files_copied = 0 + file_count_chunk = entry.total / 100 + if file_count_chunk < 100: + file_count_chunk = 100 for line in iter(process.stdout.readline, b''): # rsync outputs progress in parentheses. Each line will have an @@ -226,8 +229,8 @@ def file_copy(source, entry, progress_cb): # adjusting the offset so that progressbar can be continuesly drawn num_files_copied = num_files_total_local - num_files_remaining - # I guess we're updating every 100 files... - if num_files_copied - last_num_files_copied >= 100: + # Update about once every 1% of this entry + if num_files_copied - last_num_files_copied >= file_count_chunk: last_num_files_copied = num_files_copied progress_cb(num_files_copied, num_files_total_local) From 129bfa3a2e58d41d681e8206d6f4a11278a6d98c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 17:14:29 +0200 Subject: [PATCH 13/15] [unpackfs] Counting works better when you update the variable --- src/modules/unpackfs/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index a82cab61e..ace289092 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -325,6 +325,7 @@ class UnpackOperation: if error_msg: return (_("Failed to unpack image \"{}\"").format(entry.source), error_msg) + complete += 1 return None finally: From 087c88753cc87fd69f848f78ebe443c969d196bf Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 17:35:27 +0200 Subject: [PATCH 14/15] [netinstall] Expand the table of common-strings When one of these common names for the netinstall page is used, it gets pulled out of the standard translations, so that it doesn't have to be translated in the per-distro config file. These labels are common enough that they make sense for everyone to have lying around. FIXES #1367 (I say "fixed" but of course it's going to depend on the translation workflow to make these available) --- src/modules/netinstall/NetInstallViewStep.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 3eba788db..e99b43830 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -71,6 +71,14 @@ NetInstallViewStep::prettyName() const tr( "Login" ); tr( "Desktop" ); tr( "Applications" ); + tr( "Communication" ); + tr( "Development" ); + tr( "Office" ); + tr( "Multimedia" ); + tr( "Internet" ); + tr( "Theming" ); + tr( "Gaming" ); + tr( "Utilities" ); #endif } From f963b826cabe7f67138ecb5cb8c46b5819a8060e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 18:29:18 +0200 Subject: [PATCH 15/15] Changes: notes on the module-polishing up to now --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index ee66ee152..2ed4996b2 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ website will have to do for older versions. This release contains contributions from (alphabetically by first name): - Anke Boersma + - Camilo Higuita ## Core ## - Both the sidebar (on the left) and the navigation buttons (along the @@ -23,6 +24,11 @@ This release contains contributions from (alphabetically by first name): ## Modules ## - The *welcomeq* module has been improved with better layout and nicer buttons in the example QML form. (Thanks to Anke Boersma) + - The *keyboardq* and *localeq* modules now provide some QML for + configuring these parts, although they are still very primitive. + - *netinstall* has had some minor layout fixes. + - *unpackfs* has much more detailed progress reporting and no + longer jumps around strangely in overall progress. # 3.2.21 (2020-03-27) #