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.
* It no longer consists of a BPackageResolvableExpression and a
repository. Instead it can now either refer to a package directly or
consist of a search string.
* SolverPackageSpecifierList: Add AppendSpecifier() convenience
versions.
* Adjust LibsolvSolver and pkgman accordingly.
* 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.
* _Init() was a bit too enthusiastic, throwing really everything away.
So, after calling it at the beginning of _AddRepositories() there
wouldn't be any repositories anymore.
* Rename _Init() to _InitPool() to make its purpose clearer.
* Pull a _CleanupPool() out of _Cleanup() that only deletes the pool
and anything depending on it.
* RepositoryInfo::HasChanged(): Always consider changed when there's no
libsolv repo yet.
* daemon: Implement private message protocol to retrieve the active
packages.
* BPackageRoster::GetActivePackages(): Get the active packages list
from the daemon.
Volume::_AddInitialPackagesFromDirectory(): Use openat() instead of
dup() to get a FD for the packages directory. Currently our fdopendir()
implementation doesn't use it directly anyway, but in theory it could
and would then change the state of the original FD.
If the file exists load only the packages specified in it. If it doesn't
exist or any kind of error occurs, fall back to loading all packages in
the packages directory.
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.
* 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.
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.
* 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.
* Add PACKAGE_FS_OPERATION_GET_PACKAGE_INFOS which returns the node refs
of all packages activated.
* Add PACKAGE_FS_OPERATION_CHANGE_ACTIVATION to activate/deactivate
multiple packages.
* The package directory path specified when mounting must be interpreted
in the caller's I/O context. We did always interpret it in the
kernel's I/O context, so that a relative path or a path in a chroot
environment wouldn't work correctly. Now opening the directory is done
in PackageDomain::Init() where we can at least guess the path's
origin.
* We also normalize the path, though merely to get more conclusive debug
output, since after opening the directory the path isn't used for
anything else anymore.
* Make the "packages" mount parameter optional. If not specified, use
the "packages" folder at our mount point.
B_ALREADY_WIRED, which was erroneously passed for the area protection
parameter to map_backing_store(), has the value 7 which implies user
readable and writable. Hence the address ranges around 0xdeadbeef and
0xcccccccc could actually be read and written from anywhere.