tree may want to weed distfiles too, so allow for a full scan of the tree
without building/fetching anything, just to update history:
dpb -DHISTORY_ONLY
(just requires making sure the right engines are created, and a very shortened
loop at end waiting for history to be updated).
remove a few explicit (and implicit) die from Fetch: missing/out-of-sync
distinfo no longer kill dpb, instead they're properly reported as broken
paths and things still go on (note that even a missing SUPDISTFILE checksum
*will* mark a path as broken, that's totally intentional)
- add ERRORS framework to bsd.port.subdir.mk
- trying to add a FLAVOR or a SUBPACKAGE to an intermediate SUBDIR is an
error (see editors/vim-spell,af recently)
- re-including bsd.port.mk/bsd.port.subdir.mk after either of them is an
error (can happen when one moves stuff to Makefile.inc without really thinking
about it, ends up with PKG_ARGS holding some contents twice and make package
erroring out with duplicate contents)
the names of files in there are not totally trivial to figure out from the
normal filename + sha.
-> filename will be stripped off DIST_SUBDIR
-> b64 checksums interfere with filesystem semantics, e.g., /u8//ffg
will become u8/ffg
- keep a stash indexed by checksum, so dpb can identify duplicate files.
- in a full bulk, if the scan has no errors, write to a ${DISTDIR}/history
file the files encountered in ${DISTDIR}/distinfo that seem to no longer
be needed (with full timestamp and checksum info).
Should be enough info to know when to expire old DISTDIR entries.
- keep a cache of checked checksums as ${DISTDIR}/distinfo
- read existing cache on startup, don't need to recheck those files.
- split checksum_task: update the cache after the checksum is done
- create the by_cipher/sha256/... entries
- in fetch_only mode, do a "long" checksum on existing files not in the cache.
If you ever have doubts on the integrity of already checked files, just
rm ${DISTDIR}/distinfo.