Package Kit: Proper Installation for First Boot Packages
Do the final installation operations for all the packages in the /system/packages directory when the OS is booted for the first time. This will run their post-install scripts, create users, groups and generate settings files (marked with a package version attribute). Previously we just ran all the shell scripts found in the /system/boot/post-install directory (don't do that as much now). Fixes bug #14382 This patch has simpler code flow in CommitTransactionHandler::_ApplyChanges Tested on 32 and 64 bit systems. Once it's official, need to remove the open_ssh redundant post-install script that creates users etc. from HaikuPorts. Now we can notice bugs like package version attributes on settings files aren't fully working. :-) Didn't remove special case for add_catalog_entry_attributes.sh since it still does stuff that the build system doesn't do. Might be able to add that script as part of the Haiku.hpkg. See change 3751 for removing it, https://review.haiku-os.org/c/haiku/+/3751 Change-Id: I3807b78042fdb70e5a79eca2e2a45816ece0236f Reviewed-on: https://review.haiku-os.org/c/haiku/+/2342 Reviewed-by: Alexander G. M. Smith <[email protected]> Reviewed-by: Niels Sascha Reedijk <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
e459857d1c
commit
3376ed1a72
@@ -21,8 +21,8 @@ namespace BPrivate {
|
||||
class BActivationTransaction : public BArchivable {
|
||||
public:
|
||||
BActivationTransaction();
|
||||
BActivationTransaction(BMessage* archive,
|
||||
status_t* _error = NULL);
|
||||
BActivationTransaction(BMessage* archive,
|
||||
status_t* _error = NULL);
|
||||
virtual ~BActivationTransaction();
|
||||
|
||||
status_t SetTo(BPackageInstallationLocation location,
|
||||
@@ -52,6 +52,9 @@ public:
|
||||
const BStringList& packages);
|
||||
bool AddPackageToDeactivate(const BString& package);
|
||||
|
||||
bool FirstBootProcessing() const;
|
||||
void SetFirstBootProcessing(bool processingIsOn);
|
||||
|
||||
virtual status_t Archive(BMessage* archive,
|
||||
bool deep = true) const;
|
||||
static BArchivable* Instantiate(BMessage* archive);
|
||||
@@ -66,6 +69,7 @@ private:
|
||||
BString fTransactionDirectoryName;
|
||||
BStringList fPackagesToActivate;
|
||||
BStringList fPackagesToDeactivate;
|
||||
bool fFirstBootProcessing;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,11 @@ enum {
|
||||
// "deactivate": string[]
|
||||
// file names of the packages to activate; must be in the
|
||||
// transaction directory
|
||||
// "first boot processing": bool
|
||||
// if true then runs the package installation processing for
|
||||
// specified (in the activate list) packages on the volume.
|
||||
// Doesn't actually add the packages. Package_daemon preemptively
|
||||
// deletes an empty transaction directory when done.
|
||||
B_MESSAGE_COMMIT_TRANSACTION_REPLY = 'PKTR'
|
||||
// "error": int32
|
||||
// a BTransactionError describing how committing the transaction
|
||||
|
||||
Reference in New Issue
Block a user