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

Search is suboptimimal

Open rossburton opened this issue 5 years ago • 2 comments

I just did a server install (so pretty minimal) and need host and ping.

$ sudo swupd search ping
Bundle with the best search result:
     clr-network-troubleshooter     	- Tool to test network availability and suggest actions to fix issues.  (14MB)

This bundle can be installed with:

  swupd bundle-add  clr-network-troubleshooter

Alternative bundle options are
     maker-gis                      	- GIS/Mapping tools for makers.  (354MB)
     mtr                            	- Network diagnostic tool for analyzing latency, combining the functionality of the 'traceroute' and 'ping' programs.
     nethogs                        	- Small net top tool for grouping bandwidth use per process.  (3MB)

I don't need a network troubleshooter. I don't want to install 300MB of GIS mapping on my server. mtr doesn't even install a ping link.

The alternative bundle options appears to be just three random bundles as using search-file is more useful:

$ sudo swupd search-file bin/ping
Downloading all Clear Linux manifests
 [100%]

Searching for 'bin/ping'

Bundle clr-installer (243 MB to install)
	/usr/bin/ping6
	/usr/bin/ping

Bundle clr-network-troubleshooter (15 MB to install)
	/usr/bin/ping6
	/usr/bin/ping

Bundle desktop-dev (30462 MB to install)
	/usr/bin/ping_pong

Bundle ltp (943 MB to install)
	/usr/testcases/bin/ping02.sh
	/usr/testcases/bin/ping01.sh

Bundle network-basic (50 MB to install)
	/usr/bin/ping6
	/usr/bin/ping

network-basic is a much better candidate.

rossburton avatar Feb 24 '20 14:02 rossburton

Strawman: sort the suggestions by size.

rossburton avatar Feb 25 '20 19:02 rossburton

Strawman: sort the suggestions by size.

Just a note on this one. For search-file this is supported with the flag --order=size:

   -o, --order=[ORDER]     Sort the output. ORDER is one of the following values:
                           'alpha' to order alphabetically (default)
                           'size' to order by bundle size (smaller to larger)

otaviobp avatar Feb 26 '20 20:02 otaviobp