Skip to content

Commit

Permalink
Implement bundle-info command
Browse files Browse the repository at this point in the history
The bundle-info command shows detailed data related to a specified
bundle. Among the data currently displayed it includes:
- If the bundle is installed or not
- If the bundle is experimental or not
- If the bundle is installed, it shows if there is an existing update
for the bundle
- The latest available version of the bundle
- The size of the bundle and all its dependencies
- The max size needed in disk to install a bundle if not installed

This commit also adds the following command flags:
--version: so a user can display information for a bundle in a
specific version, not only the current version.
--dependencies: this flag can be used to show all optional and required
bundles that are directly and indirectly included by the specified
bundle.
--files: this flag can be used to show all files that are part of a
given bundle.

All flags can be combined to show specific data.

This is the first of a series of PRs to implement the bundle-info
features referred to at clearlinux#461.

Signed-off-by: Castulo Martinez <[email protected]>
  • Loading branch information
castulo committed Oct 4, 2019
1 parent c44a494 commit 7ee3f0d
Show file tree
Hide file tree
Showing 15 changed files with 957 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ swupd_SOURCES = \
src/autoupdate.c \
src/binary_loader.c \
src/bundle.c \
src/bundle_info.c \
src/check_update.c \
src/clean.c \
src/clr_bundle_add.c \
Expand Down Expand Up @@ -187,6 +188,9 @@ BATS = \
test/functional/bundleadd/add-uses-fullfile.bats \
test/functional/bundleadd/add-uses-zeropack.bats \
test/functional/bundleadd/add-verify-fix-path.bats \
test/functional/bundleinfo/bundle-info-basic.bats \
test/functional/bundleinfo/bundle-info-files.bats \
test/functional/bundleinfo/bundle-info-includes.bats \
test/functional/bundlelist/list-all.bats \
test/functional/bundlelist/list-client-certificate.bats \
test/functional/bundlelist/list-deps-flat.bats \
Expand Down
14 changes: 13 additions & 1 deletion docs/RELEASE_NOTES_DRAFT
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ Bug fixes:
-

Feature:
-
- Adds the bundle-info command to show detailed data related to a bundle.
Among the data currently displayed it includes:
- If the bundle is installed or not
- If the bundle is experimental or not
- If the bundle is up to date (when installed)
- The latest available version of the bundle
- The size of the bundle
- The max size needed in disk to install a bundle if not installed
- Using the --version flag a user can display bundle information in
a specific version, not only the current version.
- Using the --dependencies flag users can show all dependencies of the
bundle.
- Using the --files flag users can get the list of files in a bundle.

Test Improvements:
-
19 changes: 18 additions & 1 deletion docs/swupd.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ SUBCOMMANDS
List all installed software bundles in the local system. Bundles available
can be listed with the `--all` option.

- `-a, --all`
- `-a, --all`

Lists all available software bundles, either installed or not, that
are available. It will return 0 with succeeded and a different value
Expand All @@ -241,6 +241,23 @@ SUBCOMMANDS
not installed on the system. Combine with `--verbose` to show a tree of
these bundles.

``bundle-info``

Display detailed information about a bundle.

- `--dependencies`

Show the bundle dependencies.

- `--files`

Show the files installed by this bundle.

- `-V, --version`

Show the bundle info for the specified version V, also accepts 'latest'.
It defaults to the current version if no version is specified.

``check-update``

Checks whether an update is available and prints out the information
Expand Down
Loading

0 comments on commit 7ee3f0d

Please sign in to comment.