[haiku-development] Some thoughts on package management

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Oct 2013 11:25:52 +0200

Hi,
After some time working in a package managed environment and listening to 
complaints on the IRC channel, I have some suggestions to make on the 
current state of package management. I'd like to hear your advice before I 
actually start making some changes, or maybe someone else will do the 
changes?

So, while most users can get away with having /boot/system read-only 
(that's a good thing despite the incompatibilities it has with some 
software and/or installers), most of them don't agree with having 
home/config read-only. I agree on that, and think we should leave the user 
manage its home directory the way he needs it.

Having a package-managed home/config is useless. The purpose was to mount 
home-grown packages there, but since this isn't looked up by the 
development tools, it's not handy to drop a library or devel package there 
and have it working immediately. Only 'final' packages (binaries and apps) 
can be used there, and even that requires some extra support so the 
packages look for everything in their .self directory. It also makes it 
unpractical to have an app in /system and add-ons for it in /home/config

On the other hand, we really need a way to tell apart 'managed' packages 
(installed from pkgman) from 'non-managed' ones. This information can be 
retrieved from pkgman, but tagging the packages somehow (say an FS 
attribute) with the source URL/repo would be nice. This would make it 
possible to query for 'all packages installed from haikuports' or 'all 
packages installed manually'.

Finally, I'd suggest mounting all packages in /system, no matter if they 
come from /system/packages or /home/config/packages. In a multiuser system 
this would mean each user sees a different /system directory, but it allows 
installing custom packages for each user in a transparent way. This allows 
the user to keep untested packages in /boot/home, and possibly boot in safe 
mode without enabling those if something goes wrong. Yet, it keeps the FS 
hierarchy simpler, with a single package-FS managed directory in the system.

-- 
Adrien.

Other related posts: