- Debugger: Getting mixed signals
- 'Packaging Infrastructure' Contract Weekly Report #4
- Haiku monthly activity report - 06/2015
- 'Packaging Infrastructure' Contract Weekly Report #3
- 'Packaging Infrastructure' Contract Weekly Report #2
- GCI 2014 winners trip report (mentor side)
- TeX Live and LyX; Changes to the boot code
- 'Packaging Infrastructure' Contract Weekly Report #1
- Beginning of 'Packaging Infrastructure' Contract
- Haiku monthly activity report - 05/2015
Further improvements to package management and related technologies
Since the package management feature branch was merged into HAIKU's
master repository, numerous issues were uncovered. As with any large
feature, an influx of regressions and other issues should always be expected.
Most of the issues revolved around not being able to install or even
run certain software, which for an operating system is a big deal.
Luckily, with any actively developed software such as Haiku, bug fixes
continue to happen. This article will go into some of those issues, what
has been done to fix them, and what other improvements are in the pipeline.
There were several factors that led to some software not being able to be installed.
They included a minimally functional PackageInstaller (for installing BeOS Software Valet packages),
directory layout changes, and making other folders read-only.
To handle the installation of BeOS Software Valet packages, Haiku has PackageInstaller.
For a long time this application was neglected. To begin with, it never even worked properly for some software packages.
(As an example, the only way to get Gobe Productive installed was to manually copy it from a BeOS installation.)
However, over the past few days Stephan Aßmus (with initial help from Puck Meerburg) has been working on PackageInstaller.
This work centered around dynamically replacing the destination folders with the appropriate Haiku equivalents.
It can now install Gobe Productive 2.0 (Trial) and reports from IRC mention many other packages working properly!
Another factor that prevented older software from installing and running were changes to the directory layout.
The directory /boot/common was removed, or more correctly it has been merged into /boot/system [1].
It was originally planned to help ensure /boot/system (B_SYSTEM_DIRECTORY) would only contain the essentials needed by Haiku.
Everything else would be in /boot/common (B_COMMON_DIRECTORY) or in /boot/home (B_USER_DIRECTORY).
Unfortunately this never worked out as planned.
One of the contributing factors was that more and more software moved out of Haiku's repository and become 3rd party packages.
Removing /boot/common simplified some things, such as package dependencies between software provided by Haiku (e.g., git)
and user-installed pacakges (e.g., git_svn). [1]
The changes involving /boot/common mostly affected software built for Haiku R1 pre-beta.
Any software that hard coded paths to it (either as a zip that extracts to boot or explicitly uses /boot/common/...) broke.
Using hard coded paths is always ill-advised.
Those applications need to be updated to rely upon FindDirectory or to be re-organized as an HPKG.
Applications that used the FindDirectory C/C++ function calls to determine the paths continued to work.
Though for a brief time, software that used the shell command `finddir` to locate the B_COMMON_*_DIRECTORY was unintentionally broken.
This has since been fixed by modifying the finddir shell command to redirect B_COMMON_*_DIRECTORY to their system non-packaged directory counterparts.
Several folders were changed to a read-only status, so as to contain the "expanded" HPKG file contents.
This cleanly separates (and identifies) which files are provided by HPKGs and ones that are not.
The complexities of implementing and actually using a UnionFS
(which merges package-provided files with non-package-provided files in a single directory)
are mind boggling. To reduce the problems to the simplest terms, it becomes increasingly difficult to manage when
real files are overlayed on top of package-provided files. For instance, which takes priority? What happens if a user tries to delete a (package-provided) file?
While this can take some getting used to, having read-only folders is the sanest (and safest) approach to having real files exist alongside package-provided files.
One complaint was the inability to remove package files (such as conflicting drivers from haiku*.hpkg).
The ability to blacklist entries in packages was introduced to resolve this.
While this is more involved than simply deleting a driver, it has the added bonus of allowing you to easily revert the modifications.
Perhaps in the future, an application could be made that would streamline the process and remove the need to edit a text file.
Possibly an HPKG utility that would allow individual files to be marked as such (as well as other features as viewing the HPKGs contents as if it were already mounted).
For anyone developing on Haiku, they may have realized that setgcc was removed.
The setgcc command was a method for switching the compiler from GCC 2 to GCC 4 and vice versa.
However, it was crudely implemented, as "it changed on disk structures to switch the compiler, which means that you couldn't use setgcc in one shell while already having a build running in another." [1]
The initial idea was to simply call the appropriate compiler.
Though this too had confusion, as `gcc` was the host native gcc command.
This has been resolved with the introduction of a new shell command, `setarch` (and supports running toolchains for other architectures such as ARM).
Unlike setgcc, setarch modifies only the current command shell, which allows you to run compilation tasks for different architectures at the same time.
Another complaint is the inability (or rather difficulty) to modify Deskbar. Haiku now utilizes automatic Deskbar management.
Basically, HPKGs can specify which symlinks should be added to Deskbar and where.
People are still able to add their own links in the usual place, /boot/home/config/settings/deskbar/menu (B_USER_DESKBAR_DIRECTORY).
If desired, it is possible to disable the automatically created links. In the B_USER_DESKBAR_DIRECTORY, create a symlink named "menu_entries" that points to "menu".
Then manually populate "menu" however you desire. To note, this entire feature is still being implemented. For more information on how the implementation will most likely work, see Ingo's comment on ticket #10557
Being able to easily discover, view, and (un)install HPKGs files is another concern.
HaikuDepot has been created to manage this from within Haiku. It is functional, but not feature complete.
For a web-centric approach, haiku-depot-web is being implemented.
They already have a running test installation and could use feedback on the [haiku-depot-web] mailing list.
These are just some of the issues that have been resolved. Undoubtedly there are more. This is where we need you, yes YOU!
Use a nightly image and give it a run around the block. Once something breaks or even feels a bit odd, file a bug report on dev.haiku-os.org
That is the only way that issues can reliably be tracked, organized and eventually resolved.
Some issues are still waiting to be resolved.
They include having a utility program to handle double-clicking HPKG files. Currently Expander opens, which has limited usefulness.
The ability to update Haiku from within Haiku sort of works, but a formalized process has yet to be ironed out.
Being able to easily add additional software repositories, let alone for users to upload files to a repository needs to be addressed.
But again, Haiku keeps moving forward into the future, one commit at a time.
- mmadia's blog
- Login or register to post comments

Comments
Re: Further improvements to package management and related ...
I am amazed when I think how far PM has come in the last few months! Honestly I and others thought it would take years to reach this level of complexity and completeness! To all who coded, tested and funded the Package Management work, I raise my glass to you and thank you for your tireless dedication! Kudos!
For me, one of the things I am looking forward to (if possible) is a Haikuware repo for any apps that gets repackaged .hpkg to be installable in HaikuDepot. The second feature that I and most users are looking forward to is online OS updates! The ability to update Haiku and all installed apps with a single command or GUI front-end! Like "pacman -Syu" in Arch Instead of reinstalling Haiku or using a risky script to copy data from anyboot image to Haiku volume.
If these two major (in my opinion) features get implememted in PM, I will be a happy Haikuer! I will be willing to help fund these two (or more) features in Package Managment as I have been since the contract was announced!
Again, kudos and a big Thank You to everyone who has contributed to this effort! And to any haters and griefers out there, grow up!
Re: Further improvements to package management and related ...
Running nightlies means life is full of surprises. For a long time, my ancient Dell laptop had been soldiering on with 8-bit VESA. Last week I updated my nighly and suddenly my intel Graphics card was recognised! Glorious 32-bit graphics! A big thank you to whomever made that particular commit, and I hope you can do the same for my iMac's Radeon.
BUT ... some of us are on slow connections. Updating the nightly wipes out the existing system folder, which means re-downloading the same hpkgs of BePDF, and Sum-It, and Caya, all over again. It would be great if these packages could somehow be stored on disk as a local repository, so they only get re-downloaded if they are actually updated.
Also, can someone explain the difference between "package" and "package_x86" on HaikuDepot? The descriptions supplied in the program are identical.
"If desired, it is possible to disable the automatically created links. In the B_USER_DESKBAR_DIRECTORY, create a symlink named "menu_entries" that points to "menu". Then manually populate "menu" however you desire"
I'm sorry, that is a hack, not a solution. Expect to see a lot of alternative 3rd party app launchers in the future. Not that there's anything wrong with that. I ...[clears throat] ... sort of wrote one myself: http://mysite.mweb.co.za/residents/clasqm/haiku/yab-apps/menubar.html
PM is a major mental shift, it is a stepping away from how things were done in the BeOS days. But when you get into it, you start to see the logic of it.
Re: Further improvements to package management and related ...
Also, can someone explain the difference between "package" and "package_x86" on HaikuDepot? The descriptions supplied in the program are identical.
You must be using a gcc2hybrid image, with "package" meaning the primary arch (x86_gcc2), "package_x86" the secondary arch (gcc4 x86).
Re: Further improvements to package management and related ...
You must be using a gcc2hybrid image, with "package" meaning the primary arch (x86_gcc2), "package_x86" the secondary arch (gcc4 x86).
Thank you. Now that isn't too hard to understand **once it has actually been explained**. And since it looks like the hybrid is going to be the official build for a while to come, perhaps it is something that should be made clear in HaikuDepot itself.
Re: Further improvements to package management and related ...
BUT ... some of us are on slow connections. Updating the nightly wipes out the existing system folder, which means re-downloading the same hpkgs of BePDF, and Sum-It, and Caya, all over again. It would be great if these packages could somehow be stored on disk as a local repository, so they only get re-downloaded if they are actually updated.
You can keep the hpkg files around, and manually drop them in /system/packages. This is the more "BeOS" way of package management: no need for a specific app to do it for you. Or, you can install them in home/config/packages, which is not wiped on reinstall.
When we get to implementing an actual upgrade system, it will of course take care of this.
Also, can someone explain the difference between "package" and "package_x86" on HaikuDepot? The descriptions supplied in the program are identical.
"x86" means "compiled with gcc4 for x86". The non-suffixed version of the package is for the default architecture of the system, that is, x86_gcc2.
"If desired, it is possible to disable the automatically created links. In the B_USER_DESKBAR_DIRECTORY, create a symlink named "menu_entries" that points to "menu". Then manually populate "menu" however you desire"
I'm sorry, that is a hack, not a solution. Expect to see a lot of alternative 3rd party app launchers in the future.
It's not a hack, it's a technical solution, without appropriate UI around it. As Matt said, this is still being worked on, and will be integrated in Deskbar preferences. We also plan to change the automatically generated menu to have better categorizing, to avoid that huge flat list of apps. And there's the "recently used apps" menu, too.
Re: Further improvements to package management and related ...
Yes, the introduction of Package Management was disruptive, and I believe they made some bad choices, like adding non_packaged, instead of leving ~/config alone and adding ~config/packaged, This would have made it much less disruptive and easier to use with old BeOS packages. One must admit, however that the Package Management has made large strides in improving the situation. Most of the Doesn't work problems are being worked on.
Re: Further improvements to package management and related ...
There is an English proverb "you've got to crack a few eggs to make an omelette"
Although quite a few things were broken while implementing package management, I have faith that once the developers add the rest of the ingredients, it will be a big step ahead for Haiku usability.
Re: Further improvements to package management and related ...
There is an English proverb "you've got to crack a few eggs to make an omelette"
Although quite a few things were broken while implementing package management, I have faith that once the developers add the rest of the ingredients, it will be a big step ahead for Haiku usability.
One must remember that all the "Chaos and Confusion" happened not in an official release where it would be fair to complain, but in the nightly (unstable already:) ) builds! You must expect things to break from one build to another. We have become spoiled brats because of the relative stability of the nightly builds that we expect it to be as stable as an official release! This is a mistake. If however, the problems have not been corrected when Haiku reaches Beta or god forbid R1, then yes, the users would have a cause to complain!
How would the Debian team feel if you the user (who was warned ahead of time) decides to install Debian Sid (unstable) and then later upgrades the system and things break? It is not the fault of the developers, because Sid is a testers only (or crazy people like me) build! Even the Haiku Installer warns users that this is Alpha software and not to expect Haiku to be issue free and certainly not to use Haiku for production use!
Since Package Management was developed and merged between Alpha releases, influenced in no way reqular users who are smart enough to stay with Official Releases, unless they are willing to accept breakages in the nightly builds in between! To complain and troll is childish especialy concerning Alpha and unstable software. It serves no purpose other than to show your ignorance. While I did early on share your frustration about Package Management, now that I have gained some knowledge about the subject at hand, my frustration is abated!
About those smart users who stay with official releases like Alpha 4.1, the time interval between official releases is getting bigger. My humble opinion is to try to have an official release every 6-12 months. A year and a half is too long to stay with official releases.
Keep up the great work everyone, you have my support! (if that means anything to you. lol)
Peace
Re: Further improvements to package management and related ...
There is an English proverb "you've got to crack a few eggs to make an omelette"
I believe that was Stalin quoting Robespierre, actually ;-)