fix(makefile): update-rules does not remove deleted pack directories #83

Closed
opened 2026-05-26 14:51:03 +02:00 by michael · 1 comment
Owner

Problem

make update-rules copies rules from var/rules/ to /var/lib/fragjan/rules/
but does not remove directories that no longer exist in var/rules/.

After renaming packs (e.g. daw-code -> daw-lua-code), old directories
remain in the install target and fragjan picks up stale rules.

Solution

Before copying, remove the install target directory and recreate it,
or diff the two directories and remove orphaned entries.

Simplest approach: backup + clean before copy:

cp -r /var/lib/fragjan/rules/ /var/lib/fragjan/rules.bak/
rm -rf /var/lib/fragjan/rules/
cp -r var/rules/ /var/lib/fragjan/rules/

Affected file

  • Makefile (update-rules target)
## Problem `make update-rules` copies rules from var/rules/ to /var/lib/fragjan/rules/ but does not remove directories that no longer exist in var/rules/. After renaming packs (e.g. daw-code -> daw-lua-code), old directories remain in the install target and fragjan picks up stale rules. ## Solution Before copying, remove the install target directory and recreate it, or diff the two directories and remove orphaned entries. Simplest approach: backup + clean before copy: cp -r /var/lib/fragjan/rules/ /var/lib/fragjan/rules.bak/ rm -rf /var/lib/fragjan/rules/ cp -r var/rules/ /var/lib/fragjan/rules/ ## Affected file - Makefile (update-rules target)
michael added this to the Basic Version milestone 2026-05-30 16:08:42 +02:00
Author
Owner

Fixed in Makefile.

  • Renamed existing target to update-rules (overwrite only, no delete)
  • Added new upgrade-rules target: backup existing rules to rules.bak, remove rules/, copy fresh from repo
  • Updated help output to document both targets

Tested on v0.2.8 -> v0.2.9 cycle.

Fixed in Makefile. - Renamed existing target to `update-rules` (overwrite only, no delete) - Added new `upgrade-rules` target: backup existing rules to rules.bak, remove rules/, copy fresh from repo - Updated help output to document both targets Tested on v0.2.8 -> v0.2.9 cycle.
michael 2026-05-30 16:48:04 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#83
No description provided.