Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement bundle-info command #461

Closed
phmccarty opened this issue May 31, 2018 · 7 comments
Closed

Implement bundle-info command #461

phmccarty opened this issue May 31, 2018 · 7 comments
Assignees
Milestone

Comments

@phmccarty
Copy link
Contributor

The files in /usr/share/clear/bundles are currently used by swupd-client to track which bundles are installed on the system. However, it may be nice for those files to store bundle metadata as well; then swupd-client could gain the ability to query that metadata, perhaps with a new bundle-info command.

The mixer feature for storing additional metadata is tracked at clearlinux/mixer-tools#333.

@phmccarty
Copy link
Contributor Author

phmccarty commented May 31, 2018

Note that it would be nice to query additional information about bundles that are not installed as well. So, the metadata may not originate from /usr/share/clear/bundles/* entirely.

Another implementation idea: perhaps another meta-bundle could be created (like os-core-update-index (see #394)) that contains the desired metadata for all bundle definitions, and swupd bundle-info could parse that file instead.

Or os-core-update-index could incorporate additional metadata as necessary, and search and bundle-info commands would read from the same data source.

@matthewrsj
Copy link
Contributor

A solution was merged and released in clearlinux/mixer-tools#336 to provide bundle info JSON files under /usr/share/clear/allbundles/<bundle-name>. A bundle-info command and the search command should use this.

@otaviobp
Copy link
Contributor

Suggestion on bundle-info parameters:

swupd bundle-info bundle-name

  • prints bundle-info header (title, description, maintainer)

swupd bundle-info --includes bundle-name

  • prints all bundles included by this bundle

swupd bundle-info --packages bundle-name

  • prints all packages that composes this bundle

swupd bundle-info --direct-packages bundle-name

  • prints only packages that this bundle adds directly

swupd bundle-info --files bundle-name

  • prints all files installed by this bundle

Reverse search for those commands:

swupd bundle-info --has-include bundle-name
swupd bundle-info --has-package bundle-name
swupd bundle-info --direct-package bundle-name
swupd bundle-info --has-file file_name
swupd bundle-info --has-include bundle-name

Search functionality:
swupd bundle-info --best-match string

  • look for a bundle name matching the string
  • look for direct-package matching that string
  • look for package matching that string
  • look for file matching that string

@castulo
Copy link
Contributor

castulo commented Feb 16, 2019

@otaviobp we should probably include the sizes of the bundles there too as search does

@castulo
Copy link
Contributor

castulo commented Aug 30, 2019

More details:

  • bundle-info NAME should show info for the current version of the bundle by default
  • bundle-info -V VERSION should show the info for the specified version of the bundle, "latest" could should be allowed with -V as in bundle-info -V latest
  • It should also show if the bundle is currently installed or not
  • It should show if the bundle is experimental or not

@castulo
Copy link
Contributor

castulo commented Sep 4, 2019

For showing the bundle size we have the following scenarios for swupd bundle-info BUNDLE:

  • When BUNDLE is already installed in the system:

    • Show the size of the BUNDLE (contentsize)
    • Show how much space the bundle is taking on disk (size of bundle + size of included bundles + size of optional bundles that are installed)
  • When BUNDLE is not installed in the system:

    • Show the size of the BUNDLE (contentsize)
    • Show the net increase in size (size of bundle on disk - included/optional bundles already installed)

castulo added a commit to castulo/swupd-client that referenced this issue Sep 6, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Sep 6, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Sep 7, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Sep 9, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Sep 10, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Sep 10, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Sep 10, 2019
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]>
@otaviobp otaviobp added this to the Q4 milestone Sep 11, 2019
castulo added a commit to castulo/swupd-client that referenced this issue Sep 11, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Oct 1, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Oct 2, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Oct 2, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Oct 3, 2019
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]>
castulo added a commit to castulo/swupd-client that referenced this issue Oct 4, 2019
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]>
otaviobp pushed a commit that referenced this issue Oct 4, 2019
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 #461.

Signed-off-by: Castulo Martinez <[email protected]>
@castulo
Copy link
Contributor

castulo commented Oct 21, 2019

Some of the functionality for bundle-info has been implemented in PR #1079, the missing features will be tracked in separate issues as shown next:

Suggestion on bundle-info parameters:

swupd bundle-info bundle-name

  • prints bundle-info header (title, description, maintainer)

The bundle Description and maintainer is information that is currently not available to swupd, to implement this mixer will need to make this info available to swupd. Tracked in #1154

swupd bundle-info --includes bundle-name

  • prints all bundles included by this bundle

Implemented in #1079

swupd bundle-info --packages bundle-name

  • prints all packages that composes this bundle

This information is currently not available to swupd, to implement this mixer will need to make this info available to swupd. Tracked in #1154

swupd bundle-info --direct-packages bundle-name

  • prints only packages that this bundle adds directly

This information is currently not available to swupd, to implement this mixer will need to make this info available to swupd. Tracked in #1154

swupd bundle-info --files bundle-name

  • prints all files installed by this bundle

Implemented in #1079

Reverse search for those commands:

swupd bundle-info --has-include bundle-name
swupd bundle-info --has-package bundle-name
swupd bundle-info --has-direct-package bundle-name
swupd bundle-info --has-file file-name

This reverse search functionality will be implemented as part of the swupd bundle-list command since it makes more sense in that command, and --has-include is already implemented there but it is more appropriately called --has-deps (includes + also-add). This implementation will be tracked with issue #1156

Search functionality:
swupd bundle-info --best-match string

  • look for a bundle name matching the string
  • look for direct-package matching that string
  • look for package matching that string
  • look for file matching that string

Some of this functionality is already covered by other command like swupd search-file FILE and swupd search SEARCH-TERM, so it may be more appropriate to implement this search functionality as part of one of those commands or as part of a new search command. It doesn't seem to fit in bundle-info anymore. This implementation will be tracked in issue #1158.

@castulo castulo closed this as completed Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants