This is the first of hopefully many patches to give portage the "self-healing" ability of sorceror linux. It adds an "archive" flag to FEATURES that makes an archive (the same way that dyn_package does) but puts it in /db/pkg/.
Created attachment 4418 [details, diff] Adds dyn_archive to ebuild.sh, and adds a check in dyn_install for 'archive' in FEATURES
What's the difference between this and 'emerge -b' ?
This is the first step toward automatically archiving images for use in recovery (or self-healing). If the user had to use a flag every time they probably wouldn't, this gives the option of automatically archiving based on the FEATURE flag. Also, this puts the image in the build-info dir which goes to /var/db/pkg.. so that it can be used for repairing rather than -b which is used for deploying elsewhere and writes to /usr/portage/packages (perhaps there should be a common place for both of them), personally i hate all the crap portage writes to /usr, /usr is for programs, now thousands of tars :)
basically it would be -b but placing the pkg in another place (maybe /var/db/pkg/<cat>/<pgk>/file) and then used later if 'self-healing' is wanted ...
PKGDIR=${PORTDIR}/packages can be changed in make.conf, but I kinda get your point. A constant feature as opposed to an explicit flag.
portage-2.0-41 FEATURES="buildpkg" will cause --buildpkg to be set always.