Commit Graph

40242 Commits

Author SHA1 Message Date
Ingo Weinhold
d7227dfa9e BPackageWriter: Add SetCheckLicenses()
The default is still "true", but now it is possible to disable the
license check.
2011-07-17 16:55:14 +02:00
Ingo Weinhold
e6067d0cf4 Change Haiku package name to lower case 2011-07-17 16:55:14 +02:00
Ingo Weinhold
a0f6347784 Fix location of the Deskbar menu symlinks 2011-07-17 16:55:14 +02:00
Ingo Weinhold
407c09e2d9 Create /packages symlink on boot
Rename the package links directory from /package-links to just /packages
and create it when booting.
2011-07-17 16:55:13 +02:00
Ingo Weinhold
3773b47514 Tracker: Sort volumes like folders
Volumes no longer have a higher sorting priority than folders when "sort
folders first" is enabled.
2011-07-17 16:55:13 +02:00
Ingo Weinhold
e96cbb12b4 Update cmake package, create doxygen package 2011-07-17 16:55:13 +02:00
Ingo Weinhold
70de928ed8 Move <directories.h> to headers/private/system 2011-07-17 16:55:13 +02:00
Ingo Weinhold
e94674ce75 cmake 2.8.5 optional package repackaged as hpkg 2011-07-17 16:55:13 +02:00
Ingo Weinhold
c98a59c653 Don't show packagefs on desktop or in disks window
More generally: Any volume that is mounted at a directory of a
persistent volume is not shown on the desktop or the disks window any
longer.
2011-07-17 16:55:12 +02:00
Ingo Weinhold
207a28efee Declare packagefs persistent
Besides that it is kind of correct, it also makes tracker queries work
correctly.
2011-07-17 16:55:12 +02:00
Ingo Weinhold
139bd32c02 Implement packagefs index (dir) hooks 2011-07-17 16:55:12 +02:00
Ingo Weinhold
bf20808710 Add set_dirent_name() without name length parameter 2011-07-17 16:55:12 +02:00
Ingo Weinhold
7915349914 Remove unused IndexIterator constructor 2011-07-17 16:55:11 +02:00
Ingo Weinhold
29ee895757 Remove references in index iterator interface
This avoids checks.
2011-07-17 16:55:11 +02:00
Ingo Weinhold
ac6706807e Remove superfluous checks 2011-07-17 16:55:11 +02:00
Ingo Weinhold
4006e48369 Check key length, if index keys are fixed length 2011-07-17 16:55:11 +02:00
Ingo Weinhold
061337ba5f Create a "BEOS:APP_SIG" index by default 2011-07-17 16:55:10 +02:00
Ingo Weinhold
55b969b13b 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-07-17 16:55:10 +02:00
Ingo Weinhold
4d67e7847b 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-07-17 16:55:10 +02:00
Ingo Weinhold
51ee03bead QueryPolicy::NodeGetAttribute(): Get the type too 2011-07-17 16:55:10 +02:00
Ingo Weinhold
278925246f Remove unused PackageNodeAttribute::fParent 2011-07-17 16:55:09 +02:00
Ingo Weinhold
a52387c669 compareKeys(): Also handle B_MIME_STRING_TYPE 2011-07-17 16:55:09 +02:00
Ingo Weinhold
3e29244600 Move B_MIME_STRING_TYPE to <TypeConstants.h> 2011-07-17 16:55:09 +02:00
Ingo Weinhold
901749cff2 Remove TwoKeyAVLTree from kernel utils again
It's not ready for shared use yet.
2011-07-17 16:55:09 +02:00
Ingo Weinhold
01f7f92aef Move helper function out of QueryParser.h
They live in the new QueryParserUtils.{h,cpp} now.
2011-07-17 16:55:08 +02:00
Ingo Weinhold
3877a7f4a0 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-07-17 16:55:08 +02:00
Ingo Weinhold
28559a4e24 Build fix 2011-07-17 16:55:08 +02:00
Ingo Weinhold
0c63c7738a Add last modified index support
* Add class LastModifiedIndex.
* Create and add an instance of it in Volume::Mount().
2011-07-17 16:55:08 +02:00
Ingo Weinhold
a5d15ca28b Removed left-over commented code 2011-07-17 16:55:08 +02:00
Ingo Weinhold
8c8e925a0a 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-07-17 16:55:07 +02:00
Ingo Weinhold
d35565bed0 Add size index support
* Add class SizeIndex.
* Create and add an instance of it in Volume mount.
2011-07-17 16:55:07 +02:00
Ingo Weinhold
d56e19fb9e 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-07-17 16:55:07 +02:00
Ingo Weinhold
0209c404dc Add comment 2011-07-17 16:55:07 +02:00
Ingo Weinhold
0780073984 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-07-17 16:55:06 +02:00
Ingo Weinhold
144129434f GenericIndexIterator: Fix NameIndex dependency
Next() was still copying the name. Add a GetNodeValue() method to the
policy that fetches the value instead.
2011-07-17 16:55:06 +02:00
Ingo Weinhold
a058fbe8a1 TwoKeyAVLTree: Add FindFirstClosest() 2011-07-17 16:55:06 +02:00
Ingo Weinhold
46368f46f3 Small cleanup 2011-07-17 16:55:06 +02:00
Ingo Weinhold
a3463d1932 Refactor NameIndexIterator into template class
Create template class GenericIndexIterator from NameIndexIterator.
2011-07-17 16:55:05 +02:00
Ingo Weinhold
773005292a 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-07-17 16:55:05 +02:00
Ingo Weinhold
9b2a170842 PackageLinkSymlink: Init fLinkPath in constructor 2011-07-17 16:55:05 +02:00
Ingo Weinhold
fb88975a7b ~NameIndex(): Make more robust
Remove the listener only, if it was registered.
2011-07-17 16:55:05 +02:00
Ingo Weinhold
49d2f608d4 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-07-17 16:55:04 +02:00
Ingo Weinhold
32ad4ceefb 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-07-17 16:55:04 +02:00
Ingo Weinhold
747578cd93 Fix NameIndexPrimaryKeyCompare
It was actually returning whether the names where not equal.
2011-07-17 16:55:04 +02:00
Ingo Weinhold
9811f22cab 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-07-17 16:55:04 +02:00
Ingo Weinhold
0c19263c85 AVLTreeMap/TwoKeyAVLTree: More access to nodes
both:
* Add Previous()/Next().
* Add Insert() version that returns a Node* instead of an Iterator.
* Add Remove() version that takes a Node* instead of a key.

TwoKeyAVLTree:
* Add GetIterator() version that takes an additional Node*, i.e.
  initializing an iterator to point to the node.
* Add Iterator::CurrentNode().
2011-07-17 16:55:03 +02:00
Ingo Weinhold
20b22dfc3d AVLTree: Add Previous()/Next() 2011-07-17 16:55:03 +02:00
Ingo Weinhold
d612248dcf Cleanup 2011-07-17 16:55:03 +02:00
Ingo Weinhold
216ba45933 Automatic whitespace cleanup 2011-07-17 16:55:03 +02:00
Ingo Weinhold
b8dae0fe7b Implement query FS hooks, add empty index FS hooks 2011-07-17 16:55:02 +02:00