Skip to content

mrtest: allow to select multiple packages and use ranges

Administrator requested to merge multiple-selection into master

Hi @ollieparanoid ,

I have another patch that will improve this tool. To be brief I miss selection of multiple packages and doing it one by one is not effective hence the patch :-)

IMHO I think it makes no sense to add other operators such as ^ to select anything but the package/range or work on more flexible way to deselect the packages as it can always be Ctrl+C and started again.

Currently you can pick just one package:

Getting installed packages...
Which packages to install?

  1) [ ] device-oneplus-enchilada-10-r0.apk
  2) [ ] device-oneplus-enchilada-nonfree-firmware-10-r0.apk
  3) [ ] device-oneplus-enchilada-phosh-10-r0.apk
  4) [ ] device-oneplus-fajita-10-r0.apk
  5) [ ] device-oneplus-fajita-nonfree-firmware-10-r0.apk
  6) [ ] device-oneplus-fajita-phosh-10-r0.apk
  7) [ ] device-shift-axolotl-10-r0.apk
  8) [ ] device-shift-axolotl-nonfree-firmware-10-r0.apk
  9) [ ] device-shift-axolotl-phosh-10-r0.apk
  10) [ ] firmware-oneplus-sdm845-8-r0.apk
  11) [ ] firmware-oneplus-sdm845-initramfs-8-r0.apk
  12) [ ] firmware-oneplus-sdm845-sensors-8-r0.apk
  13) [ ] firmware-shift-sdm845-0.4-r0.apk
  14) [ ] firmware-shift-sdm845-initramfs-0.4-r0.apk
  15) [ ] firmware-shift-sdm845-sensors-0.4-r0.apk
  16) [ ] iio-sensor-proxy-9999-r0.apk [installed: 9999-r0]
  17) [ ] iio-sensor-proxy-openrc-9999-r0.apk [installed: 9999-r0]
  18) [ ] libqmi-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]
  19) [ ] libqmi-bash-completion-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]
  20) [ ] libqmi-dev-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]
  21) [ ] libqmi-doc-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]
  22) [ ] libssc-0.1.3-r0.apk [installed: 0.1.3-r0]
  23) [ ] libssc-dbg-0.1.3-r0.apk [installed: 0.1.3-r0]
  24) [ ] libssc-dev-0.1.3-r0.apk [installed: 0.1.3-r0]
  25) [ ] qmi-utils-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]

0 of 25 selected.

Commands:
  1-99: toggle this package
  a:    toggle all packages
  u:    toggle upgrade (or downgrade) of installed packages
  l:    list selection
  y:    confirm selection
  q:    quit

What now?> 2 3 4 10-15 20
Don't know (2 3 4 10-15 20), try 'h' for help
0 of 25 selected.

After applying the patch:

What now?> 2 3 4 10-15 20
10 of 25 selected.
What now?> l
  1) [ ] device-oneplus-enchilada-10-r0.apk
  2) [X] device-oneplus-enchilada-nonfree-firmware-10-r0.apk
  3) [X] device-oneplus-enchilada-phosh-10-r0.apk
  4) [X] device-oneplus-fajita-10-r0.apk
  5) [ ] device-oneplus-fajita-nonfree-firmware-10-r0.apk
  6) [ ] device-oneplus-fajita-phosh-10-r0.apk
  7) [ ] device-shift-axolotl-10-r0.apk
  8) [ ] device-shift-axolotl-nonfree-firmware-10-r0.apk
  9) [ ] device-shift-axolotl-phosh-10-r0.apk
  10) [X] firmware-oneplus-sdm845-8-r0.apk
  11) [X] firmware-oneplus-sdm845-initramfs-8-r0.apk
  12) [X] firmware-oneplus-sdm845-sensors-8-r0.apk
  13) [X] firmware-shift-sdm845-0.4-r0.apk
  14) [X] firmware-shift-sdm845-initramfs-0.4-r0.apk
  15) [X] firmware-shift-sdm845-sensors-0.4-r0.apk
  16) [ ] iio-sensor-proxy-9999-r0.apk [installed: 9999-r0]
  17) [ ] iio-sensor-proxy-openrc-9999-r0.apk [installed: 9999-r0]
  18) [ ] libqmi-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]
  19) [ ] libqmi-bash-completion-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]
  20) [X] libqmi-dev-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]
  21) [ ] libqmi-doc-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]
  22) [ ] libssc-0.1.3-r0.apk [installed: 0.1.3-r0]
  23) [ ] libssc-dbg-0.1.3-r0.apk [installed: 0.1.3-r0]
  24) [ ] libssc-dev-0.1.3-r0.apk [installed: 0.1.3-r0]
  25) [ ] qmi-utils-9999_git20230324-r0.apk [installed: 9999_git20230324-r0]

10 of 25 selected.
What now?> 

Merge request reports

Loading