Commit Graph

35466 Commits

Author SHA1 Message Date
Ingo Weinhold
93fc03aa52 Remove debug output 2011-11-25 06:18:46 +01:00
Ingo Weinhold
7395bf8a76 Add create -i option for specifying a package info 2011-11-25 06:18:45 +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
b07fd63144 Add missing "cache" shine-through directory 2011-11-25 06:18:43 +01:00
Ingo Weinhold
85e13d1ef8 Remove the build platform work-arounds 2011-11-25 06:18:42 +01:00
Ingo Weinhold
02982802e6 Disable function remapping via macros
STL fstream::open() is used, so the macros break the build.
2011-11-25 06:18:41 +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
0fbcad54be Add helper is_unknown_or_system_descriptor() 2011-11-25 06:18:40 +01:00
Ingo Weinhold
640b4ed97d _kern_read_link() ignored the path 2011-11-25 06:18:40 +01:00
Ingo Weinhold
e6466c9a34 package extract: Delay setting node permissions
In HandleEntry() create the file/directory with sufficient permissions
for the user and set the archived permissions in HandleEntryDone(). This
makes sure child attributes and entries can be created.
2011-11-25 06:18:38 +01:00
Ingo Weinhold
f2db3c439d .OPD -> .PackageInfo conversion tool 2011-11-25 06:18:38 +01:00
Ingo Weinhold
4ebd3de828 Support package info [source] URL attributes 2011-11-25 06:18:37 +01:00
Ingo Weinhold
4b6a3a9c5f Change source URL package info attribute name
Use "-" instead of "_".
2011-11-25 06:18:36 +01:00
Ingo Weinhold
029f6d0d05 Simplify BPackageInfo::Parser::_Parse() further
* Match the attribute in a loop, use an attribute ID switch, do the
  "seen" checks without the switch.
* Explicitly handle the case when encountering an unknown attribute.
2011-11-25 06:18:36 +01:00
Ingo Weinhold
208b212c56 Simplify BPackageInfo::Parser::_Parse()
This also fixes the memory leak due to the previously used on-stack
BObjectLists not having been defined owning the elements.
2011-11-25 06:18:35 +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
1338e7b6ae Make .PackageInfo more driver-settings-ish
* Use braces instead of brackets for lists.
* Semicolons and newlines separate items now. Remove handling for comma.
* Allow '\'' as quotation character.
* Remove assignment after variable name.

This should make the .PackageInfo format driver settings compatible, but
not vice versa. It is still stricter.
2011-11-25 06:18:33 +01:00
Ingo Weinhold
baa3cc3ca3 Extract architecture from package file 2011-11-25 06:18:33 +01:00
Ingo Weinhold
0da8142d99 Add architecture property to Package 2011-11-25 06:18:32 +01:00
Ingo Weinhold
bc7e181374 Small cleanup 2011-11-25 06:18:32 +01:00
Ingo Weinhold
c53e9146c2 Allow single-element string/flag lists without []
As syntactic sugar string and flag lists no longer need to be enclosed
in brackets when they have exactly one element.
2011-11-25 06:18:31 +01:00
Ingo Weinhold
2df5441165 Remove "copyright" and "license" keywords
There's "copyrights" and "licenses" which can be used.
2011-11-25 06:18:30 +01:00
Ingo Weinhold
53da7df201 Small cleanup 2011-11-25 06:18:30 +01:00
Ingo Weinhold
c5909fb0d2 Add compatible version support to packagefs 2011-11-25 06:18:29 +01:00
Ingo Weinhold
5c42c97abb Print the resolvables' compatible version 2011-11-25 06:18:29 +01:00
Ingo Weinhold
c719d46563 Support for reading compatible version attribute 2011-11-25 06:18:28 +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
dd2ab027fe Support for parsing the compatible version
In the .PackageInfo the compatible version for a resolvable can
optionally be given after the resolvable version via
"'compat[ible]' '>=' <version>".
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
8730aba210 Coding style: Fix indentation 2011-11-25 06:18:24 +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
934980dcb1 Fix copy'n'paste error for minor version part 2011-11-25 06:18:23 +01:00
Ingo Weinhold
ca852d815b Fix printf() format string warnings 2011-11-25 06:18:23 +01:00
Ingo Weinhold
c4c9e06c88 Support for auto-generated package node attributes
* Add utility class AutoPackageAttributes and AttributeCookie subclass
  AutoPackageAttributeCookie.
* UnpackingAttributeCookie::Open() does now try to create a
  AutoPackageAttributeCookie, when it doesn't find the attribute in the
  PackageNode.
* Adjust UnpackingAttributeDirectoryCookie to also list auto-generated
  attributes.

Currently the only supported attribute is "SYS:PACKAGE", which is the
file name of the package containing the node.
2011-11-25 06:18:22 +01:00
Ingo Weinhold
fdde6105e9 Added default cookie Close() implementation
Added trivial implementation for AttributeCookie::Close() and
AttributeDirectoryCookie::Close() and removed the identical Close()
implementations in derived classes.
2011-11-25 06:18:21 +01:00
Ingo Weinhold
1708e56993 Cleanup 2011-11-25 06:18:21 +01:00
Ingo Weinhold
9d918f950d Paranoia: Handle unknown mount type 2011-11-25 06:18:20 +01:00
Ingo Weinhold
7403a215d4 Volume:Mount(): Better failure output
Also use the FATAL() instead of the ERROR() macro, so something is
printed also with debugging disabled.
2011-11-25 06:18:20 +01:00
Ingo Weinhold
5e6d2a9990 Allow symlinks in the packages directory 2011-11-25 06:18:19 +01:00
Ingo Weinhold
dfd15a9eb0 Optional dependency resolution tracing 2011-11-25 06:18:18 +01:00
Ingo Weinhold
6618f2d8ef Fix dependency resolution on resolvable removable
ResolvableFamily::RemoveResolvable(): Move the resolvable's dependencies
to the update list.
2011-11-25 06:18:18 +01:00
Ingo Weinhold
5b206a827f Fix adding order dependent dependency resolution
PackageFSRoot::_AddPackage(): When adding a resolvable which isn't known
yet, make sure all already added matching dependencies are resolved.
2011-11-25 06:18:17 +01:00
Ingo Weinhold
1ea19f343c Notify when removing a package link directory 2011-11-25 06:18:17 +01:00
Ingo Weinhold
7c81c34e68 Add dependency package links
The links appear, but the dependency resolution doesn't seem to work
correctly yet.
2011-11-25 06:18:16 +01:00
Ingo Weinhold
c6dd220780 Move PackageLinkDirectory::Link to own file
And rename it to PackageLinkSymlink.
2011-11-25 06:18:16 +01:00
Ingo Weinhold
106c8c6153 Resolve dependencies to resolvables 2011-11-25 06:18:15 +01:00
Ingo Weinhold
9c494559f3 ResolvableFamily: Add ResolveDependency() 2011-11-25 06:18:14 +01:00
Ingo Weinhold
e92a5f2197 Resolvable: Add Version() getter 2011-11-25 06:18:14 +01:00
Ingo Weinhold
e71dd015a5 Add Dependency::ResolvableVersionMatches() 2011-11-25 06:18:13 +01:00
Ingo Weinhold
032ef7b25b Dependency: Add Package() getter 2011-11-25 06:18:13 +01:00
Ingo Weinhold
7d2fa6f0f8 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-11-25 06:18:12 +01:00
Ingo Weinhold
3068366ed1 Add TODOs regarding broken add/remove behavior 2011-11-25 06:18:11 +01:00
Ingo Weinhold
d8ea0a8a31 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-11-25 06:18:11 +01:00
Ingo Weinhold
265b7e0dfc Missing locking when adding/removing package nodes 2011-11-25 06:18:10 +01:00
Ingo Weinhold
214d8aec13 Add node monitoring for package link directories 2011-11-25 06:18:10 +01:00
Ingo Weinhold
452b059b3d Reordered methods to match declaration order 2011-11-25 06:18:09 +01:00
Ingo Weinhold
be1578363c Volume: Remove all package contents on destruction 2011-11-25 06:18:07 +01:00
Ingo Weinhold
8c5a05b653 Init fSelfLink 2011-11-25 06:18:07 +01:00
Ingo Weinhold
f985352ef1 Fix Volume::_RemovePackageLinksNode()
Don't use _RemoveNode() as it also removes the node from its parent.
2011-11-25 06:18:06 +01:00
Ingo Weinhold
73d93cd717 Fix NODE_FLAG_OWNS_NAME value 2011-11-25 06:18:06 +01:00
Ingo Weinhold
f9d2e7b39b If none is given pick volume name by mount type 2011-11-25 06:18:05 +01:00
Ingo Weinhold
fcdac38641 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-11-25 06:18:04 +01:00
Ingo Weinhold
d78a784b4b Create self package link 2011-11-25 06:18:04 +01:00
Ingo Weinhold
cc92b95487 PackageLinksDirectory::AddPackage(): Fix check 2011-11-25 06:18:03 +01:00
Ingo Weinhold
f2235ed5bf Empty Node::VFS{Init(),Uninit}() implementations 2011-11-25 06:18:03 +01:00
Ingo Weinhold
fe49869e03 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-11-25 06:18:02 +01:00
Ingo Weinhold
b5baaa8428 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-11-25 06:18:01 +01:00
Ingo Weinhold
e0b81fa38e Add support function get_real_time() 2011-11-25 06:18:01 +01:00
Ingo Weinhold
d175681861 Move EmptyAttributeDirectoryCookie to own files 2011-11-25 06:18:00 +01:00
Ingo Weinhold
ad9c25bfea Move PackageFamily table to PackageLinksDirectory 2011-11-25 06:18:00 +01:00
Ingo Weinhold
63875d1702 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-11-25 06:17:59 +01:00
Ingo Weinhold
9e31aaa934 Node: Add setters for ID and parent 2011-11-25 06:17:58 +01:00
Ingo Weinhold
f33a6b765a UnpackingDirectory: Remove unnessary methods
Remove Read() and ReadSymlink() methods which are already implemented in
Directory.
2011-11-25 06:17:58 +01:00
Ingo Weinhold
0da915a909 Update copyright year 2011-11-25 06:17:57 +01:00
Ingo Weinhold
e16ce53bcc 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-11-25 06:17:57 +01:00
Ingo Weinhold
097e795f8e Rename LeafNode to UnpackingLeafNode 2011-11-25 06:17:56 +01:00
Ingo Weinhold
20142717e7 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-11-25 06:17:55 +01:00
Ingo Weinhold
5167a80703 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-11-25 06:17:55 +01:00
Ingo Weinhold
4ac4d15c3a Move set_dirent_name() to Utils.h 2011-11-25 06:17:54 +01:00
Ingo Weinhold
0e0e9b4575 Remove unused LeafNode::SymlinkPath() 2011-11-25 06:17:54 +01:00
Ingo Weinhold
82c5739d76 Remove unused Node fields 2011-11-25 06:17:53 +01:00
Ingo Weinhold
882b03aba9 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-11-25 06:17:52 +01:00
Ingo Weinhold
04ea367975 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-11-25 06:17:52 +01:00
Ingo Weinhold
1ac0daa99f Make Volume::Read{Lock,Unlock} const 2011-11-25 06:17:51 +01:00
Ingo Weinhold
991ba9fddf 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-11-25 06:17:51 +01:00
Ingo Weinhold
cc1dc4db4c Rename Package "name" property to "fileName" 2011-11-25 06:17:50 +01:00
Ingo Weinhold
f1ae591771 Print the package version nicely 2011-11-25 06:17:49 +01:00
Ingo Weinhold
04999b6cf9 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-11-25 06:17:49 +01:00
Ingo Weinhold
1b08a68a4f vfs_bind_mount_directory(): Fail if unmounting 2011-11-25 06:17:48 +01:00
Ingo Weinhold
8855625e9e 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-11-25 06:17:47 +01:00
Ingo Weinhold
e4320fd78c remove_vnode(): Also consider covering vnode busy 2011-11-25 06:17:47 +01:00
Ingo Weinhold
bd85d7c7b9 Implement packagefs_get_vnode_name() hook 2011-11-25 06:17:46 +01:00
Ingo Weinhold
7ed608c615 Remove debug output 2011-11-25 06:17:46 +01:00
Ingo Weinhold
6e2af637b9 Add support for shine-through directories
* 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.
2011-11-25 06:17:45 +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
02be66ca10 Replaced fs_mount::covers_vnode by Vnode::covers
Introduce a Vnode::covers field. It is currently only used for the root
node of an fs_mount, replacing fs_mount::covers_vnode.
2011-11-25 06:17:42 +01:00
Ingo Weinhold
7bb72b8daf Comment typo fixes 2011-11-25 06:17:41 +01:00
Ingo Weinhold
7ea4dbcecf Hard code "Public Domain" as acceptable license 2011-11-25 06:17:41 +01:00
Ingo Weinhold
d5df784299 Fixed input server start fallback
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().
2011-11-25 06:17:40 +01:00
Ingo Weinhold
16ca035b2b Nicer error output 2011-11-25 06:17:40 +01:00
Ingo Weinhold
870d5c92fe write_pos(): Fix return value for attribute writes 2011-11-25 06:17:39 +01:00
Ingo Weinhold
2cce5a0a05 fs_write_attr(): Allow 0-length NULL buffer 2011-11-25 06:17:38 +01:00
Ingo Weinhold
0f15206ac9 ReaderImplBase::ParseStrings(): Avoid new[0] 2011-11-25 06:17:38 +01:00
Ingo Weinhold
fab5eddca9 Split package kit DataReader.cpp
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.
2011-11-25 06:17:37 +01:00
Ingo Weinhold
caa4217eb5 PackageWriterImpl: Build platform symlink issues
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.
2011-11-25 06:17:37 +01:00
Ingo Weinhold
7162cff6b0 <build>package: attribute iteration, license dir
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().
2011-11-25 06:17:36 +01:00
Ingo Weinhold
06cdc7e6d9 libroot_build: fix error.ccp build
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.
2011-11-25 06:17:35 +01:00
Ingo Weinhold
2aedac8df2 Build the package tool for the build platform 2011-11-25 06:17:35 +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
d62ec0bd75 Fixed host build issues/warnings 2011-11-25 06:17:33 +01:00
Ingo Weinhold
d9516a06cc Open/close attribute support for xattrs backend
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.
2011-11-25 06:17:32 +01:00
Ingo Weinhold
b19dacd077 Added driver settings and find_directory() support.
find_directory() is a very simplified implementation, only supporting
what we currently need.
2011-11-25 06:17:31 +01:00
Ingo Weinhold
37c83f4e8f Made the check for B_BUFFER_OVERFLOW more flexible. 2011-11-25 06:17:30 +01:00
Ingo Weinhold
cdf4afaaf4 Use fs_close_attr()/write_pos() instead of close()/pwrite().
This makes it easier to reuse the code on non-Haiku platforms.
2011-11-25 06:17:30 +01:00
Ingo Weinhold
c3093f6d0f Fixed printf() format related warnings. 2011-11-25 06:17:29 +01:00
Ingo Weinhold
dad288f954 Removed obsolete TODO. 2011-11-25 06:17:29 +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
8fd51c0819 Use ErrnoMaintainer in setlocale() to protect errno.
* this avoids spurious errno changes leaking into application code,
  which could become confused - i.e. 'rm' on a gcc4 build would always
  prompt for confirmation

I spend a couple of hours hunting down the behavioural difference
between gcc2- and gcc4-builds and it turns out that the reason for that
is that gcc4's libstdc++-code initializes its own locale data via the
POSIX calls, which trigger (correct) errno value changes, which were the
ones leaking into application code.
2011-11-24 23:48:19 +01:00
Oliver Tappe
59e43b2ac9 Add tracing to some locale backend functions. 2011-11-24 23:48:18 +01: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
Jérôme Leveque
6fabf01910 ice1712: Style cleanup and improvements 2011-11-24 20:54:41 +01:00
Jérôme Duval
dea8f9c766 usb_printer: support for alternate interfaces, not just the default one.
* Tested with a Profilic USB-Parallel adapter and a Laserjet printer.
2011-11-24 18:59:42 +01:00
Philippe Saint-Pierre
6b41836304 Add missing break statement
Fix CID 3304
2011-11-23 20:57:12 -05:00
Philippe Saint-Pierre
e904435328 Missing break statement
Resolves CID 3401
2011-11-23 20:00:25 -05: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
Oliver Tappe
53c09cffcb Actually store & use our assigned TLS-key (OOPS!) 2011-11-23 19:32:17 +01:00
Oliver Tappe
5c112a16ff Reset mbstate to initial in wcrtomb() with 0 wchar. 2011-11-23 19:31:13 +01:00
Oliver Tappe
9161a59746 Fix build of libroot-addon-icu with gcc4. 2011-11-22 23:27:17 +01:00
Oliver Tappe
bb79d18614 Drop no longer needed multibyte stuff from glibc. 2011-11-22 18:56:41 +01:00
Oliver Tappe
b4435552a7 Drop our old, limited multibyte implementation. 2011-11-22 18:38:43 +01:00
Oliver Tappe
cc5eca7554 Activate our new multibyte implementation.
* add implementations for the following multibyte-related
  functions:
    btwoc()
    mblen()
    mbrlen()
    mbrtowc()
    mbsinit()
    mbtowc()
    wcrtomb()
    wcswidth()
    wctob()
    wctomb()
* the implementation of the above function live in a symbol
  named __<name>, the above symbol names are defined as a weak
  alias to the internal ones - TODO: we need to make sure to
  only invoked the internal functions (i.e. prepended with __)
  in order to avoid problems with symbol preemption.
* deactivate the limited mb implementation we provided before,
  as well as respective stuff from glibc
2011-11-22 18:31:27 +01:00
Oliver Tappe
28ae43d033 Add multibyte-support to ctype-locale backend.
* add actual converter methods MultibyteToWchar() and WcharToMultibyte()
  to locale backend and implement them in the ctype subpart
* add management code for maintaining converters referenced by mbstate_t
2011-11-22 18:17:58 +01:00
Oliver Tappe
e0eb1d38c4 Let MB_CUR_LEN lookup the actual value.
* instead of yielding 1, MB_CUR_LEN now looks up the correct
  value in the ctype data provided by the locale backend
2011-11-22 17:32:39 +01:00
Oliver Tappe
bf5ff48092 Use TLS and converter manager in locale backend. 2011-11-22 17:17:18 +01:00
Oliver Tappe
bcadc4ca66 Start work on multibyte-support in locale backend.
* add ICUThreadLocaleStorageValue, which will be used to maintain
  per-thread ICU converters
* add ICUConverterManager
2011-11-22 16:55:39 +01:00
Oliver Tappe
02606f712c Provide BReferenceable in libreferenceable.a, too.
* the upcoming multibyte-implementation in libroot's ICU locale
  backend is going to use this, so it's not good enough to provide
  BReferenceable only in libbe.so
2011-11-22 16:43:53 +01:00
Oliver Tappe
3a57f54e4d Glibc-features: protect against existing __STDC_ISO_10646__.
* we define it in our compilers now, but glibc expects to define
  this itself - we let our own version overrule
2011-11-22 16:34:18 +01:00
Oliver Tappe
fc4fa46848 Fix charset and drop debug output in gnulib-test-btwoc. 2011-11-22 16:21:03 +01:00
François Revol
a8eaac6934 U-Boot: board-specific setup is already in build/jam/board/ 2011-11-22 02:27:11 +01:00
Axel Dörfler
e2c30bd6c2 Forgot to include the Jamfile in the commit.
* The socket API is now actually available.
2011-11-22 00:00:33 +01:00
Axel Dörfler
29e07dd0eb Added a buffered DataIO subclass.
* Only the read path is tested so far.
2011-11-21 23:55:13 +01:00
Alexander von Gluck IV
0cd972316d Add first hints of thermal monitoring on radeon cards
* add a few missing/needed header defines
* show GPU temp in millidegrees C on r600/r700
* evergreen+ support soon
* function may be moved to driver long term once testing done
2011-11-21 17:54:27 -06:00