projects-dir.mk: Add target pkg-delete-ours

The target pkg-delete-ours, invoked from the projects directory,
should wipe all packages from the system which have been created and
installed via jw-pkg.

Currently they are selected via url =~ janware. This is a default
string which can be overridden by redefining JANWARE_PACKAGE_FILTER.
This might not be the most generic name, but is kind of consistent
and will be matched once all variables get renamed to a more generic
naming scheme.

This currently does not get all packages: Some are not labeled with
URLs matching "janware", because jw-pkg is only used as a convenient
way to package other people's open source projects.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-17 15:49:55 +01:00
commit 2f50092e19

View file

@ -141,6 +141,7 @@ PURGE_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR
CREATE_PROJECT_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/jw-pkg-create-project.sh $(JW_PKG_BINDIR)/jw-pkg-create-project.sh) jw-pkg-create-project-not-found)
LIST_VCS_FILES_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/scm.sh $(JW_PKG_BINDIR)/scm.sh) scm-sh-not-found) ls-files
GIT_SRV_ADMIN_SH = JW_PKG_SSH_EXTRA_OPTS="$(JW_PKG_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@git.janware.com $(JW_PKG_REMOTE_BINDIR)/git-srv-admin.sh
JANWARE_PACKAGE_FILTER = url =~ janware
# ------------ projects to be built
@ -237,6 +238,9 @@ cloc:
# --- package-related targets
pkg-delete-ours:
$(PKG_MANAGER) select "$(JANWARE_PACKAGE_FILTER)" | xargs -r $(PKG_MANAGER) delete
pkg-manager-refresh:
$(PKG_MANAGER) refresh