Commit Graph

40077 Commits

Author SHA1 Message Date
Ingo Weinhold bd66b7e670 Resolve dependencies to resolvables 2011-07-17 16:54:34 +02:00
Ingo Weinhold 4081d37dec ResolvableFamily: Add ResolveDependency() 2011-07-17 16:54:34 +02:00
Ingo Weinhold 0d7d1795a1 Resolvable: Add Version() getter 2011-07-17 16:54:33 +02:00
Ingo Weinhold 8a85232741 Add Dependency::ResolvableVersionMatches() 2011-07-17 16:54:33 +02:00
Ingo Weinhold 5e972a60c3 Dependency: Add Package() getter 2011-07-17 16:54:33 +02:00
Ingo Weinhold 9320567ed2 WIP towards dependency package links
* Add ResolvableFamily and DependencyFamily classes for grouping equally
  named resolvables/dependencies.
* Add hash tables to PackageFSRoot to track resolvables and
  dependencies. That is done in {Add,Remove}Package.
* Resolvable does now have a list of Dependency objects, the ones it
  satisfies.
2011-07-17 16:54:33 +02:00
Ingo Weinhold 38a7f76509 Add TODOs regarding broken add/remove behavior 2011-07-17 16:54:32 +02:00
Ingo Weinhold cd81fea02d Fix package link updates/node monitoring
* PackageLinksListener: Rename methods from *Directory*() to *Node*()
  and change parameter to Node*. Also add a *Changed() method.
* PackageLinkDirectory: Update only when necessary and what is necessary
  (currently only the self link).
2011-07-17 16:54:32 +02:00
Ingo Weinhold 35eeebddc4 Missing locking when adding/removing package nodes 2011-07-17 16:54:32 +02:00
Ingo Weinhold 83d5997db5 Add node monitoring for package link directories 2011-07-17 16:54:32 +02:00
Ingo Weinhold fd6d5d5a51 Reordered methods to match declaration order 2011-07-17 16:54:32 +02:00
Ingo Weinhold 59acdf5045 Volume: Remove all package contents on destruction 2011-07-17 16:54:31 +02:00
Ingo Weinhold 77574d40ee Init fSelfLink 2011-07-17 16:54:31 +02:00
Ingo Weinhold 5f80e51a9e Fix Volume::_RemovePackageLinksNode()
Don't use _RemoveNode() as it also removes the node from its parent.
2011-07-17 16:54:31 +02:00
Ingo Weinhold fc009a29f3 Fix NODE_FLAG_OWNS_NAME value 2011-07-17 16:54:31 +02:00
Ingo Weinhold 1382ade575 If none is given pick volume name by mount type 2011-07-17 16:54:30 +02:00
Ingo Weinhold 724fba1b09 Add Node::Init() flags parameter
* Add Node::Init() flags:
  - NODE_FLAG_KEEP_NAME: Take over ownership of the name.
  - NODE_FLAG_CONST_NAME: Don't copy the name -- it's a constant that
    lives at least as long as the object.
* Remove Init() implementations in derived classes that just call the
  base class version.
2011-07-17 16:54:30 +02:00
Ingo Weinhold 1d8edd93e2 Create self package link 2011-07-17 16:54:30 +02:00
Ingo Weinhold 70c2780c73 PackageLinksDirectory::AddPackage(): Fix check 2011-07-17 16:54:30 +02:00
Ingo Weinhold 1becdcc7c8 Empty Node::VFS{Init(),Uninit}() implementations 2011-07-17 16:54:29 +02:00
Ingo Weinhold 3e7333b7c1 Add package link directories to system volume
* Add PackageLinksListener interface. It is used by
  PackageLink[s]Directory to notify a listener about changes.
* Volume does now implement PackageLinksListener and recursively adds/
  removes package link directories.

This makes the package link directories appear at least. They are still
empty.
2011-07-17 16:54:29 +02:00
Ingo Weinhold 4031a32acc WIP: Create empty package links directories
* 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).
2011-07-17 16:54:29 +02:00
Ingo Weinhold 05d7d4818e Add support function get_real_time() 2011-07-17 16:54:29 +02:00
Ingo Weinhold a2fc40be04 Move EmptyAttributeDirectoryCookie to own files 2011-07-17 16:54:28 +02:00
Ingo Weinhold 7e57d12523 Move PackageFamily table to PackageLinksDirectory 2011-07-17 16:54:28 +02:00
Ingo Weinhold b8a96de929 Add yet empty package-links directory
* Add PackageLinksDirectory Directory subclass. Currently not doing
  anything.
* PackageFSRoot: Create a PackageLinksDirectory.
* Volume: Add/remove the package links directory for the system volume.
2011-07-17 16:54:28 +02:00
Ingo Weinhold dce13a0a8c Node: Add setters for ID and parent 2011-07-17 16:54:28 +02:00
Ingo Weinhold ffc66d8dd7 Specify mount type when mounting packagefs 2011-07-17 16:54:27 +02:00
Ingo Weinhold 5663e914c2 UnpackingDirectory: Remove unnessary methods
Remove Read() and ReadSymlink() methods which are already implemented in
Directory.
2011-07-17 16:54:27 +02:00
Ingo Weinhold 5d5bdb495e Update copyright year 2011-07-17 16:54:27 +02:00
Ingo Weinhold 511b4fe8b3 Pull derived UnpackingDirectory out of Directory
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.
2011-07-17 16:54:27 +02:00
Ingo Weinhold 876a16a21e Rename LeafNode to UnpackingLeafNode 2011-07-17 16:54:26 +02:00
Ingo Weinhold e85e0ae85a Remove package related dependencies from Node
* Move package related methods from Node to new interface UnpackingNode.
* LeafNode and Directory derive from UnpackingNode now.
* Adjust Volume implementation accordingly.
2011-07-17 16:54:26 +02:00
Ingo Weinhold e807d80833 Attribute dir access kernel interface abstraction
* 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.
2011-07-17 16:54:26 +02:00
Ingo Weinhold 3ad1037bcc Move set_dirent_name() to Utils.h 2011-07-17 16:54:26 +02:00
Ingo Weinhold b5ff7abcea Remove unused LeafNode::SymlinkPath() 2011-07-17 16:54:25 +02:00
Ingo Weinhold fa9fde956e Remove unused Node fields 2011-07-17 16:54:25 +02:00
Ingo Weinhold 8ae81ef94e Kernel interface abstraction for attribute access
* 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.
2011-07-17 16:54:25 +02:00
Ingo Weinhold 22a808885b Remove kernel_interface.cpp LeafNode dependency
Introduce abstract virtual Node::ReadSymlink() method that is now used
in packagefs_read_symlink() instead of casting to LeafNode.
2011-07-17 16:54:25 +02:00
Ingo Weinhold 4b5dbacdbf Make Volume::Read{Lock,Unlock} const 2011-07-17 16:54:24 +02:00
Ingo Weinhold 31cd721ebd Change package and resolvable version 2011-07-17 16:54:24 +02:00
Ingo Weinhold 01102ee50e WIP towards packagefs package links support
* 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.
2011-07-17 16:54:24 +02:00
Ingo Weinhold ddabac20de Rename Package "name" property to "fileName" 2011-07-17 16:54:24 +02:00
Ingo Weinhold 6e6ca8c530 Fix resolvable name 2011-07-17 16:54:23 +02:00
Ingo Weinhold 5957270c72 Print the package version nicely 2011-07-17 16:54:23 +02:00
Ingo Weinhold fe5928847a Completed vfs_bind_mount_directory() support
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.
2011-07-17 16:54:23 +02:00
Ingo Weinhold 0be138ab2f vfs_bind_mount_directory(): Fail if unmounting 2011-07-17 16:54:23 +02:00
Ingo Weinhold 19c48aa4ae fix_dirent(): Fix ref count leaks
* Only get an additional parent reference, when going to call
  vnode_path_to_vnode().
* Put the reference of the vnode vnode_path_to_vnode() returns.
2011-07-17 16:54:22 +02:00
Ingo Weinhold 9561ddca0f remove_vnode(): Also consider covering vnode busy 2011-07-17 16:54:22 +02:00
Ingo Weinhold 4ef5b631e7 Implement packagefs_get_vnode_name() hook 2011-07-17 16:54:22 +02:00