History log of /haiku/src/kits/package/PackageRoster.cpp
Revision Date Author Comments
# b711002d 07-Aug-2019 Ryan Leavengood <leavengood@gmail.com>

HaikuDepot: Set package state when loading single package

Without this, even installed packages still get an "Install" button.

Fixes #14821.

This was implemented by adding BPackageRoster::IsPackageActive. I decided to
have this take a location since GetActivePackages also did, but as noted in my
TODO comment, I think this is awkward.

It would also be nice to show the user they have a different version of a
particular package, but that would require some changes to IsPackageActive.

Change-Id: Iab0d35eb6b671a17711b0214b15164d296927e5a
Reviewed-on: https://review.haiku-os.org/c/1694
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# dfbf1c8a 02-Aug-2019 Augustin Cavalier <waddlesplash@gmail.com>

Package Kit: Avoid discarding potential error values.

Spotted by Clang and the [[nodiscard]] patch.


# e2c7bb90 01-Mar-2019 CodeforEvolution <secundaja@gmail.com>

Add Reboot Check to BPackageRoster

A bit of an explanation for these weirdly named functions:
LatestActivePackageInfos() returns the packages on the system that are
both installed and fully set up. When packages are in the middle of being
installed, LatestInactivePackageInfos() shows the packages in the process
of being installed. Once the installation process is done,
LatestInactivePackageInfos() returns nothing. If there are packages that
can't be fully activated without a reboot, CurrentlyActivePackageInfos()
will return the same information as LatestActivePackageInfos(), or if
everything has been installed and activated, it will return no packages.

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


# 5c9672ed 17-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Add watching support for installation location package changes

Can be requested/stopped via BPackageRoster::{Start,Stop}Watching().
The notification message has the what code B_PACKAGE_UPDATE and contains
fields "event", "location", and "change count".


# 5a1c6a70 01-May-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

InstallationLocation: Rename [in]activePackages properties

Add prefix "Latest".


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


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


# 9213e9d6 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BPackageRoster::GetActivePackages()

The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.


# 9968845d 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use BStringList in package kit

Replace all instances of BObjectList<BString> by BStringList.


# 84f50b1c 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

GetRepositoryCache/Config(): return valid entry

Always create the common repository cache/config paths so the BEntry
that is returned is valid at least. Fixes BRefreshRepositoryRequest
failing when the common repository cache path didn't exist yet.


# 8c29f587 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BPackageRoster::GetActivePackages()

The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.


# 2021c984 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use BStringList in package kit

Replace all instances of BObjectList<BString> by BStringList.


# c7107206 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

GetRepositoryCache/Config(): return valid entry

Always create the common repository cache/config paths so the BEntry
that is returned is valid at least. Fixes BRefreshRepositoryRequest
failing when the common repository cache path didn't exist yet.


# 7d7ed9bf 25-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

Mostly style-related changes to package kit:
* drop 'Haiku' namespace
* rename 'Package' namespace to 'BPackageKit'
* renamed all public classes to begin with a 'B'
* renamed BPackageKit::Roster to BPackageKit::BPackageRoster to not
clash with the BRoster from the application kit.
* fix some instances of public headers including private ones

Some functional changes, too:
* JobQueue now removes and deletes dependants of failed jobs
automatically
* JobQueue supports waiting for jobs to become runnable
* added a couple of InitCheck() methods where they make sense
and invoke those in users of these classes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40287 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c9672edebef5990fe9fc81fa917287448ac1ac4 17-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Add watching support for installation location package changes

Can be requested/stopped via BPackageRoster::{Start,Stop}Watching().
The notification message has the what code B_PACKAGE_UPDATE and contains
fields "event", "location", and "change count".


# 5a1c6a7089489ff556bb69b392c64dd370802ac1 01-May-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

InstallationLocation: Rename [in]activePackages properties

Add prefix "Latest".


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


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


# 9213e9d6a8fb083184b2e9a292f2eab7b61d09f9 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BPackageRoster::GetActivePackages()

The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.


# 9968845d6988000a9235d7eb09031e80d997f31d 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use BStringList in package kit

Replace all instances of BObjectList<BString> by BStringList.


# 84f50b1ce9b34ac94d29d6d144d38be5b3f16fb4 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

GetRepositoryCache/Config(): return valid entry

Always create the common repository cache/config paths so the BEntry
that is returned is valid at least. Fixes BRefreshRepositoryRequest
failing when the common repository cache path didn't exist yet.


# 8c29f587282dbe71860169bfe1c9832c659f14c0 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BPackageRoster::GetActivePackages()

The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.


# 2021c9842e1e61a3bf0f6550725ec3baf53d44b1 16-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Use BStringList in package kit

Replace all instances of BObjectList<BString> by BStringList.


# c71072069bc544f6f2553f7fd400cbec6de28770 12-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

GetRepositoryCache/Config(): return valid entry

Always create the common repository cache/config paths so the BEntry
that is returned is valid at least. Fixes BRefreshRepositoryRequest
failing when the common repository cache path didn't exist yet.


# 7d7ed9bf4bdd7bc31e31143c402c4f96a324b30b 25-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

Mostly style-related changes to package kit:
* drop 'Haiku' namespace
* rename 'Package' namespace to 'BPackageKit'
* renamed all public classes to begin with a 'B'
* renamed BPackageKit::Roster to BPackageKit::BPackageRoster to not
clash with the BRoster from the application kit.
* fix some instances of public headers including private ones

Some functional changes, too:
* JobQueue now removes and deletes dependants of failed jobs
automatically
* JobQueue supports waiting for jobs to become runnable
* added a couple of InitCheck() methods where they make sense
and invoke those in users of these classes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40287 a95241bf-73f2-0310-859d-f6bbb57e9c96