From 2f50092e19af6618bffe3c35fb563a3f0ce225cd Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 17 Feb 2026 15:49:55 +0100 Subject: [PATCH] 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 --- make/projects-dir.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/make/projects-dir.mk b/make/projects-dir.mk index b1f1ffbd..e0db55af 100644 --- a/make/projects-dir.mk +++ b/make/projects-dir.mk @@ -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