From cf71c00ac4f03d5444031889db6c0e45f09e8ec5 Mon Sep 17 00:00:00 2001 From: Michal Koutný Date: Apr 05 2024 14:18:24 +0000 Subject: mass-cve: Invalidate cache when scanned branch is updated --- diff --git a/scripts/cve_tools/Makefile b/scripts/cve_tools/Makefile index abfe9e0..ada2a55 100644 --- a/scripts/cve_tools/Makefile +++ b/scripts/cve_tools/Makefile @@ -53,7 +53,7 @@ cve_bug_$(YEAR).dat: cve2bugzilla sort -n -k 2 | sort -k 1b,1 -s | uniq | \ awk '{ primary_bug=$$1 != cve; cve=$$1; print $$0, primary_bug; }' >"$@" -hash_file_$(branch).dat: +hash_file_$(branch).dat: $(KSOURCE_GIT)/.git/refs/remotes/origin/$(BRANCH) git --git-dir="$(KSOURCE_GIT)/.git" --work-tree="$(KSOURCE_GIT)" \ grep -i "^git-commit[[:space:]]*:[[:space:]]*[0-9a-f]*[[:space:]]*$$" origin/$(BRANCH) -- "$(KSOURCE_GIT)/patches.suse" |\ awk -vFS=":" '{gsub(" ", "", $$4); print $$4, $$2}' | sort -k1 >"$@"