swupd-client icon indicating copy to clipboard operation
swupd-client copied to clipboard

The verbose option of `swupd search` does not behave as described in `swupd search -h`

Open gvancuts opened this issue 5 years ago • 2 comments

Describe the bug The swupd search -h help says:

$ swupd search -h

Searches for the best bundle to install a binary or library.

Usage:
  swupd-search [search_term...]

Flags:
  -h, --help      help for swupd-search
  -a, --all       show all
  -q, --quiet     quiet mode
  -v, -vv, --verbose   verbose mode

However, running either sudo swupd search -v test or sudo swupd search --verbose test will lead to output that does not have any additional info compared to a standard search sudo swupd search test, i.e.:

Bundle with the best search result:
     software-testing               	- Software to run or create test suites.  (194MB) 

This bundle can be installed with:

  swupd bundle-add  software-testing

Alternative bundle options are
     os-core                        	- Run a minimal Linux userspace.  (71MB) (installed)
     os-testsuite-graphics          	- Provides minimal functionality for graphics testing functions.  (2147MB) 
     os-testsuite                   	- Provides minimal functionality for core testing functions.  (23MB) 

Running sudo swupd search -vv test does get additional info printed out on the screen.

Expected behavior The built-in help should be updated to reflect the actual implementation.

Environment (please complete the following information):

  • Clear Linux OS Version: Installed version: 29940
  • Platform: N/A

gvancuts avatar Jun 21 '19 08:06 gvancuts

Using the -v does show extra information, it shows the score of each match.

With swupd search test

Bundle with the best search result:
     software-testing               	- Software to run or create test suites.  (194MB)

This bundle can be installed with:

  swupd bundle-add  software-testing

Alternative bundle options are
     os-core                        	- Run a minimal Linux userspace.  (71MB) (installed)
     os-testsuite-graphics          	- Provides minimal functionality for graphics testing functions.  (2147MB)
     os-testsuite                   	- Provides minimal functionality for core testing functions.  (23MB)

With swupd search -v test

Bundle with the best search result:
     software-testing               	- Software to run or create test suites. with score 23.4 and size 194 MB

This bundle can be installed with:

  swupd bundle-add  software-testing

Alternative bundle options are
     os-core                        	- Run a minimal Linux userspace. with score 10.0 and size 71 MB
     os-testsuite-graphics          	- Provides minimal functionality for graphics testing functions. with score 10.0 and size 2147 MB
     os-testsuite                   	- Provides minimal functionality for core testing functions. with score 10.0 and size 23 MB

castulo avatar Jun 21 '19 16:06 castulo

Thanks, I had missed that.

Perhaps we could split the -v, --verbose and -vv options as they both report additional info but not of the same kind?

gvancuts avatar Jun 24 '19 09:06 gvancuts