When diagnosing/repairing a system, sometimes is useful to only
diagnose/repair a specific file or path.
This commit implements the --file option for diagnose/repair so a file
or path can be diagnosed only instead of doing it to the whole OS or a
whole bundle.
Closes#1150
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
The "bundle-list" command can be used to show all installed bundles in
the system, however, currently there is no way to know which of those
installed bundles were implicitly or explicitly installed.
This commit implements the "--status" flag for bundle-list which can be
used to show which bundles were explicitly or implicitly installed.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
The search-file command is restricted to looking for files in the
current version. This commit adds the --version option to the command
that can be used to seach for files in specific versions of Clear.
Closes#1155
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit does some housekeeping in the 3rd-party commands:
- Initialize the function "progress" only after swupd has initialized
successfully.
- Make functions that are not used outside of a file static.
- Avoid using regex or partial verifications on tests when possible.
- Add 3rd-party command flags to the default config file.
- Don't use "repo" in help menus, use the whole "repository" word.
- Add 3rd-party sub-commands to the flag_validator script.
- Add missing values from the autocompletion scripts.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit introduces a new command to list bundles from all 3rd-party
repositories. At this point users cannot choose a specific repo to show
its bundles but rather all repos are shown.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds the section that handles the "3rd-party bundle-add"
options into the default config file. It also enables the use of
the 3rd-party command and its subcommands in the config file.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
A couple of new flags were added to to bundle-remove, the sample config
file should include all possible swupd flags so it is easier for users
to use.
This commit add the --recursive and --force flags to the config file.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
The --statedir-cache flag specifies a secondary statedir that will be
checked before downloading files over the network.
The primary reason to use the statedir-cache is to enable the os-install
command to take advantage of hardlinks when installing content across
partitions. In this case, update content stored in the statedir-cache
(source partition) will be copied to the statedir (target partition) before
installing content into the target partition. Since the update content
will exist on the target partition before installation, hardlinks can be
used instead of copies.
Signed-off-by: John Akre <john.w.akre@intel.com>
If --update-search-file-index flag is used on update, all search-file indexes, i.e.
all Manifests will be downloaded on update. This shouldn't be used if you have
disk or network restrictions, but it shouldn't be very download intensive after the
first usage because delta manifests are going to be used.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Adding the skip_diskspace_check option to the bundle-add section of the
default config file.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When the --download flag is set for the os-install command, update
content will be downloaded to the statedir and no content will be
installed.
Signed-off-by: John Akre <john.w.akre@intel.com>
Since --picky was made a superset of diagnose/repair, there is the need
of a new flag that only finds/repairs the extra files that are not in
any manifest.
Many things were included in this commit:
- This commit adds the new flag --extra-files-only for this purpose.
- The commit also refactors the verify function to simplify its workflow
and remove code duplication
- It also adds some validations for flags that are mutually exclusive in
verify/diagnose/repair
- Updates the documentation
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When running tasks that require to run post update scripts in swupd,
for most users we don't want to wait for the scripts to finish running,
those can be run in the background so we can finish the task faster.
However for some users like DevOps, clr-installer, and QA, it is useful
to have a way to instruct swupd to wait until these scripts have finish
running.
This commit adds a way of doing this by introducing the
--wait-for-scripts flag.
Closes#909
Signed-off-by: Castulo Martinez <castulo.martinez@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>