History log of /haiku/headers/private/package/manager/PackageManager.h
Revision Date Author Comments
# e711e6e4 18-May-2015 Axel Dörfler <axeld@pinc-software.de>

Moved BJob, and JobQueue into the support kit.

* Put it in the BSupportKit namespace, following the style introduced
with the package kit for now.
* The BSupportKit::BJob class no longer knows about the package kit's
Context class. However, the BPackageKit::BJob class does.
* Due to the namespace juggling, a lot of files had to be touched.
* The JobQueue class remains private.
* Due to the way Haiku is built on itself, you cannot build this change
under Haiku with an older release.


# 1aaa0c21 24-Jan-2015 Axel Dörfler <axeld@pinc-software.de>

Package Kit: FetchFileJob now contains package size.

* So that you know how much already was, and still has to be downloaded.
* Automatic whitespace cleanup.
* The link in FetchFileJob.h did not fetch the correct header under
Haiku anymore (since the addition of the private headers to the
image).


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

BPackageManager: Add SetDebugLevel()

Sets the debug level of the solver.


# f2f19f11 15-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Support installing/updating local package files

* The Install() and Update() versions that take a const char* array
now check whether a string looks like a path to a local package file.
If so, they use that file instead of interpreting the string as a
search string.
* Extend the repository hierarchy. There's now a LocalRepository base
class from which InstalledRepository and the new MiscLocalRepository
derive. The latter is instantiated once and collects all package files
specified by path.


# eee42275 14-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Make BCommitTransactionResult available

* BFatalErrorException: Add commitTransactionResult property and
respective constructor. In case committing the transaction failed,
BPackageManager throws a BFatalErrorException with the result.
* BFatalErrorException::UserInteractionHandler: Pass
BCommitTransactionResult to ProgressTransactionCommitted().


# 0de3219e 14-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Rework error and issue propagation to client

* BDaemonClient: Move inner class BCommitTransactionResult to top level
and make it public.
* BCommitTransactionResult:
- Add a whole bunch of specific error code enum values. Such an error
code is now the primary error, as opposed to before where we would
mix status_t and enum value errors. There's a systemError property
of type status_t which may provide additional information, though
(depending on the primary error type).
- Remove the errorMessage property. Due to mapping all errors to the
specific error codes this is no longer necessary. Mixing such a
message with another error description is also not very helpful when
it comes to localization (still not supported, though).
- Add several properties (paths, strings, error codes) that serve as
arguments to the primary error and are used by FullErrorMessage().
- Add issues property, a list of instances of new class
BTransactionIssue. Those describe non-critical issues (e.g. failed
update of a settings file) that occurred in the process of
committing the transaction. Those issues should be presented to the
user by the package management program.
* Exception: Adjust to transport the BCommitTransactionResult
properties.
* CommitTransactionHandler, FsTransactions, Root, Volume: Adjust to
BCommitTransactionResult/Exception changes.
* CommitTransactionHandler: Now requires a BCommitTransactionResult to
which it adds the issues it encounters. The reply BMessage is no
longer needed, though.
* Volume: Refactor common code from the three methods that use
CommitTransactionHandler into new method _CommitTransaction.


# 6ef57ae2 25-Jan-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Add full-sync command

* BSolver/LibsolvSolver: Add FullSync() method. It uses libsolv's
SOLVER_DISTUPGRADE mode.
* BPackageManager: Add FullSync() using the new solver mode.
* pkgman: Add full-sync command.

The new command is similar to the update command without arguments, just
more aggressive, allowing downgrading or even removal of packages, to
match the state of the repositories. Just like "update" it doesn't work
properly yet.


# ee8e9158 20-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager::UserInteractionHandler: Make non-abstract

Most of the hooks don't strictly need a non-empty implementation. The
defaults now simply throw exceptions in those that do. This allows the
class to be instantiated, which is useful when a BPackageManager is only
used for finding packages.


# 6722e1ae 20-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add mandatory constructor parameters

Require the installation interface and the user interaction handle to
be passed to the constructor. Formerly, derived classes set them
manually in their constructors. This makes using the class without
having to subclass it possible.


# 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.


# 9345049a 28-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Package Kit: Implement progress notifications.

- BJobStateListener: Add progress state and corresponding hook.
- FetchFileJob: Notify job progress hook on libcurl notifications.
- UserInteractionHandler: Add hooks for download progress and checksum
validation progress.
- PackageManager: inherit from JobStateListener and watch for job
notifications for internally generated jobs. Forward to corresponding
UserInteractionHandler hooks as needed.
- Adapt pkgman, HaikuDepot and package_daemon to above changes.
Neither HaikuDepot nor package_daemon's progress hooks are wired up to
do anything yet though.


# fe39d2eb 27-Sep-2013 Rene Gollent <anevilyak@gmail.com>

BPackageManager: Eliminate RequestHandler.

- Pull functionality back into package manager itself since the extra
indirection doesn't really buy us anything in this case, as neither
request that it handles requires a decision provider.
- Adjust pkgman and HaikuDepot accordingly.


# 81a828b6 29-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Auto-refresh if repository cache is missing

This makes the initial "pkgman refresh" superfluous, that was necessary
for "install"/"search" to work.


# 36204024 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add InstalledRepository::EnablePackage()


# 018173a2 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add ResultComputed() callback


# c032903a 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add VerifyInstallation()


# 7e0d2c4f 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add alternate Install()/Uninstall()/Update()


# 5a5d1465 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Make _InstallationRepository() protected


# a87c7d67 01-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't use BPackageKit::BPrivate; avoids clashes


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

BPackageManager: Abstract installed repository initialization

* Rename TransactionHandler -> InstallationInterface and
DaemonClientTransactionHandler -> ClientInstallationInterface.
* Add InstallationInterface::InitInstalledRepository(). Use in
_AddInstalledRepository() to get the repository packages instead of
using the package roster. The ClientInstallationInterface
implementation does it that way.


# 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.


# e711e6e42fd7ec3111ba9dc2324fa8efedd6674b 18-May-2015 Axel Dörfler <axeld@pinc-software.de>

Moved BJob, and JobQueue into the support kit.

* Put it in the BSupportKit namespace, following the style introduced
with the package kit for now.
* The BSupportKit::BJob class no longer knows about the package kit's
Context class. However, the BPackageKit::BJob class does.
* Due to the namespace juggling, a lot of files had to be touched.
* The JobQueue class remains private.
* Due to the way Haiku is built on itself, you cannot build this change
under Haiku with an older release.


# 1aaa0c2142c6c843e93bd1ee8edd4c7ea6256559 24-Jan-2015 Axel Dörfler <axeld@pinc-software.de>

Package Kit: FetchFileJob now contains package size.

* So that you know how much already was, and still has to be downloaded.
* Automatic whitespace cleanup.
* The link in FetchFileJob.h did not fetch the correct header under
Haiku anymore (since the addition of the private headers to the
image).


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

BPackageManager: Add SetDebugLevel()

Sets the debug level of the solver.


# f2f19f110d94b924183dad8e7df2c8e122c0ebac 15-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Support installing/updating local package files

* The Install() and Update() versions that take a const char* array
now check whether a string looks like a path to a local package file.
If so, they use that file instead of interpreting the string as a
search string.
* Extend the repository hierarchy. There's now a LocalRepository base
class from which InstalledRepository and the new MiscLocalRepository
derive. The latter is instantiated once and collects all package files
specified by path.


# eee422752c6de8ab971937a81225008d254ad785 14-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Make BCommitTransactionResult available

* BFatalErrorException: Add commitTransactionResult property and
respective constructor. In case committing the transaction failed,
BPackageManager throws a BFatalErrorException with the result.
* BFatalErrorException::UserInteractionHandler: Pass
BCommitTransactionResult to ProgressTransactionCommitted().


# 0de3219e339506a0c94b584a0df0287414437033 14-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Rework error and issue propagation to client

* BDaemonClient: Move inner class BCommitTransactionResult to top level
and make it public.
* BCommitTransactionResult:
- Add a whole bunch of specific error code enum values. Such an error
code is now the primary error, as opposed to before where we would
mix status_t and enum value errors. There's a systemError property
of type status_t which may provide additional information, though
(depending on the primary error type).
- Remove the errorMessage property. Due to mapping all errors to the
specific error codes this is no longer necessary. Mixing such a
message with another error description is also not very helpful when
it comes to localization (still not supported, though).
- Add several properties (paths, strings, error codes) that serve as
arguments to the primary error and are used by FullErrorMessage().
- Add issues property, a list of instances of new class
BTransactionIssue. Those describe non-critical issues (e.g. failed
update of a settings file) that occurred in the process of
committing the transaction. Those issues should be presented to the
user by the package management program.
* Exception: Adjust to transport the BCommitTransactionResult
properties.
* CommitTransactionHandler, FsTransactions, Root, Volume: Adjust to
BCommitTransactionResult/Exception changes.
* CommitTransactionHandler: Now requires a BCommitTransactionResult to
which it adds the issues it encounters. The reply BMessage is no
longer needed, though.
* Volume: Refactor common code from the three methods that use
CommitTransactionHandler into new method _CommitTransaction.


# 6ef57ae2a96085ccb56e356e21e652cc11777ac0 25-Jan-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

pkgman: Add full-sync command

* BSolver/LibsolvSolver: Add FullSync() method. It uses libsolv's
SOLVER_DISTUPGRADE mode.
* BPackageManager: Add FullSync() using the new solver mode.
* pkgman: Add full-sync command.

The new command is similar to the update command without arguments, just
more aggressive, allowing downgrading or even removal of packages, to
match the state of the repositories. Just like "update" it doesn't work
properly yet.


# ee8e91583ecf0977326ede58e1f92fda92ae594f 20-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager::UserInteractionHandler: Make non-abstract

Most of the hooks don't strictly need a non-empty implementation. The
defaults now simply throw exceptions in those that do. This allows the
class to be instantiated, which is useful when a BPackageManager is only
used for finding packages.


# 6722e1ae43d51bb855e472045e84bb45592751cd 20-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add mandatory constructor parameters

Require the installation interface and the user interaction handle to
be passed to the constructor. Formerly, derived classes set them
manually in their constructors. This makes using the class without
having to subclass it possible.


# 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.


# 9345049af828506bd2b20408e3612655a0153db1 28-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Package Kit: Implement progress notifications.

- BJobStateListener: Add progress state and corresponding hook.
- FetchFileJob: Notify job progress hook on libcurl notifications.
- UserInteractionHandler: Add hooks for download progress and checksum
validation progress.
- PackageManager: inherit from JobStateListener and watch for job
notifications for internally generated jobs. Forward to corresponding
UserInteractionHandler hooks as needed.
- Adapt pkgman, HaikuDepot and package_daemon to above changes.
Neither HaikuDepot nor package_daemon's progress hooks are wired up to
do anything yet though.


# fe39d2eb8d03c1e71d835bab5d939c9b75440316 27-Sep-2013 Rene Gollent <anevilyak@gmail.com>

BPackageManager: Eliminate RequestHandler.

- Pull functionality back into package manager itself since the extra
indirection doesn't really buy us anything in this case, as neither
request that it handles requires a decision provider.
- Adjust pkgman and HaikuDepot accordingly.


# 81a828b660cf54ac1adeb9c4a5f12fa9cd496ecf 29-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Auto-refresh if repository cache is missing

This makes the initial "pkgman refresh" superfluous, that was necessary
for "install"/"search" to work.


# 36204024cfc0c357f9a422317665256f8ae2443f 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add InstalledRepository::EnablePackage()


# 018173a2f5ba97ee56e8579d63261d55d1e8ccae 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add ResultComputed() callback


# c032903abc04a8ac1fec08704e0a8e7212402711 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add VerifyInstallation()


# 7e0d2c4f94ac5381a39ea2da4b183e9c39635877 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Add alternate Install()/Uninstall()/Update()


# 5a5d146510f3459c597f4c7ab35cc423db7dd321 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageManager: Make _InstallationRepository() protected


# a87c7d67e380d2ec4e9f7c121945ae2f84c40942 01-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't use BPackageKit::BPrivate; avoids clashes


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

BPackageManager: Abstract installed repository initialization

* Rename TransactionHandler -> InstallationInterface and
DaemonClientTransactionHandler -> ClientInstallationInterface.
* Add InstallationInterface::InitInstalledRepository(). Use in
_AddInstalledRepository() to get the repository packages instead of
using the package roster. The ClientInstallationInterface
implementation does it that way.


# 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.