Disabling components of packages

With the advent of package management and hrev46391, it has become possible to prevent a packaged file from being extracted at boot time.

In Haiku's Boot Options menu, there is a 'Disable components' option available. However, this method will only let you disable components of system packages, and only until the next time you reboot.

As you may know, package management has made some Haiku folders practically read-only, so unlike in the past, it is no longer possible to just delete or rename a problematic driver or library. The functionality to disable components of packages addresses this issue without requiring any editing of package file content.

Let's go through the few steps needed:

  1. Figure out which package contains the file that you want to disable, and whether the file is in a package located in the system or user file hierarchy. You can find the containing package name with "Get info' from Tracker's context menu on that file; look for 'SYS:PACKAGE' in its 'Attributes' tab.
  2. Next step is to create a text file named 'packages' in /boot/system/settings, or in /boot/home/config/settings/global. The first folder is used for disabling components in system packages, the second for user packages.
  3. And finally, in the 'packages' file, we put something like:
    Package 'packagename' {
    	BlockedEntries {
    • 'packagename' is the name of the package without version, for example 'haiku'.
    • 'entrypath' is the relative path to the installation location, e.g. "add-ons/Translators/FooTranslator".
    For example, to disable the intel_extreme driver and the xhci driver, which are both part of the 'haiku' system package, the 'packages' file looks like this:
    Package haiku  {
    	BlockedEntries {

Any disabled entries will be ignored by packagefs and will no longer appear in the file system.


Let's look at a practical example, disabling the broadcom570x driver. We create a 'packages' text file in /boot/system/settings with the following content:

Package haiku {
	BlockedEntries {

We then save the file and reboot. Once Haiku starts again, the package is re-mounted and the file is ignored by packagefs.

Originally published by Barrett.