History log of /haiku/src/kits/package/hpkg/ReaderImplBase.cpp
Revision Date Author Comments
# 0cf34918 26-Oct-2021 Augustin Cavalier <waddlesplash@gmail.com>

Remove ZSTD_ENABLED checks from the Package Kit.

BZstdCompressionAlgorithm already has these #ifdefs and will
return error codes appropriately if built without libzstd,
so we do not need to check again inside the Package Kit.

This should not break the no-zstd build (well, it is broken
somewhat right now anyway, but this will not break it further),
and it simplifies logic somewhat.


# a22fa0c9 04-Jun-2019 Alexander G. M. Smith <agmsmith@ncf.ca>

package kit: Add pre-uninstall scripts feature.

Just like post-install scripts which run shortly after a package is
installed, pre-uninstall scripts are run just before a package is
removed. Implements enhancement #13427

* Fix script exit code handling vs script launch errors.
* Bump package and repo file version numbers due to new attribute,
unfortunately makes new .hpkg files not backwards compatible.
* Add pre-uninstall functionality, mostly cloning the post-install
except in a few places.
* Discover that _RunQueuedScripts() is never called, a future TODO:?
* Update package documentation for pre-uninstall scripts, and use of
the boot/post-install directory.

Change-Id: I45596255ce74bc102f6e5b606cbf83e4e4347a17
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1504
Reviewed-by: Alexander G. M. Smith <agmsmith@ncf.ca>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 31d70c10 13-Aug-2019 Alexander G. M. Smith <agmsmith@ncf.ca>

package kit: Skip over future package attributes.

Ignore unknown fields (also called attributes) which are from a package
file with a different minor version number. Previously it would halt
with an error when encountering such a field, even though it can safely
be skipped over (if it was unsafe, we would have incremented the major
version number).

The use case is a future package attribute for pre-uninstall scripts.
If they're not run, that just leaves some debris after uninstalling
(like symbolic link desktop icons).

* Use the B_NOT_SUPPORTED error code when reading unknown package
attributes. Don't treat it as an error if the package is a
different minor version, just skip it.
* Print unknown package attribute index numbers rather than stopping,
since they may be from future package file formats and can be safely
skipped otherwise. Mention the relevant enum so you can find it in
the source code. It's a pity that the previous abstraction layer
isn't present, since it tells us what data type the attribute is
(string, number, etc), so we could have printed its value too.

First step of two for enhancement #13427

See https://review.haiku-os.org/c/haiku/+/1504 to generate packages
with a different minor version number (second step of the enhancement).

Change-Id: I6db1897824a1713b3d5fab6fdfb990ee5923cd52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# df4074fb 24-Nov-2018 Augustin Cavalier <waddlesplash@gmail.com>

Remove a lot of unused constants.

Spotted by Clang. No functional change intended.


# 81375d4f 11-Jul-2018 Jérôme Duval <jerome.duval@gmail.com>

Package Kit: add Zstd compression.

Change-Id: Idbdb7cf1bde659046a88ea69a76e3b5fc4cd7013
Reviewed-on: https://review.haiku-os.org/323
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 8f5130ed 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: Actually add support for B_HPKG_COMPRESSION_NONE

Until now we always declared in the HPKG header that the package file is
zlib compressed. For uncompressed files we would just store all
individual chunks uncompressed. Now we handle completely uncompressed
files slightly differently: We don't write the redundant chunk size
table anymore. The size savings are minor, but it makes the uncompressed
format read-streamable which may be handy.


# e527b796 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch package file accessor classes to use BPositionIO

* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
their implementation and super classes do now internally use a
BPositionIO instead of a FD to access the package file. This provides
more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
BPositionIO* parameter.


# b3263ad3 30-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch package kit to BZlibCompressionAlgorithm

... and remove the Zlib{Compressor,Decompressor} API.


# 6a89a36a 24-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Move package kit Zlib* classes to support kit

Also move to B* namespace and no longer expose the zlib dependency in
the headers.


# 0dab9e5c 29-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: ReaderImplBase: Remove superfluous scratch buffer


# f1a12bcf 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ReadSection(): Small simplification


# 32832cbe 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove BPackageKit::BDataOutput

Use BDataIO instead.


# d2d1af83 18-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Revert "Move ZlibDecompressor to libshared"

This reverts commit 9af2105d36856be60528c361edf14a263f242338.

Conflicts:
src/kits/package/Jamfile


# 9af2105d 10-Feb-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Move ZlibDecompressor to libshared

* This will be used to implement compressed http streams
* Remove the custom BDataOutput class, and use BDataIO instead, for
easier integration with existing code.


# 0a345af7 18-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Separate notification from deletion in repository-handlers.

* Add NotifyDone() to all repository-attribute handlers and invoke that
to notify any listeners.
* Unify deletion to a single implementation of Delete() in the base
class. Before, the root handler for a repository didn't do that, but
just triggered the notification.


# a266b57a 05-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Handle new ...IS_WRITABLE_DIRECTORY attribute


# 4489c88b 05-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Generalize user/global settings file attributes

* For all identifiers: Rename global settings file to global writable
file. We want to use the respective attribute also for other writable
files, not only settings files.
* User settings file/global writable file info/attribute: Add
isDirectory property/child attribute. This allows declaring global/
user settings directories associated with the package.


# c0ab1409 24-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attribute for declaring post install scripts


# 0f4e11e7 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attributes for declaring users and groups


# bf88057b 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Fix copy and paste oversight


# 79d5ddb7 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Verify that the attribute type matches

... the one expected for the respective attribute. Before it was
possible that e.g. a uint was read and then interpreted as a
const char*, if a string was expected for that attribute.


# fe707a23 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attributes for declaring settings files

Global and user settings files can be declared. For global ones an
update policy can be specified. If not specified, the settings file is
not included in the package, but created by the program (or user) later.
If an update type is specified, it defines what to do with the settings
file when updating the package to a newer version.

User settings files are never included in the package; they are always
created by the program or the user. If the package contains a template/
default settings file, it can be declared, but for informative purposes
only.


# 47039b85 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Package/repository file format: Add a minor version header field

* Add minor_version to hpkg_header and hpkg_repo_header and make
heap_compression uint16.
* If the minor version of a package/repository file is greater than the
current one unknown attributes are ignored without error. This allows
introducing new harmless attributes without making the resulting files
unreadable for older package kit versions.


# 46122852 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

packagefs: Add caching for the package file heap reader

* ReaderImplBase:
- Add virtual CreateCachedHeapReader() which can create a cached
reader based on the given heap reader.
- Rename HeapReader() to RawHeapReader() and add HeapReader() for the
cached heap reader.
- Add DetachHeapReader() to allow a clients to remove the heap
reader(s) after deleting the ReaderImplBase object.
* packagefs:
- Add CachedDataReader class, which wraps a given
BAbstractBufferedDataReader and provides caching for it using a
VMCache. The implementation is based on the IOCache implementation.
- Use CachedDataReader to wrap the heap reader. For file data that
means they are cached twice -- in the heap reader cache and in the
file cache -- but due to the heap reader using a VMCache as well,
the pages will be recycled automatically anyway. For attribute data
the cache should be very helpful, since they weren't cached at all
before.


# 1559102f 20-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# d03ac965 19-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Fix gcc 4 build


# 1f633814 17-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 7adfd76b 13-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add "base package" package attribute


# df295396 13-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove resolvable provides type

* Remove BPackageResolvableType and respective property from
BPackageResolvable.
* Remove package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE_PROVIDES_TYPE.


# 171fd58c 12-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 202c1daa 15-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageVersion: Rename property release to revision

* ... to avoid confusion with the preRelease property. It's also called
"revision" in the HaikuPorts recipes.
* Update libsolv package. Was necessary due to the BPackageVersion
change, but also includes a few more changes.


# d0b2d58a 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add error output in case of invalid compression ID


# 6ae0ecd4 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add a package info "install-path" attribute

The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.


# 78811461 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 2fce2018 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BLowLevelPackageContentHandler interface extension

HandleAttributeDone(): Add parentToken parameter.


# 4ebd3de8 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support package info [source] URL attributes


# c719d465 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support for reading compatible version attribute


# 8f314372 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 0f15206a 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ParseStrings(): Avoid new[0]


# d62ec0bd 16-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed host build issues/warnings


# 5bc69520 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add error output in case of invalid compression ID


# f19957b8 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add a package info "install-path" attribute

The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.


# 97aabbed 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 697b9545 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BLowLevelPackageContentHandler interface extension

HandleAttributeDone(): Add parentToken parameter.


# 116852fe 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support package info [source] URL attributes


# ee9c9351 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support for reading compatible version attribute


# ed6d59a9 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 2ef572b8 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ParseStrings(): Avoid new[0]


# 14c34be2 16-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed host build issues/warnings


# 34d56c1b 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* implemented repository reader and fixed some bugs in writer that
have been exposed during testing of reader

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40494 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad6a8dbe 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Pulled reusable stuff from PackageReaderImpl into new class ReaderImplBase.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40485 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8f5130edfa454cc7ee21e4c3aef2a151f7c3c567 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: Actually add support for B_HPKG_COMPRESSION_NONE

Until now we always declared in the HPKG header that the package file is
zlib compressed. For uncompressed files we would just store all
individual chunks uncompressed. Now we handle completely uncompressed
files slightly differently: We don't write the redundant chunk size
table anymore. The size savings are minor, but it makes the uncompressed
format read-streamable which may be handy.


# e527b796319f21ca025f68e1964df140daa6de35 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch package file accessor classes to use BPositionIO

* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
their implementation and super classes do now internally use a
BPositionIO instead of a FD to access the package file. This provides
more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
BPositionIO* parameter.


# b3263ad3e1662cc419849a2d2cf539f9636613dc 30-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch package kit to BZlibCompressionAlgorithm

... and remove the Zlib{Compressor,Decompressor} API.


# 6a89a36aa0ce6a53f9758ba767863ac6b4c6156c 24-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Move package kit Zlib* classes to support kit

Also move to B* namespace and no longer expose the zlib dependency in
the headers.


# 0dab9e5cb4e244814a39d562cef87f9508780760 29-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

package kit: ReaderImplBase: Remove superfluous scratch buffer


# f1a12bcfc00e89fda10935eb607b210bde74976f 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ReadSection(): Small simplification


# 32832cbe47f991cc6d2b29824903181d8baaaa63 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove BPackageKit::BDataOutput

Use BDataIO instead.


# d2d1af830b3f144937ea5e4c3f0e5b74c4c3d737 18-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Revert "Move ZlibDecompressor to libshared"

This reverts commit 9af2105d36856be60528c361edf14a263f242338.

Conflicts:
src/kits/package/Jamfile


# 9af2105d36856be60528c361edf14a263f242338 10-Feb-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Move ZlibDecompressor to libshared

* This will be used to implement compressed http streams
* Remove the custom BDataOutput class, and use BDataIO instead, for
easier integration with existing code.


# 0a345af77e01131647b1017ee4631b602119f5c9 18-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Separate notification from deletion in repository-handlers.

* Add NotifyDone() to all repository-attribute handlers and invoke that
to notify any listeners.
* Unify deletion to a single implementation of Delete() in the base
class. Before, the root handler for a repository didn't do that, but
just triggered the notification.


# a266b57a9ac5ffcb1593511cd2a10aa2fb7c2f23 05-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Handle new ...IS_WRITABLE_DIRECTORY attribute


# 4489c88b61bd4b70ff3a91d24ef5a0088e9c4691 05-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Generalize user/global settings file attributes

* For all identifiers: Rename global settings file to global writable
file. We want to use the respective attribute also for other writable
files, not only settings files.
* User settings file/global writable file info/attribute: Add
isDirectory property/child attribute. This allows declaring global/
user settings directories associated with the package.


# c0ab14096139c4e72a501bc6e82ab92d0e9e48f3 24-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attribute for declaring post install scripts


# 0f4e11e75c244fd61da150011f1eae5fe79fc2a9 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attributes for declaring users and groups


# bf88057b2677464ca46f3ab38333da024bfa7831 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Fix copy and paste oversight


# 79d5ddb77bd498e2975ceed8360c06cf709ff618 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Verify that the attribute type matches

... the one expected for the respective attribute. Before it was
possible that e.g. a uint was read and then interpreted as a
const char*, if a string was expected for that attribute.


# fe707a23fc6dc0bccb3e80201bf3e4146dcde74e 23-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: Add attributes for declaring settings files

Global and user settings files can be declared. For global ones an
update policy can be specified. If not specified, the settings file is
not included in the package, but created by the program (or user) later.
If an update type is specified, it defines what to do with the settings
file when updating the package to a newer version.

User settings files are never included in the package; they are always
created by the program or the user. If the package contains a template/
default settings file, it can be declared, but for informative purposes
only.


# 47039b852eeebb91396d19e0f9313cf23bf535ee 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Package/repository file format: Add a minor version header field

* Add minor_version to hpkg_header and hpkg_repo_header and make
heap_compression uint16.
* If the minor version of a package/repository file is greater than the
current one unknown attributes are ignored without error. This allows
introducing new harmless attributes without making the resulting files
unreadable for older package kit versions.


# 46122852f1dfbbf4bac6f5a634452ff90c5635ce 21-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

packagefs: Add caching for the package file heap reader

* ReaderImplBase:
- Add virtual CreateCachedHeapReader() which can create a cached
reader based on the given heap reader.
- Rename HeapReader() to RawHeapReader() and add HeapReader() for the
cached heap reader.
- Add DetachHeapReader() to allow a clients to remove the heap
reader(s) after deleting the ReaderImplBase object.
* packagefs:
- Add CachedDataReader class, which wraps a given
BAbstractBufferedDataReader and provides caching for it using a
VMCache. The implementation is based on the IOCache implementation.
- Use CachedDataReader to wrap the heap reader. For file data that
means they are cached twice -- in the heap reader cache and in the
file cache -- but due to the heap reader using a VMCache as well,
the pages will be recycled automatically anyway. For attribute data
the cache should be very helpful, since they weren't cached at all
before.


# 1559102fe7248296e5bb257d63123c0808d01d9d 20-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# d03ac965a23ea05a1a771a4e80c5d15f7f042ce4 19-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase: Fix gcc 4 build


# 1f633814fa347b0bd822f683af731615df600347 17-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 7adfd76b17adc78b0646a835711d3cd935bfb02b 13-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add "base package" package attribute


# df29539688df25133e4f9decc5da7b1045dc1850 13-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove resolvable provides type

* Remove BPackageResolvableType and respective property from
BPackageResolvable.
* Remove package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE_PROVIDES_TYPE.


# 171fd58c4b47c2da9cf13b7e501d3661d4a98e42 12-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 202c1daaed2556eaccea80643e58d498594f2506 15-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageVersion: Rename property release to revision

* ... to avoid confusion with the preRelease property. It's also called
"revision" in the HaikuPorts recipes.
* Update libsolv package. Was necessary due to the BPackageVersion
change, but also includes a few more changes.


# d0b2d58a4eea7b9fefdbb47c71f4e4b20d4cbefc 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add error output in case of invalid compression ID


# 6ae0ecd49a584abd81f3fa0fb0c0dd5b7a3ddb71 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add a package info "install-path" attribute

The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.


# 78811461b1831f6fdc07203e54cab60bd16af834 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 2fce201893210a48fb65ac7b35969c5dbe68e5e3 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BLowLevelPackageContentHandler interface extension

HandleAttributeDone(): Add parentToken parameter.


# 4ebd3de828f45e238715e72621dce5df97c1cf56 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support package info [source] URL attributes


# c719d465635ac3c2951c211fed0580e4b7d7319c 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support for reading compatible version attribute


# 8f314372a8b317a4d9e2ebeccc0d5bf6e237fec7 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 0f15206ac9d85db1b3080d7450720b2353c5ff0e 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ParseStrings(): Avoid new[0]


# d62ec0bd759ccd6ba3c0efdfe7a9f61e954500da 16-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed host build issues/warnings


# 5bc695204984ddd2ba5da212f71eaa8d7db2dafd 15-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add error output in case of invalid compression ID


# f19957b8e5311ffc5b802032e4f24cdda81f9b50 11-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Add a package info "install-path" attribute

The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.


# 97aabbede911b549e50d7ad753b4755d5c8d85a7 02-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 697b9545b17b6a29237523f6e5aac14a1cab5684 01-Jul-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BLowLevelPackageContentHandler interface extension

HandleAttributeDone(): Add parentToken parameter.


# 116852fecb4dc982b2f3581a9f65ff290ae79e3f 28-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support package info [source] URL attributes


# ee9c9351a721c98f43475854643a3a192af763b5 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Support for reading compatible version attribute


# ed6d59a9a983cb031077b6d541576fc8efec1cfd 26-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 2ef572b8fef32cd2a2201b4be563270858ae1b24 19-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

ReaderImplBase::ParseStrings(): Avoid new[0]


# 14c34be2e11541af33f8a19f620c66a28810acef 16-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed host build issues/warnings


# 34d56c1bf5e8990731ac21d629807f4b8a83f921 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* implemented repository reader and fixed some bugs in writer that
have been exposed during testing of reader

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40494 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad6a8dbe2bffcac6a1df7a59ee6119f240a8edee 14-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Pulled reusable stuff from PackageReaderImpl into new class ReaderImplBase.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40485 a95241bf-73f2-0310-859d-f6bbb57e9c96