Page 1 of 1

suggestions for spi command tool

Posted: 10. Feb 2016, 04:06
by rsal
spi is a very useful tool for finding and installing packages. However, it does not ask before installing. For example:

Code: Select all

# spi -i  kernel-source
Reading Package Lists...Done
The following NEW packages will be installed:
  kernel-source 
0 upgraded, 0 reinstalled, 1 newly installed, 0 to remove, 0 not upgraded.
Need to get 73.0MB of archives.
After unpacking 502.8MB of additional disk space will be used.             
(my comment: CONFIRMATION MAY BE  ASKED HERE)
1/1 Get http://salix.hostingxtreme.com/i486/slackware-14.1/ kernel-source 3.10.17_smp-noarch-3 [73.0MB]... 33%
I think it will be better if spi can ask for confirmation after informing the mb to be retrieved and the disk space that will be used.

It may even be better if the finding command itself can go to installation after asking for which package to install:

Code: Select all

# spi kernel-source
Available packages:
kernel-source [Not installed]: kernel-source (Linux kernel source)

Available SlackBuilds:
None
The packages found can be numbered and user can be asked to enter the number of package to installed or just press ENTER to quit.

Re: suggestions for spi command tool

Posted: 10. Feb 2016, 07:24
by mimosa
spi is just a wrapper for the individual tools, slapt-get (for Salix repos) and slapt-src (for SBo). spi always prefers the former, by default.

In cases where you want to weigh your options, try the --show option, and have a look at https://slackbuilds.org

Re: suggestions for spi command tool

Posted: 10. Feb 2016, 10:10
by gapan
rsal wrote:I think it will be better if spi can ask for confirmation after informing the mb to be retrieved and the disk space that will be used.
No. If you want that level of control, use slapt-get/slapt-src directly.
rsal wrote:It may even be better if the finding command itself can go to installation after asking for which package to install:

Code: Select all

# spi kernel-source
Available packages:
kernel-source [Not installed]: kernel-source (Linux kernel source)

Available SlackBuilds:
None
The packages found can be numbered and user can be asked to enter the number of package to installed or just press ENTER to quit.
You are requesting something that will make spi much more complicated than it is now, with very little (I would say nothing) to gain. This is completely against the KISS principle we'd like to have.