History log of /haiku/headers/os/package/PackageInfoAttributes.h
Revision Date Author Comments
# 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>


# 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


# 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.


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

Add "base package" package attribute


# 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.


# 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.


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

Add url and sourceURL properties to BPackageInfo

Also extend the parser to accept "url" and "source-url" attributes.


# 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.


# 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.


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

Add url and sourceURL properties to BPackageInfo

Also extend the parser to accept "url" and "source-url" attributes.


# 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.


# 33bc4425 12-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Largish adjustments to PackagerReaderImpl and package attribute
handling:
* package attributes are now compatible with the low level attribute
handling of other HPKG attributes (such that 'package dump' now shows
package attributes, too)
* dropped type names from hpkg format, the attributes were identified
by IDs already and this simplifies the code considerably. Type names
are now handled in BLowLevelPackageHandler only.
* instead of rolling their own mechanism, high-level package attributes
handling is now implemented via a corresonding set of
AttributeHandler-subclasses
* adjusted package writer to only write package attributes that are
needed (empty ones are left out)


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


# 0d68f6af 09-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Implemented repository writing:
* fleshed out RepositoryWriterImpl
* renamed BRepositoryHeader to BRepositoryInfo (in accordance with
BPackageInfo)
* adjusted BRepositoryInfo to be able to parse itself from a
driver_settings file
* added package_repo binary (only 'create' works as of yet)


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


# d77c6cd2 08-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* implemented checking of licenses, such that it is no longer possible
to create a package that refers to a license that is not a system
license or contained in the package
* added package-info flags (currently only approve_license and
system_package)
* adjusted package-reader/writer and pkgman accordingly

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


# 6f0278cd 04-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Implemented reading of package info attributes from hpkg file
* added kernel-compatible datatypes for reading package info attribute
values (PackageInfoAttributeValue.h) - these will be used at a later
stage by the package-fs to transport those attributes to userland
when asked to do so (by ioctl)
* implemented parsing of package info attributes in PackageReaderImpl
* added support for compressed package attribute section to
PackageReaderImpl
* completed the writing of package info attributes in PackageWriterImpl
and fixed a couple of bugs exposed by parsing
* adjusted 'package list' to show the package info attributes as they
are found


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


# 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


# 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.


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

Add "base package" package attribute


# 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.


# 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.


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

Add url and sourceURL properties to BPackageInfo

Also extend the parser to accept "url" and "source-url" attributes.


# 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.


# 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.


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

Add url and sourceURL properties to BPackageInfo

Also extend the parser to accept "url" and "source-url" attributes.


# 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.


# 33bc4425be0b545ed3d0b7e7a9a873d31e5a0330 12-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Largish adjustments to PackagerReaderImpl and package attribute
handling:
* package attributes are now compatible with the low level attribute
handling of other HPKG attributes (such that 'package dump' now shows
package attributes, too)
* dropped type names from hpkg format, the attributes were identified
by IDs already and this simplifies the code considerably. Type names
are now handled in BLowLevelPackageHandler only.
* instead of rolling their own mechanism, high-level package attributes
handling is now implemented via a corresonding set of
AttributeHandler-subclasses
* adjusted package writer to only write package attributes that are
needed (empty ones are left out)


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


# 0d68f6afb34d8e01421123b216e34771d1c7fbfe 09-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Implemented repository writing:
* fleshed out RepositoryWriterImpl
* renamed BRepositoryHeader to BRepositoryInfo (in accordance with
BPackageInfo)
* adjusted BRepositoryInfo to be able to parse itself from a
driver_settings file
* added package_repo binary (only 'create' works as of yet)


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


# d77c6cd26a5cf3863ba4258a063d7d8645abf1e3 08-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

* implemented checking of licenses, such that it is no longer possible
to create a package that refers to a license that is not a system
license or contained in the package
* added package-info flags (currently only approve_license and
system_package)
* adjusted package-reader/writer and pkgman accordingly

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


# 6f0278cdc9a22a1e22c3ac3f480beffd6bb5fcff 04-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Implemented reading of package info attributes from hpkg file
* added kernel-compatible datatypes for reading package info attribute
values (PackageInfoAttributeValue.h) - these will be used at a later
stage by the package-fs to transport those attributes to userland
when asked to do so (by ioctl)
* implemented parsing of package info attributes in PackageReaderImpl
* added support for compressed package attribute section to
PackageReaderImpl
* completed the writing of package info attributes in PackageWriterImpl
and fixed a couple of bugs exposed by parsing
* adjusted 'package list' to show the package info attributes as they
are found


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