Commit Graph

6663 Commits

Author SHA1 Message Date
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
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
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
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
Ingo Weinhold
004b3604a0 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-11-25 06:19:10 +01:00
Ingo Weinhold
e7346707c9 AVLTree: Add Previous()/Next() 2011-11-25 06:19:10 +01:00
Ingo Weinhold
856c114ca0 Add TwoKeyAVLTree to kernel utils
This is a tree implementation with elements with primary and secondary
key. The code is a cleaned up version of ramfs's implementation. ramfs
doesn't use this version yet.
2011-11-25 06:19:05 +01:00
Ingo Weinhold
9d698c4573 Create a generalized version of BFS's query code
The new version is templatized over a QueryPolicy which provides the
interface to the file system specifics.
2011-11-25 06:19:05 +01:00
Ingo Weinhold
8ffba2a6cb Write uncompressed package file TOC, if necessary 2011-11-25 06:19:00 +01:00
Ingo Weinhold
00bc8e9cbd Add support for adding/updating package entries
Add flags parameter to BPackageWriter::Init() (and the private
implementation classes) to indicate that an existing package file shall
be updated instead of created. Currently that always happens in-place.
2011-11-25 06:18:58 +01:00
Ingo Weinhold
de9e64b235 Write uncompressed package attributes if necessary
When compression doesn't save space, using it nonetheless results in a
file that the reader complains about. So we fall back to writing an
uncompressed package attributes section in such a case.

The same still needs to be done for the TOC section.
2011-11-25 06:18:57 +01:00
Ingo Weinhold
5bb68d85fc Add PackageReaderImpl heapOffset/Size getters 2011-11-25 06:18:56 +01:00
Ingo Weinhold
78811461b1 Add BLowLevelPackageContentHandler section hooks
* Add hooks HandleSectionStart() and HandleSectionEnd(). They are
  invoked to bracket package file section, so the handler can
  discriminate which section the attributes belong to.
  HandleSectionStart() features a return parameter _handleSection, which
  allows to handler to pick which sections it wants to handle.
* "package dump" does now print the section names.
2011-11-25 06:18:55 +01:00
Ingo Weinhold
f9caa05c2a Define IDs for package section 2011-11-25 06:18:55 +01:00
Ingo Weinhold
1dd17fa77f Add Array.h and RangeArray.h build headers 2011-11-25 06:18:54 +01:00
Ingo Weinhold
29d45d5ee7 Add RangeArray utility class
Templatized class for managing a set of sorted non-overlapping integer
ranges. Merges and splits ranges as necessary.
2011-11-25 06:18:53 +01:00
Ingo Weinhold
26589141fc Declare Array destructor inline 2011-11-25 06:18:53 +01:00
Ingo Weinhold
9395c27062 Move Debugger's Array class to headers/shared 2011-11-25 06:18:52 +01:00
Ingo Weinhold
2fce201893 BLowLevelPackageContentHandler interface extension
HandleAttributeDone(): Add parentToken parameter.
2011-11-25 06:18:50 +01:00
Ingo Weinhold
0f9a98a419 Add optional FD parameter to AddEntry()
If a FD is specified, instead of using the file with the given the FD is
used. Allows for adding entries without first copying them into the
directory structure.
2011-11-25 06:18:45 +01:00
Ingo Weinhold
cd8f03a8cc BPackageInfo::ReadFromConfigFile() BFile& version 2011-11-25 06:18:44 +01:00
Ingo Weinhold
d046296e85 Improve FileDescriptorCloser
* Add SetTo()/Unset() methods and no-argument constructor.
* Detach() returns the FD now.
2011-11-25 06:18:44 +01:00
Ingo Weinhold
efb6462777 Cleanup 2011-11-25 06:18:43 +01:00
Ingo Weinhold
55bc371993 Wrap POSIX FD functions in libroot_build
This makes opening symlinks work universally in the build system tools.
Two mechanisms have been implemented, both of which don't always work.
The first is remapping via preprocessor macros. This fails where equally
named methods are used (e.g. STL fstream::open()). The other is using
hidden functions in the new libroot_build_function_remapper.a that is
linked into everything that is linked against libroot_build.so. This one
fails for functions that are defined inline in headers (Linux/glibc does
that). Together they seem to cover our build system needs ATM.
2011-11-25 06:18:41 +01:00
Ingo Weinhold
c29492a252 Fix gcc 2 build by making Parser a friend 2011-11-25 06:18:39 +01:00
Ingo Weinhold
3a802b3d7f Add URL/source URL hpkg package attributes 2011-11-25 06:18:35 +01:00
Ingo Weinhold
eb7e89518a Add url and sourceURL properties to BPackageInfo
Also extend the parser to accept "url" and "source-url" attributes.
2011-11-25 06:18:34 +01:00
Ingo Weinhold
9e93bb4bfc Write resolvable compatible version to the package
To avoid a clash with the regular version or an extra attribute level we
use the "package:provides.compatible" package attribute instead of
"package:version.major".
2011-11-25 06:18:27 +01:00
Ingo Weinhold
622ca02bc1 Add package attribute for compatible version 2011-11-25 06:18:26 +01:00
Ingo Weinhold
4438ef7a2c BPackageResolvable: Add compatibleVersion property 2011-11-25 06:18:25 +01:00
Ingo Weinhold
ea754ce710 BPackageResolvableData: Compatible version field
Add fields haveCompatibleVersion and compatibleVersion. This allows us
to have a minimum version a resolvable is backwards compatible with.
2011-11-25 06:18:25 +01:00
Ingo Weinhold
8f314372a8 Introduce a pre-release version component
* The version string pattern is now:
  <major>[.<minor>[.<micro>]][-<pre>][-<release>]
* Introduce B_HPKG_ATTRIBUTE_ID_PACKAGE_VERSION_PRE_RELEASE package
  attribute.
* Add "preRelease" field to BPackageVersionData.
* Add "preRelease" property to BPackageVersion and packagefs's Version.
* Adjust package reader and writer code accordingly.
2011-11-25 06:18:24 +01:00
Ingo Weinhold
54e721afeb Add support for bind-mounting directories
* 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.
2011-11-25 06:17:44 +01:00
Ingo Weinhold
f4a1387cea Add vfs_ prefix to resolve_vnode_to_covering_vnode() 2011-11-25 06:17:44 +01:00
Ingo Weinhold
47ea54c55b Generalize use of Vnode::covered_by/covers
* 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.
2011-11-25 06:17:43 +01:00
Ingo Weinhold
7ed37afaba Build libpackage for the build platform 2011-11-25 06:17:34 +01:00
Ingo Weinhold
c4b463c5cd Added several APIs to libbe_build/libshared_build 2011-11-25 06:17:33 +01:00
Ingo Weinhold
dff6f3c1ca Updated to current Haiku version 2011-11-25 06:17:32 +01:00
Ingo Weinhold
38b54295ff Added missing <StorageDefs.h> include. 2011-11-25 06:17:28 +01:00
Ingo Weinhold
287243ab5f Added very simple BLooper class to libbe_build. 2011-11-25 06:17:27 +01:00
Oliver Tappe
323b65468e Filtered flat import of Oliver's svn package management branch
Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
  deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
  <directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
  DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
  ~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.
2011-11-25 06:17:07 +01:00
Alexander von Gluck IV
cb050a33be Add support for thermal status queries on newer chipsets
* add temperature query support for Juniper, Sumo, Evergreen, and North Islands
* add missing thermal defines for evergreen cards
* northern island cards use the evergreen thermal calculations
2011-11-24 19:42:45 -06:00
Oliver Tappe
ae90193596 Introduce __set_errno() throughout libroot.
* add errno_private.h, which defines the __set_errno() macro with
  and without tracing
* instead of setting errno manually, all libroot's code now invokes
  __set_errno(), which makes it much easier to trace changes to errno
* redirect glibc's use of __set_errno() to our own version
2011-11-24 23:48:18 +01:00
Oliver Tappe
1f84898190 Let ErrnoMaintainer restore errno unconditionally.
* we never want to let ICU calls change the errno at all, so we always
  restore it to the value it had before entering ICU (not just if it
  was 0)
2011-11-24 23:48:18 +01:00
Oliver Tappe
c894d1868e Bring rewritten multibyte-support into repository.
* update copyrights of locale backend files

Multibyte-support has been rewritten to use ICU as backend.
While this does not necessarily work properly in every aspect
(e.g. the shell still has [different] problems with multibyte-
characters now), it does fix #6263 and #7700.
2011-11-23 19:55:34 +01:00