* Rename PackageFamily to PackageLinkDirectory and derive from
Directory.
* PackageLinksDirectory: Add the PackageLinkDirectory objects as
children and remove the no longer needed hash table (we use the
Directory's child hash table).
* Add PackageLinksDirectory Directory subclass. Currently not doing
anything.
* PackageFSRoot: Create a PackageLinksDirectory.
* Volume: Add/remove the package links directory for the system volume.
Move all package specifics from now abstract Directory to new derived
class UnpackingDirectory and adjust the Volume implementation
accordingly. This concludes the Node/Directory refactoring. Neither
class is aware of packages anymore.
* Move package related methods from Node to new interface UnpackingNode.
* LeafNode and Directory derive from UnpackingNode now.
* Adjust Volume implementation accordingly.
* Introduce interface AttributeDirectoryCookie and currently only
implementation UnpackingAttributeDirectoryCookie. This is an interface
for reading/rewinding an attribute directory.
* Add abstract virtual Node::OpenAttributeDirectory() method that
returns an AttributeDirectoryCookie and implement it for derived
classes.
* In the kernel interface attribute directory hooks use
AttributeDirectoryCookie now.
* Introduce interface AttributeCookie and currently only implementation
UnpackingAttributeCookie. This is an interface for reading/stat()ing
an attribute.
* Add abstract virtual Node::OpenAttribute() method that returns an
AttributeCookie and implemented it for derived classes.
* In the kernel interface attribute hooks use AttributeCookie now. The
attribute directory hooks are unchanged.
* Introduce Version class representing a version.
* Introduce Dependency and Resolvable class and add lists of either to
Package.
* Parse package attributes and add dependencies and resolvables to
Package.
* Add a mount type to Volume and add a respective mount parameter
"mount-type" (values "system", "common", "home", "custom"). Also
implies the shine-through type, if that's not given.
* Introduce class PackageFamily which groups equally named and versioned
packages.
* Add class PackageFSRoot. Each instance represents a possible file
system root (separate roots for different chroot environments). Tracks
Volumes belonging to the same root and their packages.
We don't need to explicitly track the covered/covering nodes per mount
after all. In fs_unmount() we iterate through all vnodes multiple times
anyway and can deal with the covers/covered_by vnodes there. Also, the
root vnode doesn't need to be handled specially anymore.
* packagefs_mount(): Initialize the fs_volume earlier, so it is more
usuable in Volume::Mount().
* The new mount parameter "shine-through" can be used to specify which
shine-through mode shall be used. Can be "system", "common", "home",
and "none". Depending on the setting it is decided which directories
of the underlying file system are bind-mounted on top of ours.
* Fix infinite loop in Volume::_RemovePackageContent().
* Use the RETURN_ERROR() macro in more places to help with debugging.
* Add support function vfs_get_mount_point(), so a file system can get
its own mount point (i.e. the node it covers). Re-added
fs_mount::covers_vnode for that purpose -- the root node isn't know to
the VFS before the mount() hook returns.
* Add function vfs_bind_mount_directory() which bind-mounts a directory
to another. The Vnode::covers/covered_by mechanism is used, so this
isn't true bind-mounting, but sufficient for what we need ATM and
cheaper as well. The vnodes connected thus aren't tracked yet, which
is needed for undoing the connection when unmounting.
* get_vnode_name(): Don't use dir_read() to read the directory. Since we
have already resolved vnode to the covered vnode, we don't want the
dirents to be "fixed" to refer to the covering nodes. Such a vnode
simply wouldn't be found.
* Introduce Vnode flags for covered and covering. Can be used as a quick
check when one doesn't already hold sVnodeLock.
* Rename resolve_mount_point_to_volume_root() to
resolve_vnode_to_covering_vnode().
* Adjust all code that deals with transitions between mount points and
volume root vnodes to generally support covered/covering vnodes.
After failing to start the input server by signature, the fallback
didn't append the input server name to the servers directory returned by
find_directory().
Pull AttributeDataReader and FDDataReader implementations out of
DataReader.cpp into own source files. Thus we can avoid dependencies
(e.g. to fs_attr code) we don't need/want.
On a non-Haiku build platform map openat(), fstat(), and
FileDescriptorCloser to _kern_open(), _kern_read_stat(), and
BuildFileDescriptorCloser respectively, so symlinks can be opened and
stat()ed.
PackageWriterImpl:
* Iterate through attributes using fs_read_attr_dir() instead of
readdir(). Makes it work correctly on the build platform.
* On the build platform look up the system licenses in their source
directory rather than based on find_directory().
Since USES_BE_API is set by default on all libroot_build sources, the
error.cpp
was broken, since it wouldn't be exempt from the error mapping. Define
the
BUILDING_HAIKU_ERROR_MAPPER for it directly in the Jamfile, now.
For the xattr/BSD (untyped) attribute backend implement fs_fopen_attr()
and fs_close_attr(). A new AttributeDescriptor is created. It is
currently used in write_pos() only.