History log of /haiku/src/servers/package/Root.cpp
Revision Date Author Comments
# 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.


# 933e7b32 20-Apr-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Move Volume::CommitTransactionHandler to top level

Also move constant definitions to Constants.h/cpp.


# 32cae724 06-Feb-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Handle location info request in app thread

* ... instead of queuing it for the job thread. The advantage is that
the request will be handled immediately and clients won't have to wait
for transactions (which may even require user feedback) to finish. It
complicates Volume a bit, since there are now two threads that may
access it. The shared data have been moved to a State object which is
protected by a lock.
* For commit transaction requests check whether another package request
is already pending/in progress before queuing a job. Fail immediately,
if there is.

Fixes bug #10039.


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


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

Initial changes to remove /boot/common

* find_directory() and hard-coded paths use /boot/system instead of
/boot/common.
* The build system creates the writable directories in /boot/system
instead of /boot/common.
* The build system no longer installs any packages in /boot/common.


# 23733521 26-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Implement writable files handling

* Move Volume::Exception to top level and into own files.
* Add utility class FSUtils, move Volume::RelativePath there and add a
bunch of FS utility functionality.
* Add FSTransaction, a helper class to record FS operations and revert
them.
* When activating a package we now extract the writable
files/directories it declares. The handling is not quite complete:
- We don't handle merges yet. I.e. the user will have to do that
manually for now.
- We don't propagate issues/infos regarding the writable files (e.g.
that a manual intervention is required) to the user yet.


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

package daemon: Implement dependency resolution support

... for package changes performed manually by the user (i.e.
adding/removing files in a packages directory). Currently only done for
the system root. Alternative roots should still work as before, so this
shouldn't affect haikuporter (not tested yet).

Needs some more work (e.g. the GUI part).


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

package daemon: Let Root know whether it is the system root


# 85d2badf 19-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Add support for activation change request

* daemon: Handle new request B_MESSAGE_COMMIT_TRANSACTION. It activates
and deactivates given sets of packages. The new packages must be
placed in a directory in the administrative directory. The daemon
moves them to the packages directory and the deactivated packages to
a subdirectory it creates. It also save the old activation state
there.
* Add private BActivationTransaction, describing an activation change
transaction.
* BDaemonClient: Add CommitTransaction(), which sends a given
BActivationTransaction as a B_MESSAGE_COMMIT_TRANSACTION request to
the daemon.

Completely untested yet.


# e6216e37 14-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement getting a BInstallationLocationInfo

* Rename PackageDaemonDefs.h to DaemonDefs.h.
* Replace the MESSAGE_GET_PACKAGES by the new
B_MESSAGE_GET_INSTALLATION_LOCATION_INFO, which not only returns the
packages, but also other information about the installation location.
* daemon: Volume: Implement a change count which is bumped whenever
packages are activated/deactivated/added/removed. Cache the reply
for a location info request, using the change count to check whether
it is still up-to-date.
* Add private BDaemonClient for communication with the daemon.
* BRoster:
- Add GetInstallationLocationInfo() using BDaemonClient.
- Reimplement GetActivePackages(), using
GetInstallationLocationInfo().


# 62f7022a 10-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: get active packages list from daemon

* daemon: Implement private message protocol to retrieve the active
packages.
* BPackageRoster::GetActivePackages(): Get the active packages list
from the daemon.


# 92b6d585 09-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Check volume package dependencies initially

Dumps the result (i.e. found problems and solutions) to the syslog.
Eventually the user should be asked what to do when inconsistencies are
encountered.


# a6c7f5e3 08-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: De/-activate all changed packages together

* We first process the node monitoring events, collecting the required
package activation changes, then apply all changes together.
* Change the PackageFSActivationChangeItem/-Request structs. The former
is no longer variable in size, which makes it easier to work with.


# ebbefc01 08-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Root: Use a common job for volume work

Add VolumeJob which, besides the Volume, takes a Root method to be
invoked. That allows to replace the specific job classes by simple
methods.


# 9e409614 08-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Add a Listener interface for Volume

* This way, Volume doesn't have to know Root.
* Suppress listener notifications for node monitoring events when there
are were already events pending.


# 8fb3930a 07-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Make all work with the packages asynchronous

There's now a worker thread per Root that does all the work that can
take time. Node monitoring notifications received in the main thread are
just pushed into the worker's job queue, so the application looper
remains responsive.


# 3d53bd47 06-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Add package monitoring and de-/activation

* packagefs: Disable (comment out) node monitoring of the packages
directory.
* package daemon:
- When a packagefs volume is added load the respective packages
directory and get from the volume which of the packages are
activated.
- Add node monitoring for the packages directory and
activate/deactivate packages as packages are added/removed.


# 26296b0a 05-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add the humble beginnings of the package daemon

It doesn't really do anything yet save for tracking what packagefs
volumes are mounted and unmounted.


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


# 933e7b3280f1d1ed01b4080288fbe767a2d18379 20-Apr-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Move Volume::CommitTransactionHandler to top level

Also move constant definitions to Constants.h/cpp.


# 32cae72412f4e1503d124ee00a09832022a4840f 06-Feb-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Handle location info request in app thread

* ... instead of queuing it for the job thread. The advantage is that
the request will be handled immediately and clients won't have to wait
for transactions (which may even require user feedback) to finish. It
complicates Volume a bit, since there are now two threads that may
access it. The shared data have been moved to a State object which is
protected by a lock.
* For commit transaction requests check whether another package request
is already pending/in progress before queuing a job. Fail immediately,
if there is.

Fixes bug #10039.


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


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

Initial changes to remove /boot/common

* find_directory() and hard-coded paths use /boot/system instead of
/boot/common.
* The build system creates the writable directories in /boot/system
instead of /boot/common.
* The build system no longer installs any packages in /boot/common.


# 23733521a7b2d6c16027654c606c6069ef026357 26-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Implement writable files handling

* Move Volume::Exception to top level and into own files.
* Add utility class FSUtils, move Volume::RelativePath there and add a
bunch of FS utility functionality.
* Add FSTransaction, a helper class to record FS operations and revert
them.
* When activating a package we now extract the writable
files/directories it declares. The handling is not quite complete:
- We don't handle merges yet. I.e. the user will have to do that
manually for now.
- We don't propagate issues/infos regarding the writable files (e.g.
that a manual intervention is required) to the user yet.


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

package daemon: Implement dependency resolution support

... for package changes performed manually by the user (i.e.
adding/removing files in a packages directory). Currently only done for
the system root. Alternative roots should still work as before, so this
shouldn't affect haikuporter (not tested yet).

Needs some more work (e.g. the GUI part).


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

package daemon: Let Root know whether it is the system root


# 85d2badf007cb152215485db7916578ed6700504 19-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Add support for activation change request

* daemon: Handle new request B_MESSAGE_COMMIT_TRANSACTION. It activates
and deactivates given sets of packages. The new packages must be
placed in a directory in the administrative directory. The daemon
moves them to the packages directory and the deactivated packages to
a subdirectory it creates. It also save the old activation state
there.
* Add private BActivationTransaction, describing an activation change
transaction.
* BDaemonClient: Add CommitTransaction(), which sends a given
BActivationTransaction as a B_MESSAGE_COMMIT_TRANSACTION request to
the daemon.

Completely untested yet.


# e6216e372af01cc90339fe7afb70c113c99974bd 14-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Implement getting a BInstallationLocationInfo

* Rename PackageDaemonDefs.h to DaemonDefs.h.
* Replace the MESSAGE_GET_PACKAGES by the new
B_MESSAGE_GET_INSTALLATION_LOCATION_INFO, which not only returns the
packages, but also other information about the installation location.
* daemon: Volume: Implement a change count which is bumped whenever
packages are activated/deactivated/added/removed. Cache the reply
for a location info request, using the change count to check whether
it is still up-to-date.
* Add private BDaemonClient for communication with the daemon.
* BRoster:
- Add GetInstallationLocationInfo() using BDaemonClient.
- Reimplement GetActivePackages(), using
GetInstallationLocationInfo().


# 62f7022a8294bbd5407826c0bb8b071975ed90d5 10-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: get active packages list from daemon

* daemon: Implement private message protocol to retrieve the active
packages.
* BPackageRoster::GetActivePackages(): Get the active packages list
from the daemon.


# 92b6d58598fb09b38150027f6cbfa38fd5fb53e6 09-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Check volume package dependencies initially

Dumps the result (i.e. found problems and solutions) to the syslog.
Eventually the user should be asked what to do when inconsistencies are
encountered.


# a6c7f5e33c2a4e8596b2901d2fbecdd579d47b36 08-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: De/-activate all changed packages together

* We first process the node monitoring events, collecting the required
package activation changes, then apply all changes together.
* Change the PackageFSActivationChangeItem/-Request structs. The former
is no longer variable in size, which makes it easier to work with.


# ebbefc0151ffae360647cf2ee50a5b28c63bda80 08-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Root: Use a common job for volume work

Add VolumeJob which, besides the Volume, takes a Root method to be
invoked. That allows to replace the specific job classes by simple
methods.


# 9e4096146fa5a20df2fc06301683853029851163 08-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Add a Listener interface for Volume

* This way, Volume doesn't have to know Root.
* Suppress listener notifications for node monitoring events when there
are were already events pending.


# 8fb3930a4290eb1156bbe53fba7947b0cd2be237 07-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Make all work with the packages asynchronous

There's now a worker thread per Root that does all the work that can
take time. Node monitoring notifications received in the main thread are
just pushed into the worker's job queue, so the application looper
remains responsive.


# 3d53bd473b49aa91a9611dfe6500492500e1e8c6 06-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package daemon: Add package monitoring and de-/activation

* packagefs: Disable (comment out) node monitoring of the packages
directory.
* package daemon:
- When a packagefs volume is added load the respective packages
directory and get from the volume which of the packages are
activated.
- Add node monitoring for the packages directory and
activate/deactivate packages as packages are added/removed.


# 26296b0aa4ddcc1b8baf1e6c380d0f8634730068 05-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add the humble beginnings of the package daemon

It doesn't really do anything yet save for tracking what packagefs
volumes are mounted and unmounted.