Page MenuHomeFreeBSD

framework: new hook to try to ensure clean removal of ports
Needs ReviewPublic

Authored by tcberner on Thu, Nov 17, 8:12 PM.
Referenced Files
Unknown Object (File)
Fri, Dec 2, 3:18 PM
Unknown Object (File)
Fri, Dec 2, 3:18 PM
Unknown Object (File)
Fri, Dec 2, 3:17 PM
Unknown Object (File)
Mon, Nov 28, 2:01 PM


Group Reviewers

This hook tries to help people when removing ports from the tree.
It checks that

  • there are no commented lines containing "=.*category/port".
  • there are no moved entries pointing to the removed port
  • there is a moved entry removing this port
> git rm -r devel/kf5-extra-cmake-modules
>  git commit -m "remove devel/kf5-extra-cmake-modules"
[pre-commit] ERROR: no MOVED entry for 'devel/kf5-extra-cmake-modules'.
[pre-commit] ERROR: ports are marked moved to 'devel/kf5-extra-cmake-modules' in MOVED.
[pre-commit] ERROR: port 'devel/kf5-extra-cmake-modules' still referenced in:
                    * deskutils/syncthingtray/Makefile
                    * graphics/drawpile/Makefile
[pre-commit] ERROR: port 'devel/kf5-extra-cmake-modules' still referenced in:
                    * Mk/Uses/
[pre-commit] ERROR: removal of ports is incomplete. Please fix above issues.

Diff Detail

rP FreeBSD ports repository
No Lint Coverage
No Test Coverage
Build Status
Buildable 48414
Build 45300: arc lint + arc unit

Event Timeline

tcberner created this revision.

^ that regex should be "[^#]*=.*${removed_port}(@[a-z0-9]+)?$" to catch flavors and ensure that no ports with the same prefix are matched, I guess.

from discussion with @dch in IRC:

  • check_moved:
      • ports can also be moved to a new origin -- the current check errors out on those: Fix: check that new origin exists, and only if not, error out
    • check_subdir (new):
      • also make sure the category-Makefile does no longer contain SUBDIR +=

from discussion with @makc in IRC:

  • use git grep --cached for speed