Commit Graph

40195 Commits

Author SHA1 Message Date
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
Ingo Weinhold
a3f976768e Add Query class and query management in Volume 2011-07-17 16:55:02 +02:00
Ingo Weinhold
3897e7298e Add NameIndex class and create instance in Volume 2011-07-17 16:55:02 +02:00
Ingo Weinhold
804a92da7a Add Index base class and index table in Volume 2011-07-17 16:55:02 +02:00
Ingo Weinhold
67f11c47a7 Add a global node listener mechanism 2011-07-17 16:55:01 +02:00
Ingo Weinhold
44de97031e 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-07-17 16:55:01 +02:00
Ingo Weinhold
7210d7aa58 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-07-17 16:55:01 +02:00
Ingo Weinhold
b489481920 Create /boot/apps and /boot/preferences symlinks 2011-07-17 16:55:01 +02:00
Ingo Weinhold
b5831cdf17 Disable WonderBrush until repackaged 2011-07-17 16:55:00 +02:00
Ingo Weinhold
a77ad30938 Fix loading the resolvable compatible version 2011-07-17 16:55:00 +02:00
Ingo Weinhold
b750c6bf71 Fix Dependency version comparisons 2011-07-17 16:55:00 +02:00
Ingo Weinhold
76ca98339d Postpone setting gBootDevice until after packagefs
The modules code uses gBootDevice as an indicator that modules can be
loaded from the boot volume. This is not the case until packagefs has
been mounted, though, so we postpone setting gBootDevice.
2011-07-17 16:55:00 +02:00
Ingo Weinhold
718fba99c8 PackageWriterImpl::_AddEntry(): Fix update logic
* Don't only look up the entry attribute when the entry is implicit.
  Look it up, when it is a directory instead. This aligns it the logic
  with _UpdateCheckEntryCollisions().
* When the entry attribute exits and the entry is not implicit, add file
  attributes, but not stat data. This also aligns the logic with
  _UpdateCheckEntryCollisions(), which removes colliding attributes, but
  keeps stat data.
2011-07-17 16:54:59 +02:00
Ingo Weinhold
3095cb1bc9 Remove copy'n'paste left-over 2011-07-17 16:54:59 +02:00
Ingo Weinhold
c9c6e36537 Use PropagateContainerUpdateTargetFlags rule
Propagate all update variables in CopySetHaikuRevision and for the
kernel pseudo target.
2011-07-17 16:54:59 +02:00
Ingo Weinhold
b059c5e4fc Add PropagateContainerUpdateTargetFlags rule
It propagates the HAIKU_INCLUDE_IN_IMAGE and HAIKU_INCLUDE_IN_PACKAGES
variables from one target to another.
2011-07-17 16:54:59 +02:00
Ingo Weinhold
5e2b650281 Update support for update-* targets
Set HAIKU_PACKAGES_UPDATE_ONLY and HAIKU_INCLUDE_IN_PACKAGES when one of
the pre-build-profile update-* targets are used.
2011-07-17 16:54:59 +02:00
Ingo Weinhold
fd03be4838 ExtractArchiveToContainer: Add update support
Add an alwaysUpdate parameter like the ExtractArchiveTo{Image,Package}
rules have and do the handling in the base rule.
2011-07-17 16:54:58 +02:00
Ingo Weinhold
319b1a7b3b Don't add directories explicitly to packages
Directories are added implicitly when entries are added, so there's no
need to add those directories. Directories without content don't need to
be added either, since due to the read-only nature of packages they will
remain empty.
2011-07-17 16:54:58 +02:00
Ingo Weinhold
204261b63a AddFilesToContainer: avoid unnecessary work
* If after filtering the list of targets is empty, return.
* Get the directory only afterwards.
2011-07-17 16:54:58 +02:00
Ingo Weinhold
161d45feb5 Support for package "update" build profile action
* Add global HAIKU_PACKAGES_UPDATE_ONLY build system variable, which is
  set for the "update" and "update-all" build profile actions.
* Change the HAIKU_INCLUDE_IN_CONTAINER_VAR variable on packages to
  HAIKU_INCLUDE_IN_PACKAGES for all packages. The variable is also
  set for the "update" and "update-all" build profile actions.
* Introduce HAIKU_CONTAINER_INHERIT_UPDATE_VARIABLE on container
  variable. If set, the contained variable will be set on the container
  when one or more files in it are updated. It is set on packages so an
  update of a file in a package causes the package to be updated in the
  image.
* Introduce HAIKU_CONTAINER_ALWAYS_CREATE_DIRECTORIES on container
  variable. If set, directories will be created also in update mode. It
  is set on packages.
2011-07-17 16:54:58 +02:00
Ingo Weinhold
f79277d0e7 Fix "package add" heap compacting
PackageWriterImpl::_CompactHeap(): Incorrectly used fHeapEnd instead of
the heap size. So the last copied chunk was too large.
2011-07-17 16:54:57 +02:00
Ingo Weinhold
cc3f28c0b5 PackageWriterImpl::_MoveHeapChunk(): better output 2011-07-17 16:54:57 +02:00
Ingo Weinhold
6f785748aa Write uncompressed package file TOC, if necessary 2011-07-17 16:54:57 +02:00
Ingo Weinhold
c1b5ec4065 Add "package add" command. 2011-07-17 16:54:57 +02:00
Ingo Weinhold
35f8c67c17 Move directory iteration helper to own file 2011-07-17 16:54:56 +02:00
Ingo Weinhold
1bd38c4318 Move PackageWriterListener to separate file 2011-07-17 16:54:56 +02:00
Ingo Weinhold
327b38d69c 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-07-17 16:54:56 +02:00
Ingo Weinhold
7b6bcdb146 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-07-17 16:54:56 +02:00
Ingo Weinhold
04258e4741 Use fHeapOffset instead of sizeof(hpkg_header) 2011-07-17 16:54:55 +02:00
Ingo Weinhold
abbeb15ac4 Move RegisterPackageInfo() to Finish() 2011-07-17 16:54:55 +02:00
Ingo Weinhold
c83c5423aa Add PackageReaderImpl heapOffset/Size getters 2011-07-17 16:54:55 +02:00
Ingo Weinhold
97aabbede9 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-07-17 16:54:55 +02:00
Ingo Weinhold
b3211314fc Define IDs for package section 2011-07-17 16:54:54 +02:00
Ingo Weinhold
fce74facea Add Array.h and RangeArray.h build headers 2011-07-17 16:54:54 +02:00
Ingo Weinhold
85759ab92f Add RangeArray utility class
Templatized class for managing a set of sorted non-overlapping integer
ranges. Merges and splits ranges as necessary.
2011-07-17 16:54:54 +02:00
Ingo Weinhold
5518472255 Declare Array destructor inline 2011-07-17 16:54:54 +02:00
Ingo Weinhold
eb601f803e Move Debugger's Array class to headers/shared 2011-07-17 16:54:53 +02:00
Ingo Weinhold
ffa2b2104b PackageWriterImpl::_AddEntry(): Improve output
Print the relative path instead of only the leaf name.
2011-07-17 16:54:53 +02:00
Ingo Weinhold
82af91fb0e SubPathAdder: Check for overflows, omit initial / 2011-07-17 16:54:53 +02:00
Ingo Weinhold
697b9545b1 BLowLevelPackageContentHandler interface extension
HandleAttributeDone(): Add parentToken parameter.
2011-07-17 16:54:53 +02:00
Ingo Weinhold
285f4a321a Remove debug output 2011-07-17 16:54:53 +02:00
Ingo Weinhold
52232dbf43 Print relative paths in error messages 2011-07-17 16:54:52 +02:00
Ingo Weinhold
4796acbc8c Support for extracting only specified entries 2011-07-17 16:54:52 +02:00
Ingo Weinhold
5845e79169 Missing include 2011-07-17 16:54:52 +02:00
Ingo Weinhold
4f5d405e34 Add package extract -i option
Allows to specify an alternate location for the .PackageInfo.
2011-07-17 16:54:52 +02:00
Ingo Weinhold
55191c9ac9 Remove debug output 2011-07-17 16:54:51 +02:00
Ingo Weinhold
32081667b1 Make use of package create -i option 2011-07-17 16:54:51 +02:00