Commit Graph

3957 Commits

Author SHA1 Message Date
Adriaan de Groot
913690650f [libcalamares] Move CommandList into libcalamares
- Move CommandList so it can be used from more modules than
   just ShellProcess
 - Allow a CommandList to run itself. This centralizes
   code for executing one or more commands and simplifies
   the ShellProcess module.

Various small cleanups:
 - mention instance id in log message
 - code formatting / style
2018-01-15 06:52:55 -05:00
Adriaan de Groot
60f4dd7b3b [libcalamares] Improve explanation of failed processes. 2018-01-15 05:51:58 -05:00
Adriaan de Groot
8571fd800e [shellprocess] Make explicit that an error code has been ignored, by logging it. 2018-01-15 05:26:20 -05:00
Adriaan de Groot
e48767eaa6 [shellprocess] Make CommandList chroot-aware
This is prep-work for moving commandlist to libcalamares, where
it can be re-used by more modules.
2018-01-15 04:57:41 -05:00
Adriaan de Groot
8bd40fdcd5 [shellprocess] Warn when there's no script 2018-01-15 04:20:37 -05:00
Adriaan de Groot
fdb3fc1ef8 [shellprocess] Execute the command list 2018-01-12 10:38:40 -05:00
Adriaan de Groot
b7fb24837a [shellprocess] Improve CommandList
- Also allow a single string instead of a list
 - Add count() method to CommandList
 - Drop over-engineering, add more logging
 - Expand tests with some more examples
2018-01-12 10:38:01 -05:00
Adriaan de Groot
5f8fb655c4 [shellprocess] Stub of a shell process module.
This is basically dummyprocess, except with an expanded configuration
interface so you can run 1 or more shell commands in the live
or target system with a suitable configuration file and instance
of shellprocess in settings.conf.

It can replace downstream modules that implement their own
process modules with a command, by an instance of shellprocess.
2018-01-12 10:33:51 -05:00
Adriaan de Groot
4ff1a0d5ea [libcalamares] another convenience for running commands
Back targetEnvCommand() with a more general runCommand()
that takes an argument selecting the location to run
the command in. This allows us also to use the same
API for running processes in the host during install,
as we do for running them in the target system.

One reason for this change is wanting to run (user-specified)
commands and independently from the global dontChroot setting,
run those commands in the live system or the target.

This changes the ABI of the DLL, since targetEnvCommand()
is no longer exported. Plugins will need to be recompiled.

 - refactor targetEnvCommand() into more general runCommand().
 - While here, allow host system commands to run even if
   there is no global storage.
 - provide convenience accessors for ProcessResult members
 - Move explanation of process errors out of ProcessJob
   - Move from ProcessJob to ProcessResult, so it can be
     reused outside of ProcessJob (e.g. from ShellProcessJob).
   - Add some convenience functions, too.
2018-01-12 10:32:42 -05:00
Adriaan de Groot
6e01bb0fa4 CMake: factor out explanation of skipped modules.
Make a function out of explaining-skipped-modules, and call it
not only after collecting all the modules, but also after
the feature summary, so that it's quite clear which modules
are skipped.
2018-01-10 09:20:49 -05:00
Adriaan de Groot
58252fc16d [partition] Handle missing requirements by disabling the module 2018-01-10 09:05:15 -05:00
Adriaan de Groot
e3b7a2884b [partition] Relax check with UI-level warning message, too 2018-01-09 11:15:30 -05:00
Adriaan de Groot
637d6ad752 [partition] Find Esp partition with modern flags. 2018-01-09 11:12:13 -05:00
Adriaan de Groot
94b6c95c44 [partition] Introduce function for checking various flag-combinations for ESP boot. 2018-01-09 10:53:33 -05:00
Adriaan de Groot
3ff68bce98 [keyboard] Correct guessing for Arabic variants 2018-01-09 16:24:55 +01:00
Adriaan de Groot
05967311de [partition] Be defensive against no device-device-available.
Scenario is this: you have no suitable installation devices on
your system (everything is mounted, or HDD has died), click through
to partition page, where you have all the buttons available, but no
devices in the list. The following actions then cause a crash:

 - clicking "back"
 - clicking any button

Prevent that:
 - you can click "back", but if there is no device selected
   nothing happens to the device state (no nullptr deref,
   and no crash)
 - button code is now more resilient to this scenario
 - buttons are hidden until a device is available, so you
   can't even click on them to trigger the code.
2018-01-09 06:58:46 -05:00
Adriaan de Groot
a35a7b108f
Merge pull request #883 from agaida/hack-unpackfs
[unpackfs] skip error check when rm of tmp folder fails
2018-01-09 10:53:52 +01:00
Adriaan de Groot
7249b41e3e [keyboard] Explain table format, add more edge cases 2018-01-08 11:02:20 -05:00
Adriaan de Groot
0d56b9b9c5 Merge branch 'master' into i689-kayboard-layout 2018-01-08 16:19:27 +01:00
Adriaan de Groot
28d61c406e [bootloader] Improve description of *efiBootloaderId* option 2018-01-08 16:14:28 +01:00
Adriaan de Groot
2a0a2a26bc [umount] Don't raise when copying log file fails. 2018-01-03 05:01:38 -05:00
Adriaan de Groot
6f7b5a0510 [umount] Move module documentation into config file, fix wording
FIXES #831
2018-01-03 04:33:20 -05:00
Adriaan de Groot
a7d7f3a83b [welcome] Make link to Calamares site https 2018-01-03 04:20:21 -05:00
Adriaan de Groot
308441ee3a Merge branch '3.1.x-stable' 2018-01-02 15:44:34 +01:00
Adriaan de Groot
b3f0932ff9 CMake: bump version number 2018-01-02 15:37:36 +01:00
Adriaan de Groot
41e6f0e06c [calamares] Allow WM close button
- remove hide-close-button hack
 - refactor code in viewmanager for confirming quit
 - hook up confirm-and-quit to WM close button
 - also works for alt-F4 and other quit methods
 - while here, update copyright year

FIXES #870
2018-01-02 14:58:08 +01:00
Adriaan de Groot
5593be125f [calamares] Reduce font-related debug output on startup. 2018-01-02 14:43:48 +01:00
Adriaan de Groot
1a42b8af41 Merge branch 'kpmcore-3.2'
- Bumps requireed KPMCore to 3.3 (in spite of the branch name)
 - Cleans up some dependencies

Thanks to Andrius Stikonas.
2018-01-02 13:25:11 +01:00
Philip
be650d7986 [initcpiocfg] search just for 'lvm2' in partition[fs] 2017-12-30 05:01:25 -05:00
Philip
5a83024698 [initcpiocfg] add 'lvm2' hook as needed 2017-12-30 05:00:59 -05:00
Andrius Štikonas
2027a5538e Fix propagation of new partition table to global storage. 2017-12-27 14:11:11 +00:00
Alf Gaida
784bbd3bc8 finally !must! never fail unhandled
but it does without help
2017-12-26 22:25:40 +01:00
Philip
1cffa9fafc [partition] Rename slots, to avoid recursion
- see also https://github.com/calamares/calamares/issues/880
- missed within 7ce52ecda7
2017-12-25 15:50:37 -05:00
Philip
8f32aad3fa [partition] Rename slots, to avoid recursion
- see also https://github.com/calamares/calamares/issues/880
- missed within 7ce52ecda7
2017-12-25 15:48:55 -05:00
Adriaan de Groot
e4bb6de0f7
Merge pull request #875 from stikonas/kpmcore-3.2
Convert FormatPartitionJob and CreatePartitionTableJob to KPMcore Operations.
2017-12-24 22:27:03 +01:00
Adriaan de Groot
03dd487fc2 Merge branch '3.1.x-stable' 2017-12-24 16:23:35 -05:00
Adriaan de Groot
661789825a [plasmalnf] Make the module optional
- Check for presence of KDE Frameworks for Plasma & Package
 - Explain when module is skipped
2017-12-24 16:15:04 -05:00
Adriaan de Groot
2e1f389997 CMake: explain which modules are skipped
Modules may be skipped for different reasons: SKIP_MODULES
is the traditional approach to suppress some, but other modules
may have unmet build requirements (e.g. Plasma Look-and-Feel,
or the Partitioning module) and should be able to opt-out
of being built. For all those skipped, log it explicitly after
all the modules have been examined.

Only CMake-based (e.g. C++) modules support opting-out in this way.
2017-12-24 16:14:58 -05:00
Adriaan de Groot
dc255e161e [partition] Rename slots, to avoid recursion 2017-12-24 03:34:34 -05:00
Andrius Štikonas
806b84973a Convert CreatePartitionTableJob to KPMcore operation. 2017-12-22 15:25:39 +00:00
Andrius Štikonas
1b3ce39ffb Convert FormatPartitionJob to KPMcore's CreateFileSystemOperation. 2017-12-22 15:25:39 +00:00
Andrius Štikonas
638117efa0 Cleanup unnecessary kpmcore includes. 2017-12-22 15:25:39 +00:00
Adriaan de Groot
7ce52ecda7 [partition] Rename slots, to avoid recursion 2017-12-22 16:20:35 +01:00
Adriaan de Groot
980b39961d [calamares] Unset application name
Unset the application name so that you don't get -- Calamares
in the window title.

Reported by: sitter
FIXES #877
2017-12-22 06:47:12 -05:00
Adriaan de Groot
f8a53f9646 [libcalamares] Refactor explanation of process-job errors 2017-12-21 16:30:13 +01:00
Adriaan de Groot
c6ab4195c7 [contextualprocess] Stub of a contextual-process job
This is meant to run one or more jobs based on specific global
configuration values; if could also be done by a Python
module with just some if's, but this one can be used with
just the config file and covers a bunch of use-cases.
2017-12-20 09:12:27 -05:00
Adriaan de Groot
762ad54344 Documentation: change http links to GitHub to https 2017-12-20 08:39:09 -05:00
Adriaan de Groot
c582ff0d6b Merge branch '3.1.x-stable' 2017-12-20 08:13:55 -05:00
Adriaan de Groot
c2ee0c6ed4 CMake: bump version number 2017-12-20 04:22:06 -05:00
Adriaan de Groot
1b35ce34c5 Documentation: explain dummyprocess
The dummyprocess module can be used to run a single
shell command; it can be used effectively with instances
to run one or more commands during installation.
2017-12-20 04:21:30 -05:00