History log of /haiku/src/bin/pkgman/command_search.cpp
Revision Date Author Comments
# 45b72f4c 23-Dec-2023 Augustin Cavalier <waddlesplash@gmail.com>

pkgman: Use natural sorting in "search" output.

Fixes #18676.


# 8fc394c1 04-Sep-2022 Oscar Lesta <oscar.lesta@gmail.com>

pkgman: change default search scope

* Reduce default search scope to: "name", "summary", and "provides".
* Add a new "--search-scope=<scope>" option that allows to either limit
the search to packages names (-s name), or to replicate the previous
behavior of searching everywhere in the package info (-s full).

Motivation for the change:

The ever increasing number of packages available for Haiku was impacting
pkgman search usefulness, as it easily returns too many packages (what a
wonderful problem to have :-D).

Limiting the default search scope helps with that, and the old behavior
is kept "just an option away".

Change-Id: I5b456b90137237134eee7ca7ee501bf8e3767440
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5616
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 52a61976 03-Mar-2019 Andrew Lindesay <apl@lindesay.co.nz>

pkgman: fix for syntax (help)

The tool "pkgman" was not showing it's help text
and this seems to be somehow related to the
initialization of constants such as
"kCommandCategoryPackages"; these values seems to
be coming through as empty-string for some reason.
I am changing those to be "#define" of regular
C-Strings and this seems to resolve the problem.
These values only seem to be used to group the
possible commands for production of the syntax or
help text - there do not seem to be any deeper
impacts beyond that functionality.

Change-Id: If9cd61462cd7f1f1b5ab2ece521bb3f00a1ba246
Reviewed-on: https://review.haiku-os.org/c/1139
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# af585d03 20-Nov-2015 Jérôme Duval <jerome.duval@gmail.com>

pkgman search: Add --requirements option


# dd15db95 25-Oct-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Add --debug option for most commands

* Add CommonOptions class and add an instance to Command. It supports a
debug level.
* full-sync, install, search, uninstall, update: Add option --debug.
This allows getting some debug output from the solver in cases where
the result seems weird.


# 5df58b52 30-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Move TextTable from pkgman to libshared


# bf5786eb 27-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman search: Add -D/--details

* Add a detailed listing mode (-D/--details), which prints a table with
repository/installation location name, package name, package version,
package architecture.
* Make the normal listing more compact. Now there's only one row per
package. The "Installed" column has been replaced by "Status" which
displays if/where the package is installed and whether it matches the
repository version.


# 4b7e2196 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
I'm sure some occurrence still remain. They can be adjusted when the
remaining B_COMMON_*_DIRECTORY constants are removed.


# 83462cc2 31-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Refactor reusable pkgman code into libpackage

* Move RepositoryBuilder class to libpackage and add B* prefix to name.
* Pull BPackageManager class out of PackageManager and move to
libpackage. The base class is customizable via three handler objects
responsible for transaction handling, request execution, respectively
user interaction.
* Reorganize _ApplyPackageChanges(): Now we first prepare the
transactions for all affected installation locations (downloading
files etc.) and then commit them.


# c92aabd4 29-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix build of pkgman with gcc2.

* I have no idea why, but gcc2 considers BSolverRepository* and
PackageManager::InstalledRepository* as distinct pointer types, which
it doesn't like to compare without a cast. Circumvent by static
casting to BSolverRepository*.


# 8b26ef67 25-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: PackageManager: Use flags instead of bools in ctor


# c4ce29a6 25-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman search: enable search in ~/config


# 0214aefd 25-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman search: add -a/--all

Can be specified instead of a search string. Lists all packages.


# 9a19dcd7 14-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman search: '-i' option wasn't handled


# 458a86aa 21-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Organize commands by category


# 3ac0de3b 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Refactoring -> PackageManager

Move common and reusable functionality from "search" and "install" to
new PackageManager class.


# 38e528bb 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: C++-ify the command handling

There's now a Command class that must be derived and registered with
a CommandManager, all simplified by a REGISTER_COMMAND macro. That gets
rid of the print_command_usage_and_exit() function copy for every
command, moves the short usage texts to the command implementations,
and avoids any repetition of the command name. When implementing a new
command only a new source file needs to be created, nothing else needs
to be touched.


# 663e351c 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver/pkgman: Support for searching in provides

* BSolver/LibsolvSolver:
* Add B_FIND_IN_NAME and make searching in the names explicit.
* Add B_FIND_IN_PROVIDES to search the packages' provides list.
* pkgman: Also search in provides.


# dd46d981 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Add "search" command


# dd15db954b893bd727a4ba5972bd2019d673f074 25-Oct-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Add --debug option for most commands

* Add CommonOptions class and add an instance to Command. It supports a
debug level.
* full-sync, install, search, uninstall, update: Add option --debug.
This allows getting some debug output from the solver in cases where
the result seems weird.


# 5df58b522b52d5914bf8b49fc47ff46fde56877f 30-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Move TextTable from pkgman to libshared


# bf5786ebd6d585459623cb9b38df79d05488c94a 27-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman search: Add -D/--details

* Add a detailed listing mode (-D/--details), which prints a table with
repository/installation location name, package name, package version,
package architecture.
* Make the normal listing more compact. Now there's only one row per
package. The "Installed" column has been replaced by "Status" which
displays if/where the package is installed and whether it matches the
repository version.


# 4b7e219688450694efc9d1890f83f816758c16d3 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
I'm sure some occurrence still remain. They can be adjusted when the
remaining B_COMMON_*_DIRECTORY constants are removed.


# 83462cc28d356d564a818c1d34605ed2ec83f274 31-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Refactor reusable pkgman code into libpackage

* Move RepositoryBuilder class to libpackage and add B* prefix to name.
* Pull BPackageManager class out of PackageManager and move to
libpackage. The base class is customizable via three handler objects
responsible for transaction handling, request execution, respectively
user interaction.
* Reorganize _ApplyPackageChanges(): Now we first prepare the
transactions for all affected installation locations (downloading
files etc.) and then commit them.


# c92aabd43433dfb3d5d26a1dec315693a94d9ec2 29-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix build of pkgman with gcc2.

* I have no idea why, but gcc2 considers BSolverRepository* and
PackageManager::InstalledRepository* as distinct pointer types, which
it doesn't like to compare without a cast. Circumvent by static
casting to BSolverRepository*.


# 8b26ef6779119ba64f5de3ce47ea4cac154ab4e8 25-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: PackageManager: Use flags instead of bools in ctor


# c4ce29a67e9a5ae0470260a941d54ad002a29802 25-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman search: enable search in ~/config


# 0214aefd58d6ccca6fb2a7f6c6c7b57f858f422f 25-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman search: add -a/--all

Can be specified instead of a search string. Lists all packages.


# 9a19dcd7cbf017f69be90dc75e73f6b89afbbd39 14-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman search: '-i' option wasn't handled


# 458a86aacb49b152f65b810140295477d49f2f31 21-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Organize commands by category


# 3ac0de3b1fac18912d6cb7758b502468e3802ee9 20-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Refactoring -> PackageManager

Move common and reusable functionality from "search" and "install" to
new PackageManager class.


# 38e528bbc1c368456c8b8a94d6f21081934cc4f9 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: C++-ify the command handling

There's now a Command class that must be derived and registered with
a CommandManager, all simplified by a REGISTER_COMMAND macro. That gets
rid of the print_command_usage_and_exit() function copy for every
command, moves the short usage texts to the command implementations,
and avoids any repetition of the command name. When implementing a new
command only a new source file needs to be created, nothing else needs
to be touched.


# 663e351cb468e889ffcd08c07fc867b3002a1c91 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BSolver/pkgman: Support for searching in provides

* BSolver/LibsolvSolver:
* Add B_FIND_IN_NAME and make searching in the names explicit.
* Add B_FIND_IN_PROVIDES to search the packages' provides list.
* pkgman: Also search in provides.


# dd46d9816332a8936534aeeb26613c5269b75a6a 11-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Add "search" command