Commit Graph

40180 Commits

Author SHA1 Message Date
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
Ingo Weinhold
6707be5403 Add create -i option for specifying a package info 2011-07-17 16:54:51 +02:00
Ingo Weinhold
4512e8d566 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-07-17 16:54:51 +02:00
Ingo Weinhold
bfbb410d1a BPackageInfo::ReadFromConfigFile() BFile& version 2011-07-17 16:54:50 +02:00
Ingo Weinhold
5b486787aa Improve FileDescriptorCloser
* Add SetTo()/Unset() methods and no-argument constructor.
* Detach() returns the FD now.
2011-07-17 16:54:50 +02:00
Ingo Weinhold
4cf5f9293f Cleanup 2011-07-17 16:54:50 +02:00
Ingo Weinhold
fd0e9e33d0 Fix bison hpkg package name 2011-07-17 16:54:50 +02:00
Ingo Weinhold
dfa6888fb2 Remove InstallCommonPackage rule 2011-07-17 16:54:49 +02:00
Ingo Weinhold
00043b5320 Use InstallOptionalHaikuImagePackage for gcc too 2011-07-17 16:54:49 +02:00
Ingo Weinhold
57af748920 Also mount "common" packagefs on boot 2011-07-17 16:54:49 +02:00
Ingo Weinhold
b0533d66a7 Add missing "cache" shine-through directory 2011-07-17 16:54:49 +02:00
Ingo Weinhold
80399d67d3 Don't create empty non-writable common directories 2011-07-17 16:54:48 +02:00
Ingo Weinhold
78c665f2c3 lpe symlink is in the pe package now 2011-07-17 16:54:48 +02:00
Ingo Weinhold
075913f32d Move gutenprint data files to system 2011-07-17 16:54:48 +02:00
Ingo Weinhold
a6e73cb9e8 Remove installoptionalpackage 2011-07-17 16:54:48 +02:00
Ingo Weinhold
bd530a0800 Remove the build platform work-arounds 2011-07-17 16:54:48 +02:00