This is an old revision of the document!
The goal of improving the package installation experience is multi-fold:
Phase 1
- Stabilize existing codebase (there are a number of stability issues and corner cases that should and must be resolved with pkg_install).
- Do minor known, but meaningful enhancements where required.
- For instance, add libarchive support to make pkg_install more responsive to failures, and thus reduce wasted time waiting for tar to complete, and also reduce the number of shell calls.
- Add locking so that multiple copies of pkg_add / pkg_delete can be run in parallel, thus avoiding (or at the very least reducing) potential race conditions as far as modifying installed packages is concerned.
- Write extensive tests so that we can ensure that the code makes functional sense; many BSD implementations sadly lack tests, and thus we can't be sure that the code actually meets requirements and reacts in meaningful ways.
Development for Phase 1 is taking place at //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified
Phase 1.5
Determine what useful functionality can be implemented in the time being as Phase 2, (before Phase 3) which would benefit the project and the community as a whole, and/or make the transition to Phase 3 a smoother one.
Phase 2
- Split up code from previous GSoCs into smaller functional blocks, such that they can be committed back to the project.
- Write functional tests for new code if said functional tests do not exist.
Other pieces, TBD (contingent upon Phase 1.5).
Phase 3
After that point, we need to take a step back and evaluate other available solutions out in the BSD community as a whole, or consider whether a wholesale rewrite is worth the time:
- An idea that was kicked around before by jilles@ was a potential rewrite of pkg_install with a scripting language (of some flavor) as the top-level frontend, and then use a C backend to do the actual maintenance tasks. Take for instance apt vs dpkg, or yum vs rpm. This seems to be a good idea, but again – requires some rewrites and fudging around.
- pkg_install for instance has been completely rewritten (for the most part) in NetBSD to use a seemingly more logical structure: http://www.netbsd.org/gallery/presentations/joerg/eurobsdcon2006/pkg_install.html
- libpkg (which I was originally looking at for the 2007 GSoC and abandoned due to time) is another possibility for the base, but the project has been dead for over a year now (maybe because the code was contributed back to DragonflyBSD?): http://libpkg.berlios.de/
Author's Page: Garrett Cooper.