]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pkgbase: allow update-packages for first-run of packaging
authorKyle Evans <kevans@FreeBSD.org>
Mon, 18 Jan 2021 20:11:58 +0000 (14:11 -0600)
committerKyle Evans <kevans@FreeBSD.org>
Thu, 21 Jan 2021 03:58:30 +0000 (21:58 -0600)
commit26490d9b74f0bdefbb9df74dcd285ecd08e0a961
tree4bc8943274740d5184a626019ab11d4d153e1435
parent85ad7f8da19fbd5985690d4ccfcc45952713dd1b
pkgbase: allow update-packages for first-run of packaging

If ${REPODIR}/${PKG_ABI} does not exist when we begin real-update-packages,
skip the comparison with the non-existent previous repository and just
finish the repo off. This allows external scripts to just assume they can
run `update-packages` rather than figuring out if they'd previously run
`packages` for this Version/Arch combo.

PKG_VERSION_FROM_DIR was added so that we could perhaps detect the three
distinct cases:

1.) If the repo has not yet been created, PKG_VERSION_FROM_DIR will be
  empty.
2.) If the repo is in some intermediate state between created and fully
  initialized, PKG_VERSION_FROM_DIR may point to the ABI directory.
3.) If the repo is fully initialized, then PKG_VERSION_FROM_DIR points to
  the latest build to compare to.

Option #2 is explicitly unhandled at the moment, but this is no different
than it was before.

Reviewed-by: manu
Differential-Revision: https://reviews.freebsd.org/D28229
Makefile.inc1