Opened 6 years ago

Last modified 6 years ago

#11466 new enhancement

Package management: define the install location

Reported by: Giova84 Owned by: bonefish
Priority: normal Milestone: R1
Component: Servers/package_daemon Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


Currently, when we install an application through HaikuDepot, the HPKG file, by default, will be installed under /system/packages. To choose instead /config/packages as install location, we can rely on pkgman, by invoking it as:

pkgman install -H appname

Well, an user may obviously decide where to install applications on his system, even if it were possible through HaikuDepot, but wouldn't be nice/useful, for packagers/coders having the ability to define inside the .PackageInfo file, the default install location? I think, in this regard, about those apps which rely about B_USER_CONFIG_DIRECTORY, B_USER_APPS_DIRECTORY and any other B_USER_* directory. The same consideration would be equal for those apps which is preferable install under /system.

So the proposal of this enhancement is about add something like to .PackageInfo:

install-location {


install-location {

Any thoughts?

Change History (1)

comment:1 by bonefish, 6 years ago

Defining a default installation location would just be confusing IMO, but if I understand your argument correctly, you're actually proposing a required installation location. We have gone to great length to ensure that it is generally possible to build location independent packages. A "home" installation location requirement would just encourage incorrectly built packages IMO. At least I can't think of any reason why a package would need to be installed there other than having hard-coded absolute paths to home. Which is something that should fixed rather than worked around.

A "system" installation location requirement could be useful, though. E.g. a package with a kernel driver needs to be installed in "system". We do already have a system package flag (B_PACKAGE_FLAG_SYSTEM_PACKAGE). Its semantics is a bit fuzzy. It is documented as indicating a package being installed under "/boot/system". HaikuDepot -- the only code that checks it ATM -- interprets it somewhat differently, though (as a package that makes up part of the system (and thus cannot be uninstalled)). We need to clarify the semantics. If we go with the stricter HaikuDepot semantics (stricter because it would also imply the installation location), the installation location of a package that itself is not a system package could be enforced by declaring a system package (e.g. the "haiku" package) as a base package.

Note: See TracTickets for help on using tickets.