$PKSCRIPT throughout this text refers to the scripting language we will use for building replacement infrastructure for /usr/ports. pi refers to portinstall, the port engine command line interface. 2.3.4 is a hypotetical version number for the scripting language 1.2.3 is a hypotetical version number for the port engine. Assume $PKGSCRIPT bootstrap is located in /usr/ports/Bootstrap Example is made based on writing to /usr/ports/Bootstrap; replace with writing to appropriate location during implementation. 1. Download $PKGSCRIPT tarball into /usr/ports/distfiles/ 2. Check checksum of $PKGSCRIPT 3. Create directory /usr/ports/Bootstrap/work 4. Extract source of $PKGSCRIPT into /usr/ports/Bootstrap/work/$PKGSRC-2.3.4 5. Do any necessary patches 6. Create /usr/ports/Bootstrap/work/$PKGSCRIPT-tempinstall 7. Configure $PKGSCRIPT for install into /usr/ports/Bootstrap/work/$PKGSCRIPT-tempinstall 8. Build $PKGSCRIPT 9. Install $PKGSCRIPT into /usr/ports/Bootstrap/work/$PKGSCRIPT-tempinstall 10. Start up a $PKGSCRIPT interpreter that load up the port infrastructure modules, and any dependent modules, and then core dump (intentionally). Call the core dump pi-initial-2.3.4.core 11. Run "undump" on pi-initial-2.3.4.core, generating pi-initial-1.2.3 12. Run regression tests on pi-initial-2.3.4 13. Install pi-initial-2.3.4 as $PREFIX/bin/pi-initial-1.2.3, with a symlink from $PREFIX/bin/pi. Use pi to register this installation as an installation of pi. 14. Remove /usr/ports/Bootstrap/work We now have infrastructure in place! I recommend that we do not normally delete all old versions of pi as a part of upgrading it; too risky.