Here are my hal 0.5.1 ebuilds
Created attachment 58335 [details] hal-0.5.1.ebuild
Created attachment 58336 [details, diff] files/hal-0.5.1-old_storage_policy.patch
please only post patches to existing ebuilds
Created attachment 58366 [details] new hal ebuild that adds haldaemon to the disk and cdrom groups
Created attachment 58400 [details] hal-0.5.1.ebuild Quick change to get it inline with what's in the overlay.
Created attachment 58519 [details] hal-0.5.1.ebuild Really not necessary to read all the groups that the haldaemon user is part of and then diff them and set the ones that are missing. Just everytime usermod -G "${HALDAEMON_GROUPS}" haldaemon and usermod does the right thing. We don't need users adding the haldaemon to groups. If they have to do that, then it's a bug in the ebuild and it needs to be fixed. This simplifies the ebuild.
except that your version doesn't preserve if the user adds haldaemon to another group (say a hal developer who is messing around?). We need to preserve user modifications.
Here's a happy day. One that needed to come and finally has. :)