43 Commits (4e3f9fb6b32187852e5ef816cd3e698512fcb7b4)

Author SHA1 Message Date
Adriaan de Groot 184462a875 [libcalamares] Make status of JobQueue queryable
- while the queue is executing (the thread is running jobs) the
  isRunning() method returns true.
- re-work some internals to reset isRunning() before emitting
  finished() signal.
5 years ago
Adriaan de Groot 112895fddc [libcalamares] Keep jobIndex in-sync with the jobs
- Never skip updating the jobIndex, because it is used in emitProgress()
  to find which job to ask for status.
5 years ago
Adriaan de Groot afc0c78b4c [libcalamares] Refactor job-weight computations
- only check index-vs-length once
5 years ago
Adriaan de Groot 0793971d01 [libcalamares] Warnings--, unused variable 5 years ago
Adriaan de Groot f818d4b446 [libcalamares] Log Q_FUNC_INFO as part of debug
- Warnings, errors, don't get funcinfo, but regular cDebug()
  calls do. Other special-cases, like calling Logger::CDebug()
  constructor explicitly, don't get funcinfo either.

FIXES #1328
5 years ago
Adriaan de Groot e72ecaafd3 Merge branch 'kpmcore-manager'
Introduces a "partitioning service" into libcalamares,
shuffles a bunch of things into it, tries to help out
with settling the system between partitioning actions.
5 years ago
Adriaan de Groot f8998834cf [libcalamares] Simplify includes (no Python used in JobQueue) 5 years ago
Adriaan de Groot f6d89354a1 Merge branch 'master' into kpmcore-manager 5 years ago
Adriaan de Groot 1afa9c4d08 [libcalamares] Apply current coding style to all of libcalamares/ 6 years ago
bill-auger 9201842025 implement definable job weights 6 years ago
Adriaan de Groot 5c6c67a974 [libcalamares] Destroy jobs once they have run 6 years ago
Adriaan de Groot 1962bbf08d [libcalamares] Compute length of JobQueue just once
- Calculate the length once at the start -- this is because
   future work will modify the queue rather than just iterating
   over it.
 - Describe the slightly-surprising progress-percentage calculation.
6 years ago
Adriaan de Groot 61b78d8895 [libcalamares] Stop job threads before exit
- This solves a crash where the thread is destroyed while still
   running (e.g. cancelling during install).
 - The thread might not cooperate in being terminated, but then we
   have a bigger problem anyway (and Calamares will still crash on
   exit).

FIXES #1164
6 years ago
Adriaan de Groot 3ccbcdc1bd [libcalamares] Don't moc on JobQueue
- There is no reason for JobThread to have a Q_OBJECT macro,
   so drop the moccing (this also stops some warnings from
   the generated moc code).
 - Define the (virtual) destructor out-of-line to avoid vtable
   warnings.
6 years ago
Adriaan de Groot 374a9bdca6 Merge branch 'emergency-modules'
Introduce the notion of emergency modules and emergency jobs.
Initial use will probably center around the preservefiles module,
and possibly umount.

FIXES #928
7 years ago
Adriaan de Groot 264d135776 [libcalamares] Run emergency jobs
- After a failure, skip non-emergency jobs.
 - After running all emergency jobs, then emit failure message.
 - In log, distinguish emergency and non-emergency jobs.
7 years ago
Adriaan de Groot dd8e53dc22 Copyright: update copyright lines on files touched in 2018
Contributions from:
  Adriaan de Groot <groot@kde.org>
  Gabriel Craciunescu <crazy@frugalware.org>
  AlmAck <gluca86@gmail.com>
  Andrius Štikonas <andrius@stikonas.eu>
  Caio Carvalho <caiojcarvalho@gmail.com>
  Raul Rodrigo Segura <raurodse@gmail.com>
7 years ago
Adriaan de Groot 6bb72d173d [libcalamares] Drop generic cLog()
- Use cWarning or cError() for errors
 - Use cDebug(level) for other uses (but there aren't any)
7 years ago
Adriaan de Groot abc6914528 [libcalamares] Enforce singleton-ness of CalamaresPython::Helper
- unset instance pointer on destruction
 - make constructor private, and the instance accessor
   should create an instance if there isn't one.
7 years ago
Adriaan de Groot 762ad54344 Documentation: change http links to GitHub to https 7 years ago
Adriaan de Groot 2d31e987c0 [libcalamaresui] Unrelated typedef for JobList 8 years ago
Teo Mrnjavac 9cb4e60b31 Namespace fixage. 10 years ago
Teo Mrnjavac b9dbf668f3 Initialize previously uninitialized scalar. 10 years ago
Teo Mrnjavac b0d52fb928 Use it in JobQueue. 10 years ago
Teo Mrnjavac 659a388688 Improve job status reporting. 10 years ago
Teo Mrnjavac 52528f650c JobQueue emits queueChanged. 10 years ago
Teo Mrnjavac 8026a287d3 Shut up Qt lupdate warnings. 11 years ago
Aurélien Gâteau 70a13fc588 Make logging more useful
- Do not log progress percent but log job names.
- Log install failures.
11 years ago
Aurélien Gâteau 89fd6a950b Add support for per-job progress 11 years ago
Aurélien Gâteau e9da5cb6cb Change signature of JobQueue::progress, add finished() signal
Now uses a qreal for progress instead of current and total
Also added a finished() signal because determining whether the queue is
finished should not be done by comparing a qreal with 1.0 as this is not
precise.
11 years ago
Teo Mrnjavac 0753e6ccde New GlobalStorage map. With Python API support. 11 years ago
Teo Mrnjavac d9f4c74537 Add support for config map to Python job API.
Rename PythonJobHelper ==> CalamaresPython::Helper.
Add QVariant to boost::python::object conversion functions.
Rename some constants in the libcalamares Python API.
11 years ago
Teo Mrnjavac 2f03dfa43b CalamaresPrivate ==> CalamaresPython 11 years ago
Aurélien Gâteau 43f29b8058 Start working on tests for partition jobs 11 years ago
Teo Mrnjavac a61a36d99d We have a Python API for jobmodules!
Created a Boost.Python module interface in libcalamares.
Added a PythonJob wrapper and exposed it in the Python module.
Rename target calamareslib ==> calamares so in Python it's libcalamares.
Python-related classes in libcalamares that aren't exported as C++
symbols are now in a CalamaresPrivate namespace.
Import the libcalamares python module into every Python script before
running it.
Added Python error handling to PythonJobHelper.
Added some more testing code to dummypython module.
11 years ago
Teo Mrnjavac b924aeef2b Add optional Python jobs support to libcalamares. 11 years ago
Aurélien Gâteau 165d28fc23 Abort installation when a job fails 11 years ago
Aurélien Gâteau 04743eb4be Basic JobQueue implementation 11 years ago
Teo Mrnjavac 4ec72f4afb Refactored calamares_bin into calamares_bin and libcalamaresui.
Now linking with -Wl,--no-undefined!
Moved find_package KF5 from the root CMakeLists.txt to the partitioning
module where it belongs. KF5 deps should be limited to plugins.
Lots of random fixage to make stuff link.
Removed CalamaresApplication reference from Settings.
Removed the use of AbstractPage, we don't need it right now.
11 years ago
Aurélien Gâteau bcfbf3eda2 Dummy implementation of JobQueue so that I can call it 11 years ago
Teo Mrnjavac f1da3373a8 Added Typedefs.h and Job/JobQueue interfaces. 11 years ago
Teo Mrnjavac 6388171521 Stubs for JobQueue and Job. 11 years ago
Teo Mrnjavac b5ec7c4702 CMake skeleton. 11 years ago