Heuristics and post-update scripts that apply to upstream bundles don't
apply to bundles installed from 3rd-party repositories. This commit
enables/disables these actions on demand so 3rd-party bundles are
installed correctly.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Always save the config file in another directory so we won't have
problems on running the config tests in parallel. Before this patch
if you run the config tests in parallel with any other tests you could
end up having false-negatives.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This ensures we have a callback function
for full_file curl download. The function
implements a spinner for progress
Fixes#1060
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
Instead of initializing curl library on start, initialize it only when needed.
The advantage of this approach is that we can run some commands offline, if
there's no file to download.
Fixes#801Fixes#895Fixes#277
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Running "swupd diagnose --picky" result in only identifying the extra
files in the system, but doesn't run the other standard checks that a
"swupd diagnose" do. "swupd diagnose --picky" should do everything
"swupd diagnose" does plus searching for the extra files.
This commit fixes the issue by making diagnose --picky a superset of
diagnose. The commit also makes some changes in the output of --picky so
it is consistent with the rest of the diagnose output.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
config file tests require one special configuration on build time, so
skiping this unless we are running on travis.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
swupd has many flags that can be used for fine tunning its
functionality. In some cases users may want to include a flag with every
swupd command they run.
This commit gives the ability to provide swupd flags via options in a
configuration file that swupd will read before running the command.
The configuration file is an INI style file tha can include sections
so users can specify options that should only apply to a specific
command. The biggest advantage of this is to be able to fine tune the
flags that should apply for each command.
For example a user could set a global flag that would apply to every
swupd command, and then turn that flag off for a specific command by
unsetting it in the command's section.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Currently users can set content and version urls based on http or https
protocols. This pose a security risk if users decide to use http.
This commit blocks swupd from working with http unless is specifically
allowed by using the --allow-insecure-http flag.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
swupd prints some messages to stdout and others to stderr, this makes
the code somewhat confusing and also it creates a mess regarding which
messages go where. Messages are usually printed using fprintf() and
printf().
This commit replaces all calls to printf and fprintf with one of the
functions that are part of the logger. This will bring many advantages
to the code:
- readability, it is straightforward to identify where a message needs
to go based on the name of the logger functions.
- consistency, the output will go to either stderr or stdout depending
on the type of message being printed.
- the format of the messages will also be consistent, so for example,
if the message is an error the message will automatically include the
"Error: " label in the beginning of the message, this way we avoid
having things like "ERROR:", "error - ", etc...
Closes#864Closes#294Closes#489Closes#433
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
We needed on sample for external binaries, but as now we have swupd-search we
can take swupd inspector out.
Also move local search to list of external modules and fix all related tests
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Use a binary launcher to load swupd-inspector and execute that
when swupd inspector is run.
Closes#826
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds the tests to validate the configurable retries
for sync downloads.
It also moves the tests for autocompletion from their own "completion"
directory to a more general "usability" directory so we can add more
tests in that directory in the future.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>