47115 Commits

Author SHA1 Message Date
Ingo Weinhold
14713507a3 packagefs: Fix debug build 2013-05-25 01:12:29 +02:00
Ingo Weinhold
1559102fe7 ReaderImplBase: Fix strings subsection validity check
A strings section with 0 strings is still 1 byte long. Also improve the
error output in the error case.
2013-05-25 01:12:29 +02:00
Ingo Weinhold
521545f7fb Add padding in HPKG/HPKR headers
... so that the different alignment on 32 and 64 bit machines doesn't
change the layout.
2013-05-25 01:12:28 +02:00
Ingo Weinhold
5d3de03be5 libroot_build: Fix fs_read_attr() in fs_attr_untyped.cpp
* With a specified buffer size smaller than the attribute size the
  function would fail with ERANGE on Linux although it should just read
  as much as possible. Now we always read into our temporary data buffer
  with the full buffer size.
* Fix return value in case pos is > 0. pos must be subtracted from the
  bytes actually read.
2013-05-25 01:12:28 +02:00
Ingo Weinhold
88adb4a8e7 PackageFileHeapWriter: Add error message
... in case compression fails unexpectedly.
2013-05-25 01:12:28 +02:00
Ingo Weinhold
d03ac965a2 ReaderImplBase: Fix gcc 4 build 2013-05-25 01:12:28 +02:00
Ingo Weinhold
b05413ed78 PackageFileHeapWriter: Fix update case
* Pull _UnwriteLastPartialChunk() out of Reinit() for reuse.
* _UnwriteLastPartialChunk(): fPendingDataSize wasn't set.
* _PushChunks(): Some simplifications for clarity.
* ChunkBuffer/RemoveDataRanges(): Use data reading and decompression
  methods provided by our base class instead of duplicating the
  implementation.
* RemoveDataRanges():
  - _FlushPendingData() before starting, so we don't ignore the pending
    data and _UnwriteLastPartialChunk() when done, so a partial chunk
    is read back into the pending data buffer.
  - fUncompressedHeapSize wasn't reset before the main processing loop,
    thus resulting in an erroneous size later on.
2013-05-25 01:12:27 +02:00
Ingo Weinhold
520a7a76c7 PackageFileHeapAccessorBase: small refactoring
* Pull method DecompressChunkData() out of ReadAndDecompressChunkData()
  for potential reuse.
* Also fix/improve some error output strings.
2013-05-25 01:12:27 +02:00
Ingo Weinhold
172f25fdda PackageWriterImpl: Fix reading the package-info in update mode 2013-05-25 01:12:27 +02:00
Ingo Weinhold
96af1d283c PackageFileHeapWriter: Small style fix 2013-05-25 01:12:27 +02:00
Ingo Weinhold
06f5437c21 Add HAIKU_PACKAGE_COMPRESSION_LEVEL build variable
It allows to control the compression level used for package creation
and update. The default (9) is *very* slow, so developers may want to
use a smaller level during the regular development process to keep
turn-around times low.
2013-05-25 01:12:26 +02:00
Ingo Weinhold
796343ed73 Allow specifying the compression level for package creation
* Introduce BPackageWriterParameters which comprises all parameters
  for package creation, currently flags and compression level. Such an
  object can be passed to BPackageWriter::Init() and is passed on to
  PackageWriterImpl and WriterImplBase.
* PackageFileHeapWriter: Add compressionLevel property and pass the
  value on to ZlibCompressor.
* package add/create: Add options -0 ... -9 to specify the compression
  level to be used.
2013-05-25 01:12:26 +02:00
Ingo Weinhold
18b19ba49d ZlibCompressor: Allow setting the compression level 2013-05-25 01:12:26 +02:00
Ingo Weinhold
1f633814fa hpkg format: compress the whole heap
Instead of handling compression for individual file/attribute data we
do now compress the whole heap where they are stored. This
significantly improves compression ratios. We still divide the
uncompressed data into 64 KiB chunks and use a chunk offset array for
the compressed chunks to allow for quick random access without too much
overhead. The tradeoff is a limited possible compression ratio -- i.e.
we won't be as good as tar.gz (though surprisingly with my test
archives we did better than zip).

The other package file sections (package attributes and TOC) are no
longer compressed individually. Their uncompressed data are simply
pushed onto the heap where the usual compression strategy applies. To
simplify things the repository format has been changed in the same
manner although it doesn't otherwise use the heap, since it only stores
meta data.

Due to the data compression having been exposed in public and private
API, this change touches a lot of package kit using code, including
packagefs and the boot loader packagefs support. The latter two haven't
been tested yet. Moreover packagefs needs a new kind of cache so we
avoid re-reading the same heap chunk for two different data items it
contains.
2013-05-25 01:12:25 +02:00
Ingo Weinhold
16e5e5e4ec Some *DataReader improvements
* BFDDataReader: Add SetFD().
* BBufferDataReader: Derive from BAbstractBufferedDataReader.
2013-05-25 01:12:25 +02:00
Ingo Weinhold
21ee6d5cdc Some comment updates 2013-05-25 01:12:25 +02:00
Ingo Weinhold
0ee1651856 Rename BBlockBufferCache and friends to *Pool*
Also move BBlockBufferPoolNoLock into BHPKG namespace with the other
classes. Not sure why it wasn't there before.
2013-05-25 01:12:25 +02:00
Ingo Weinhold
7adfd76b17 Add "base package" package attribute 2013-05-25 01:12:24 +02:00
Ingo Weinhold
df29539688 Remove resolvable provides type
* Remove BPackageResolvableType and respective property from
  BPackageResolvable.
* Remove package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE_PROVIDES_TYPE.
2013-05-25 01:12:24 +02:00
Ingo Weinhold
9172ffdb06 package list/extract: Add support for hpkg format V1 2013-05-25 01:12:24 +02:00
Ingo Weinhold
11cecf980b packagefs: Add support for hpkg format V1
* Add union-like class PackageData which wraps the V1 and V2
  BPackageData classes.
* GlobalFactory: Create a data reader depending on the data format
  version.
* Package: Add a loader for V1 format and try that, if the other one
  fails.
2013-05-25 01:12:24 +02:00
Ingo Weinhold
2c32402da5 package kit: internalize BPackageDataReader
It is no longer public (or even private) API. BPackageDataReaderFactory
returns a BAbstractBufferedDataReader instead. The advantage is that
the latter doesn't have hpkg format specific dependencies.
2013-05-25 01:12:23 +02:00
Ingo Weinhold
175ff8ec77 package kit: Add BAbstractBufferedDataReader
It doesn't do much in terms of buffering, but defines an interface
buffered readers can implement, namely the additional
ReadDataToOutput() which currently BPackageDataReader specifies.
2013-05-25 01:12:23 +02:00
Ingo Weinhold
b5786b0f68 BPackageDataReader: Remove unused Size(), BlockSize() 2013-05-25 01:12:23 +02:00
Ingo Weinhold
dd0b33cb63 BPackageInfo: Support reading both HPKG format versions 2013-05-25 01:12:22 +02:00
Ingo Weinhold
ab5755a84a packagefs: PackageLeafNode: remove superfluous declaration 2013-05-25 01:12:22 +02:00
Ingo Weinhold
fc0cec5396 Bump HPKG format version 2013-05-25 01:12:22 +02:00
Ingo Weinhold
7575abbca2 Clone read support functionality for HPKG format version 1
It uses sub-namespace BPackage::BHPKG::V1. Unlike the one for the
current format version, the V1 version of BPackageInfoContentHandler
lives in BHPKG(::V1) sub-namespace and is private.
2013-05-25 01:12:22 +02:00
Ingo Weinhold
171fd58c4b package kit: some fixes for multi-version support
* Use enums/constants/functions instead of preprocessor macros.
* Missing include in PackageInfoAttributeValue.h.
* PackageReaderImpl::Init(): Check version before header size and
  return B_MISMATCHED_VALUES instead of B_BAD_DATA, if the version
  doesn't match. This allows callers to determine the condition and
  try a reader for a different version. A more flexible interface for
  that case would be nice, but since we want to support the old package
  version only temporarily, the current solution should be good enough.
2013-05-25 01:12:21 +02:00
Murai Takashi
1cabed5eee fix self-inited fTransparentMode, closing #9788.
Signed-off-by: Philippe Houdoin <philippe.houdoin@gmail.com>
hrev45710
2013-05-24 10:16:49 +02:00
Philippe Houdoin
8683f5d4ee Quick style polishing... hrev45709 2013-05-24 10:11:53 +02:00
Murai Takashi
de6f4cc900 fix self-inited fTransparentMode, closing #9788.
Signed-off-by: Philippe Houdoin <philippe.houdoin@gmail.com>
hrev45708
2013-05-24 10:04:49 +02:00
Murai Takashi
4e370115ac GIFTranslator: fix incorrectly initialized fTransparentMode
Signed-off-by: Philippe Houdoin <philippe.houdoin@gmail.com>
2013-05-24 09:45:46 +02:00
Philippe Houdoin
415962e25f Add an unittest for if_nameindex to network kit tests pool hrev45707 2013-05-24 09:44:41 +02:00
Siarzhuk Zharski
7c8e63e171 Terminal: fix handling utf-8 characters in OSC commands
Process the Operating System Control command in multibyte-aware way.
That fixes corresponding behavior for latest versions of Midnight
Commander;
hrev45706
2013-05-23 20:35:21 +02:00
Siarzhuk Zharski
3bbef9dd76 Discard Termcap and switch console apps to use Terminfo
* Switch bash, debugger, less, telnet[d] and top apps to use termcap
  functionality provided by ncurses lib instead of GNU libtermcap.so;
* NetBSD version of tput utility replaced with ncurses' one. Fixes #9606;
* terminfo database is provided as mandatory package installed during
  building target system;
* Remove libtermcap module. The termcap database source and
  corresponding build rules are not removed to provide backward compatibility -
  until all optional packages will be rebuild on upcoming system version
  using terminfo. Note that gcc2 builds may require to provide termcap a bit
  longer in the sake of binary compatibility with R5 era apps.
hrev45705
2013-05-23 14:07:50 +02:00
Pawel Dziepak
6c9c8a037c vm: fix area insertion logic
* When looking for a place for new area the size of the area to be
   inserted instead of the next area size was used to check whether
   we are already past the upper bound.
 * There was an attempt to insert area even if we were past the
   upper bound.
hrev45704
2013-05-22 19:31:26 +02:00
Pawel Dziepak
07e1875ea2 libroot: explicitly check ABI version
As Axel suggested use simple, explicit checks for legacy ABI version
instead of obscure "compatibility mode".
2013-05-22 19:31:05 +02:00
Rene Gollent
325f7bb4ec Show correct type in case a typecast has taken place. hrev45703 2013-05-21 17:37:50 -04:00
Rene Gollent
e312ed26ef Add "Cast to array" context option.
Implements a simple context shortcut allowing to cast a pointer variable
directly to a 10-element array of the type it points to. Resolves #9778.
hrev45702
2013-05-20 19:03:55 -04:00
Rene Gollent
f297d6591d Relax range setting constraints for arrays.
- VariablesView now detects if a container's range is fixed or not,
and uses that to adjust both the prompt it displays and whether or not
the parsed ranges are bounds checked.
- ArrayValueNode now returns the currently user-set range rather than
the dimension constraints, since those might not always be accurate.
2013-05-20 19:03:53 -04:00
Rene Gollent
570241e8b7 Extend ValueNode interface for ranged containers.
Add an IsContainerRangeFixed() hook which specifies whether or not
the container in question can only display elements within a fixed
lower/upper bound, i.e. B{Object}List.
2013-05-20 19:03:52 -04:00
Ingo Weinhold
7e7232aca8 Update cmake and libsolv packages 2013-05-20 18:21:41 +02:00
Gediminas Jarulaitis
a8e846d0f4 fixes errors compiling netfs and netfs_server with gcc-4.7.3
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
hrev45701
2013-05-20 12:55:26 +02:00
Oliver Tappe
f7712caf68 Update package-infos to match current Haiku version
* additionally, unify packager (to "The Haiku build system")
2013-05-20 11:27:42 +02:00
Rene Gollent
6b308faf1e Implement #9777.
- Introduce class BreakpointProxy which acts as a container for
either a breakpoint or a watchpoint. BreakpointsTableModel now stores
a single list of these rather than separate Breakpoint/Watchpoint lists.
- Switch BreakpointListView to allow multiple selection mode, and
consequently change selection/listener interfaces to use a list of
BreakpointProxy objects. Adjust implementors accordingly.
- Rework breakpoint list columns to better mesh with a unified display
of breakpoint and watchpoint information.
- Add an input filter to handle removing breakpoints when the delete
key is pressed.
hrev45700
2013-05-19 21:38:59 -04:00
Oliver Tappe
773318958f Add new package haiku_cross_devel.hpkg
* This package is meant for providing haikuporter with a development
  environment for building cross packages.
2013-05-19 23:30:23 +02:00
Oliver Tappe
dff45dfced Updated version of compiler to match BuildtoolsPM 2013-05-19 21:35:39 +02:00
Rene Gollent
74875a2e90 Revert changes to coreutils kill.c...
..introduced by cc2c83fa5ce13347f19da08a40f43c256e96d9a6 and subsequent
cleanups. Instead, patch bash's builtin kill directly to handle the kill
by name functionality. Fixes #9687 and reintroduces the ability to kill
jobs.
hrev45699
2013-05-18 10:20:39 -04:00
Niels Sascha Reedijk
81abe2a6a3 Update translations from Pootle hrev45698 2013-05-18 06:13:35 +02:00