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 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.
--includes: 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 Sep 6, 2019
1 parent 8cdccdb commit e0b80c2
Show file tree
Hide file tree
Showing 16 changed files with 1,143 additions and 7 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/binfo-basic.bats \
test/functional/bundleinfo/binfo-files.bats \
test/functional/bundleinfo/binfo-includes.bats \
test/functional/bundlelist/list-all.bats \
test/functional/bundlelist/list-client-certificate.bats \
test/functional/bundlelist/list-deps-flat.bats \
Expand Down
18 changes: 17 additions & 1 deletion docs/swupd.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,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 @@ -231,6 +231,22 @@ SUBCOMMANDS
dependency. Combine with `--all` to report all bundles including those
not installed on the system.

``bundle-info``

Display detailed information about a bundle.

- `--includes`

Show all bundles included by this bundle.

- `--files`

Show all files installed by this bundle.

- `-V, --version`

Show the bundle info for the specified version V, also accepts 'latest' and 'current' (default).

``check-update``

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

0 comments on commit e0b80c2

Please sign in to comment.