Commit Graph

41571 Commits

Author SHA1 Message Date
Ingo Weinhold
8fb0681018 Implement more virtuals in Node and Directory
* Node: Add default implementations for UserID(), GroupID(),
  OpenAttributeDirectory(), and OpenAttribute().
* Directory: Add default implementations for Mode() and FileSize().
* Remove the respective hook implementations in the PackageLink*
  classes.
2011-11-25 06:19:40 +01:00
Ingo Weinhold
84f50b1ce9 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.
2011-11-25 06:19:39 +01:00
Ingo Weinhold
ad4fba78b2 Initialize BRepositoryInfo::fInitStatus 2011-11-25 06:19:39 +01:00
Ingo Weinhold
56fed01db3 Handle the newer package attributes 2011-11-25 06:19:38 +01:00
Ingo Weinhold
18126bc7c7 Notify earlier when removing a package node
Volume::_RemovePackageNode(): Notify listeners before removing the last
package node from the node, . This prevents the size/last modified
indices from not finding the node anymore, since the node would return
a default value instead of the value it was added to the index with.
2011-11-25 06:19:38 +01:00
Ingo Weinhold
f391c9b0ea Add UnpackingNode::IsOnlyPackageNode()
It returns whether the given package node is the only package node
attached to that node.
2011-11-25 06:19:37 +01:00
Ingo Weinhold
0a9478a707 Force package names and versions to lower case 2011-11-25 06:19:37 +01:00
Ingo Weinhold
17a7f65c0a Add install path support to packagefs 2011-11-25 06:19:36 +01:00
Ingo Weinhold
1fc3ceeda2 Add options -b and -I to package command
* With -b building a build package can be requested. It will be empty
  save for the .PackageInfo. No license check is performed.
* -I allows to specify an install path.
2011-11-25 06:19:35 +01:00
Ingo Weinhold
6ae0ecd49a Add a package info "install-path" attribute
The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.
2011-11-25 06:19:35 +01:00
Ingo Weinhold
7efa133cb4 BPackageWriter: Add SetCheckLicenses()
The default is still "true", but now it is possible to disable the
license check.
2011-11-25 06:19:34 +01:00
Ingo Weinhold
14f94ae7d4 Fix location of the Deskbar menu symlinks
Conflicts:

	build/jam/OptionalPackages
2011-11-25 06:19:34 +01:00
Ingo Weinhold
609fc55f96 Rename the package links directory
Rename the package links directory from /package-links to just
/packages.
2011-11-25 06:19:33 +01:00
Ingo Weinhold
bde1972229 Move <directories.h> to headers/private/system 2011-11-25 06:19:32 +01:00
Ingo Weinhold
9076c04c01 Declare packagefs persistent
Besides that it is kind of correct, it also makes tracker queries work
correctly.
2011-11-25 06:19:32 +01:00
Ingo Weinhold
0b45c28c4f Implement packagefs index (dir) hooks 2011-11-25 06:19:31 +01:00
Ingo Weinhold
3b97d999e7 Add set_dirent_name() without name length parameter 2011-11-25 06:19:31 +01:00
Ingo Weinhold
9590b31b31 Remove unused IndexIterator constructor 2011-11-25 06:19:30 +01:00
Ingo Weinhold
e8d560154a Remove references in index iterator interface
This avoids checks.
2011-11-25 06:19:30 +01:00
Ingo Weinhold
1197afa806 Remove superfluous checks 2011-11-25 06:19:29 +01:00
Ingo Weinhold
08bed1acb7 Check key length, if index keys are fixed length 2011-11-25 06:19:28 +01:00
Ingo Weinhold
8db89f6336 Create a "BEOS:APP_SIG" index by default 2011-11-25 06:19:28 +01:00
Ingo Weinhold
03aed3a314 Attribute index support for non-special attributes
* Add AttributeIndex class.
* Each attribute does now have an attribute index cookie. The new
  attribute index service methods Node::IndexAttribute() and
  IndexCookieForAttribute() create+set/retrieve the cookie. The cookie
  is actually the attribute index's tree node.
* Add OldNodeAttribute::IndexCookieForAttribute() so the cookie is
  available when the node changes.
2011-11-25 06:19:27 +01:00
Ingo Weinhold
1cf4d082ab More abstraction in GenericIndexIterator
* Move tree node operations to a subpolicy TreePolicy.
* Add a GenericIndexIteratorTreePolicy templatized over the policy,
  implementing the tree policy for the standard indices.
2011-11-25 06:19:27 +01:00
Ingo Weinhold
af1cc77849 QueryPolicy::NodeGetAttribute(): Get the type too 2011-11-25 06:19:26 +01:00
Ingo Weinhold
28269859c8 Remove unused PackageNodeAttribute::fParent 2011-11-25 06:19:25 +01:00
Ingo Weinhold
8b07f87a91 compareKeys(): Also handle B_MIME_STRING_TYPE 2011-11-25 06:19:25 +01:00
Ingo Weinhold
a54f7dc250 Move B_MIME_STRING_TYPE to <TypeConstants.h> 2011-11-25 06:19:24 +01:00
Ingo Weinhold
2c5c1adc91 Remove TwoKeyAVLTree from kernel utils again
It's not ready for shared use yet.
2011-11-25 06:19:23 +01:00
Ingo Weinhold
6cc3dcdb9b Move helper function out of QueryParser.h
They live in the new QueryParserUtils.{h,cpp} now.
2011-11-25 06:19:23 +01:00
Ingo Weinhold
8fd0aea602 AVLTreeMap fixes
* AVLTreeMap::_GetKey(): Change return type from const Key& to Key, so
  the strategy can do that as well and doesn't have have a Key object in
  the node.
* Fix the Auto strategy: It was using the undefined _GetKey() instead
  of GetKey().
2011-11-25 06:19:22 +01:00
Ingo Weinhold
c5c7c2d817 Build fix 2011-11-25 06:19:21 +01:00
Ingo Weinhold
ed81de869e Add last modified index support
* Add class LastModifiedIndex.
* Create and add an instance of it in Volume::Mount().
2011-11-25 06:19:21 +01:00
Ingo Weinhold
e708cdd90f Removed left-over commented code 2011-11-25 06:19:20 +01:00
Ingo Weinhold
ab6a1e0f74 QueryParser: The last_modified index is time_t
* Changed value type from B_INT64_TYPE to B_INT32_TYPE.
* Changed QueryPolicy::NodeGetLastModifiedTime() return value from
  bigtime_t to time_t.
2011-11-25 06:19:20 +01:00
Ingo Weinhold
3793289c21 Add size index support
* Add class SizeIndex.
* Create and add an instance of it in Volume mount.
2011-11-25 06:19:19 +01:00
Ingo Weinhold
0d988526bc GenericIndexIterator: Add node change helpers
Add NodeChangeBegin()/NodeChangeEnd() methods that can be used by the
index when the respective node attribute has changed. They make sure
that the iterator doesn't move with the node, should it be inserted into
the index at a different position.
2011-11-25 06:19:19 +01:00
Ingo Weinhold
304eaea680 Add comment 2011-11-25 06:19:18 +01:00
Ingo Weinhold
84989de15b GenericIndexIterator::SetTo(): Find fuzzily
Use TwoKeyAVLTree::FindFirstClosest() instead of FindFirst(), so, if the
value isn't in the index, we find the closest greater value. That's the
semantics Index::InternalFind() is expected to have.
2011-11-25 06:19:17 +01:00
Ingo Weinhold
abaf82e5a9 GenericIndexIterator: Fix NameIndex dependency
Next() was still copying the name. Add a GetNodeValue() method to the
policy that fetches the value instead.
2011-11-25 06:19:17 +01:00
Ingo Weinhold
f4bb0389e8 TwoKeyAVLTree: Add FindFirstClosest() 2011-11-25 06:19:16 +01:00
Ingo Weinhold
e88759a518 Small cleanup 2011-11-25 06:19:16 +01:00
Ingo Weinhold
24c2d0cc09 Refactor NameIndexIterator into template class
Create template class GenericIndexIterator from NameIndexIterator.
2011-11-25 06:19:15 +01:00
Ingo Weinhold
182e58f709 NodeListener::NodeChanged(): Provide old value
* Add interface OldNodeAttributes an instance of which is passed to
  NodeListener::NodeChanged() to provide the old attribute values
  (currently only modification time and file size).
* Also extend PackageLinksListener::PackageLinkNodeChanged() with a
  OldNodeAttributes parameter.
* Add OldNodeAttributes implementations for PackageLinkSymlink (inner
  class OldAttributes) and UnpackingNode (OldUnpackageNodeAttributes).
2011-11-25 06:19:15 +01:00
Ingo Weinhold
ac490e3bb9 PackageLinkSymlink: Init fLinkPath in constructor 2011-11-25 06:19:14 +01:00
Ingo Weinhold
670b0d106a ~NameIndex(): Make more robust
Remove the listener only, if it was registered.
2011-11-25 06:19:13 +01:00
Ingo Weinhold
8373bcd169 Name::Index(): Fix initialization order
Add the node listener directly after calling the base class Init().
Otherwise, on error, the we could try to remove the listener although it
wasn't added in the first place.
2011-11-25 06:19:13 +01:00
Ingo Weinhold
989addc209 Simplify [Abstract]IndexIterator interface
* Remove Current() and Previous() and add a HasNext() instead.
* Reimplement NameIndexIterator. It directly works with tree nodes
  instead of using an iterator, now.
2011-11-25 06:19:12 +01:00
Ingo Weinhold
dcc6ab5408 Fix NameIndexPrimaryKeyCompare
It was actually returning whether the names where not equal.
2011-11-25 06:19:12 +01:00
Ingo Weinhold
502a5e2388 QueryParser: Explicitly suspend/resume iterators
Extended policy by IndexIteratorSuspend() and IndexIteratorResume()
methods that are invoked for the index iterator by Query::GetNextEntry()
after entering respectively before exiting.
2011-11-25 06:19:11 +01:00