Commit Graph

231 Commits

Author SHA1 Message Date
Adriaan de Groot
56792fdcb5 [netinstall] Polish the README
- describe the format better
 - more consistent typography
 - refer to `packages.conf` for details on shell commands
2019-08-26 16:26:06 +02:00
Adriaan de Groot
ee29c45433 [netinstall] Point documentation towards netinstall README.md 2019-08-26 16:01:14 +02:00
Adriaan de Groot
bedff6b252 [netinstall] Log immediate failures
- If the request is immediately bad (e.g. because of a botched
   url) then log that fact; in this case no finished() is ever
   emitted.
2019-08-01 15:17:24 +02:00
Adriaan de Groot
82055f6854 [netinstall] Logging; code duplication
- If there was an error, the network reply was never deleted
 - Improve logging to show where data is coming from
2019-08-01 14:31:25 +02:00
Adriaan de Groot
9331a25905 [libcalamares] Remove Typedefs.h
- This small header file contained a few unrelated typedefs.
   Move those typedefs to the classes they relate to. This
   **does** mean that some consumers need to #include something
   else instead.
 - Use type names more consistently.

Editorial: why are **pages** responsible for creating the jobs?
2019-05-07 09:51:23 -04:00
Adriaan de Groot
f076dd76ad [libcalamares] Rename YamlUtils.h
- Since we have the utils/ filesystem namespace, and use CalamaresUtils::
   as C++ namespace, simplify naming.
2019-04-29 06:14:21 -04:00
Adriaan de Groot
090aee9196 Modules: adjust to split-out utils/Variant.h
- Most modules only needed the variant support, not the "whole"
   CalamaresUtils header.
 - While here improve ordering of headers as well.
2019-04-29 06:14:21 -04:00
Adriaan de Groot
cef2f50510 Reduce warnings about extra ;
- Trailing ; after Q_UNUSED
 - Trailing ; after CALAMARES_RETRANSLATE
2019-04-18 12:06:09 +02:00
Adriaan de Groot
c83395ff6d Reduce warnings for yaml-cpp
- Use only utils/YamlUtils.h to pull in yaml-cpp and supporting code.
 - When compiling with clang, turn off warnings that the system header
   for yaml-cpp would generate.
2019-04-18 12:06:09 +02:00
Adriaan de Groot
520478847c Make logging more consistent.
- Across all the C++ modules, use Logger::SubEntry for sub/continues
   log lines, instead of somewhat-random indent strings.
2019-04-15 09:02:21 -04:00
Adriaan de Groot
6071489788 [libcalamaresui] Provide default implementations of next() and back()
- These methods are used for multi-page view-steps, which are rare.
   For all the others, just drop the empty implementation and defer
   to the base class.
2019-02-25 07:49:10 -05:00
Adriaan de Groot
08565b5f17 [libcalamaresui] Remove the signal done() from ViewStep
- The signal is emitted, generally from next(), but not actually used.
2019-02-25 07:34:40 -05:00
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>
2018-06-15 05:59:11 -04:00
Adriaan de Groot
6aa5be192b [netinstall] Drop unused includes 2018-05-22 11:43:14 -04:00
Adriaan de Groot
3133e759d0
Merge pull request #958 from bill-auger/patch-2
avoid pinging hard-coded server for netinstall.yaml
2018-05-22 12:08:01 +02:00
bill auger
d7b1811e56 avoid pinging hard-coded server for netinstall.yaml
groupsUrl is optional and should be commented out by default
also this URL is 404
also only chakra would ever want to ping the chakra server anyways
2018-05-21 18:43:57 -04:00
Adriaan de Groot
fb94c227f6 Merge branch 'netinstall' 2018-05-21 11:00:40 -04:00
Adriaan de Groot
ba85fc760a [netinstall] Remove data-indirection
- There is no need to move data around between two parts of the
   same module via global storage.
2018-05-21 10:58:57 -04:00
Adriaan de Groot
3160bd7a54 [netinstall] Simplify getting configuration
- Use convenience methods for getting bools and strings from
   the configuration map. Ignore empty groupsUrls.
2018-05-21 10:49:47 -04:00
bill auger
4826af97a9 consistent indentation in src/modules/netinstall/page_netinst.ui
this file has 1 space char indentation except for these lines
2018-05-19 19:04:24 -04:00
Adriaan de Groot
3315df5df1 [modules] Use new convenience logging methods across the board 2018-02-13 11:07:12 +01:00
Adriaan de Groot
b0c4fbc1bb Clang: reduce warnings
- mark some things override
 - make conversion of 0 to flags explicit
2018-01-13 21:40:46 +01:00
Adriaan de Groot
762ad54344 Documentation: change http links to GitHub to https 2017-12-20 08:39:09 -05:00
Adriaan de Groot
3ae65d5771 Merge branch '3.1.x-stable' 2017-11-24 09:28:35 -05:00
Adriaan de Groot
93ab6432c4 [netinstall] Special-case the root node.
Root is always selected, can't be unselected, and has its own explicit
constructor and name. This resolves issue reported where unchecking
all *visible* groups caused the root to be unchecked, after which
hidden-but-still-selected subgroups were not installed.

Reported by crazy@
2017-11-24 07:52:52 -05:00
Adriaan de Groot
aa0fa37492 [netinstall] Hidden groups follow selectedness of parents.
If a subgroup is hidden, then it should be considered
selected if its parent is selected or partially-selected.
If the parent group is totally unselected, then the hidden
subgroup shouldn't be installed either. This allows putting
required-packages into a group, without cluttering the
interface.

FIXES #864
2017-11-21 06:16:30 -05:00
Adriaan de Groot
71e80f680e [netinstall] Only update selectedness of parents with children.
While walking up the tree, only switch the selectedness states
of parents with children. This avoids the case where a parent
has a first subgroup that is hidden -- in which case the
parent ends up with no children, and is unselected even though
it is marked as selected in the config file.

FIXES #864
2017-11-21 05:36:38 -05:00
Gabriel Craciunescu
d1c10837d1 [netinstall]: some more debug
- change the debug output when the errors occurs so
  we have a clue what may go wrong
2017-11-06 19:46:26 +01:00
Adriaan de Groot
62c03d6857 Merge branch '3.1.x-stable' 2017-11-06 05:43:29 -05:00
Adriaan de Groot
51c74c6abb [netinstall] Convenience typedefs 2017-11-06 05:42:13 -05:00
Adriaan de Groot
91e949f8fc [netinstall] Apply Calamares C++ style 2017-11-06 05:34:57 -05:00
Adriaan de Groot
f424af36d3 [netinstall] Avoid crash when do groups are available
- m_groups is only set to a non-nullptr value when data is received
   and fully processed,
 - avoid nullptr dereference when paging *back* from a netinstall
   page that hasn't loaded groups data.

FIXES #859
2017-11-06 05:33:01 -05:00
Adriaan de Groot
ee0b3b85dc [netinstall] Improve 'next' button handling
- Document netinstall.conf a little,
 - Add setting *required* which influences whether next is enabled or not
   in case of missing or corrupt data,
 - Enable *next* button only once some (any!) data is received.

This can be used to disallow stepping past the netinstall step when
there is no data (e.g. internet has failed between the welcome page
and the netinstall page).
2017-11-06 05:33:01 -05:00
Adriaan de Groot
b303acf12a Merge branch '3.1.x-stable'
- KPMCore code moved
 - Small fixes
2017-10-31 06:44:14 -04:00
Gabriel Craciunescu
d2ea83a0b2 NetInstallPage.cpp: fix displaying for Name and Description
- fixes 1d7ad9e045 which sets
  both header's labels to 0 so 'Name' was always overridden
  by Description and Description never displayed
2017-10-28 02:18:36 +02:00
Adriaan de Groot
055d416321 Merge branch '3.1.x-stable' 2017-10-24 07:54:30 -04:00
Adriaan de Groot
e6e1e2226c [netinstall] logging about the number of packages to process 2017-10-24 06:44:37 -04:00
Adriaan de Groot
c15db95046 Merge branch '3.1.x-stable' (netinstall fixes) 2017-10-23 11:53:30 -04:00
Adriaan de Groot
36a711c87f Netinstall: fix misleading message (thanks to @abucodonosor) 2017-10-23 11:52:11 -04:00
Adriaan de Groot
58414666c8 Netinstall: optimize structure for packages
- If there's no scripts involved in a package for netinstall, just
   name it without the scripts; this lets the packages module
   optimize to fewer package manager calls.
2017-10-23 11:23:14 -04:00
Adriaan de Groot
4314f2c4ad Netinstall: fix datatype passed to packages module
- Each element of the (list) packageOperations needs to be a
   package operation, which is a dictionary with keys (identifying actions)
   and lists of packages (which may be strings or script-info dictionaries).
2017-10-23 11:23:14 -04:00
Adriaan de Groot
174fa98695 Documentation: minor polishing on netinstall 2017-10-23 06:30:43 -04:00
Adriaan de Groot
13807ceabf Licensing: add self
- to all the files I've touched recently
 - to (very incomplete) AUTHORS list

Licensing: add license info to top-level CMakeLists.txt
2017-09-19 15:57:25 +02:00
Adriaan de Groot
edb1dbaa6e Clang: warnings-- 2017-09-13 22:32:21 +02:00
Adriaan de Groot
da4fa6a63a Fix link / library name 2017-09-13 19:03:56 +02:00
Adriaan de Groot
bd37572fd8 Clang: reduce warnings 2017-09-13 19:03:56 +02:00
Adriaan de Groot
7e25909e18 YAML: refactor YAML-exception reporting
- both NetInstall (group data) and Locale (GeoIP) use network
   data returned as a source of YAML data. Try to explain
   parsing errors for both.

FIXES #786
2017-09-06 07:51:22 -04:00
Adriaan de Groot
09decf8e06 YAML-NetInstall: log data errors.
When NetInstall receives YAML data, handle parser errors more gracefully:
show line and column, but because it's network data (not in a local file),
do some work to print out the actual data received.

FIXES #786
2017-09-06 05:47:11 -04:00
Adriaan de Groot
196b1567db Modules: remove boilerplate module.desc 2017-08-02 11:05:32 -04:00
Adriaan de Groot
8ea14d7957 Release: add copyright to files I've touched 2017-06-21 08:27:10 -04:00
Adriaan de Groot
ae34d99f10 Netinstall: remove no-longer-used icons and qrc 2017-06-19 16:58:56 -04:00
Adriaan de Groot
ce6997d214 Coverity: fix some uninitialized members 2017-06-17 15:14:02 -04:00
Kyle Robertze
5eb0c8e40b updated docs to better explain new features
the docs do not current reflect the new net-install and packages modules
changes well. This updates them to explain the new keys in the
configuration files.
2017-02-20 11:06:58 +01:00
Kyle Robertze
bc4ffce3a1 Made packages optional
A group can now contain only subgroups. Thus packages can be categorized
through sub-categories such as Internet->Web Browsers->firefox
2017-02-07 17:10:48 +01:00
Kyle Robertze
45facda3cb corrected packages module features so that they are up to date 2017-02-07 17:10:48 +01:00
Kyle Robertze
1d7ad9e045 made requested changes 2017-02-07 17:10:48 +01:00
Kyle Robertze
f5fe887a79 fixed style issues 2017-02-07 17:10:48 +01:00
Kyle Robertze
a4aef3bce5 moved netinstall to a tree based ui 2017-02-07 17:10:48 +01:00
Teo Mrnjavac
e2b2d761c2 Do not LINK_PUBLIC by default. 2016-12-07 16:37:29 +01:00
shainer
e5f5bb99d7 Change the default value of critical to false.
This means all package groups are non-critical by default.
Update documentation accordingly.
2016-11-13 12:12:07 +00:00
shainer
b6d6075213 New example netinstall.yaml, less groups for easier testing. 2016-11-13 10:56:13 +00:00
shainer
5fadd0a3ce New example netinstall.yaml with non-critical group. 2016-11-12 18:08:08 +00:00
shainer
58ae8e13c9 Add support for non-critical groups in netinstall.
Package groups are divided into critical and non-critical
depending on whether we want all Calamares to fail if installing
a package in the group fails, or we are okay with just logging a
warning.

The distinction is configured in the YAML file listing the package
groups. By default, all groups are critical, to keep supporting
the previous behaviour.
2016-11-12 17:57:58 +00:00
Kevin Kofler
075577d948 [netinstall] Support selecting visible groups by default.
In other words, support:
  hidden: false
  selected: true
groups.

This was supposed to work according to README.md, but not actually
implemented. Now it should be working.
2016-11-02 05:58:00 +01:00
shainer
479b67f696 In the netinstall page, always show the arrow-down button.
The arrow no longer changes direction depending on whether
the button is clicked or not.
2016-09-21 12:56:38 +02:00
shainer
d45a6bd856 In the netinstall page, fix the group button.
The button is "not checked" by default, and becomes
checked when clicked; the packageview becomes visible
when the button is checked.
2016-09-20 18:20:53 +02:00
shainer
5e2ed69629 Set a descriptive User Agent for requests, so sourceforge.net does not complain. 2016-07-15 14:02:14 +01:00
shainer
e462c3c8d8 Use QNetworkAccessManager instead of KIO to download the config; remove KIO dep. 2016-07-15 13:27:10 +01:00
shainer
8798dc03ea README for netinstall now explains how to require a working connection when launching Calamares. 2016-07-11 22:07:42 +01:00
shainer
d16691ae44 Add netinstall module setup instructions and lessons in README.md 2016-07-09 17:14:10 +01:00
shainer
d0321fdf4f When setting packageOperations, use QMap, not QHash, since QHash is not currently supported. 2016-07-04 22:20:54 +01:00
shainer
f84da1e013 Fix build failure seen in the live test. 2016-07-02 23:54:32 +01:00
shainer
f2658f5eb0 Left commented code in previous commit, switch to cDebug(). 2016-06-30 23:00:03 +01:00
shainer
aa54d82d85 Last connect() conversion in the module. 2016-06-30 22:59:29 +01:00
shainer
c54fae2f6e Delete redundant include 2016-06-30 22:33:00 +01:00
shainer
793717e145 Change view name to 'Package selection' 2016-06-30 22:32:31 +01:00
shainer
afedf9e024 Switch two connects to Qt5 style. 2016-06-30 22:27:37 +01:00
shainer
877eb71886 Use utils from the YamlUtils package to read nodes more elegantly. 2016-06-27 23:23:10 +01:00
shainer
631dcc18f5 Use nullptr instead of 0 for pointers. 2016-06-27 23:03:15 +01:00
shainer
b043b42795 Add copyright statements when missing, make them all the same. 2016-06-27 23:00:47 +01:00
shainer
a5cc9f2a9d Netinstall module. See README for complete guide. Allows to configure groups and packages; selected packages are installed through the 'packages' module. 2016-06-25 23:26:08 +01:00