From e040d95b055a0eb1544e2369c81861699d620f51 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Tue, 20 Dec 2022 20:53:37 +0800 Subject: [PATCH] dist: add script option to reset repo metadata Upstream: no Signed-off-by: Kairui Song --- dist/scripts/helper/dist-repo-init.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dist/scripts/helper/dist-repo-init.sh b/dist/scripts/helper/dist-repo-init.sh index 3e1d5bbd2..0ebdf3014 100755 --- a/dist/scripts/helper/dist-repo-init.sh +++ b/dist/scripts/helper/dist-repo-init.sh @@ -26,6 +26,21 @@ KMAKEFILE_CONTENT="" die "Dist files are not properly configured, aborting." } +if [[ $1 == "--reset" ]]; then + ### Clean up changelog + echo -n > "$DISTDIR"/templates/changelog + + ### Clean up kABI + for i in $SPEC_ARCH; do + echo -n > "$DISTDIR"/kabi/Module.kabi_$i + done + + ### Clean up generic-default config + echo -n > "$DISTDIR"/configs/00base/generic/default.config + for i in $SPEC_ARCH; do + echo -n > "$DISTDIR"/configs/00base/generic/$i.config + done +fi ### Patch .gitignore grep -qF "# ${VENDOR_CAPITALIZED:+${VENDOR_CAPITALIZED} }dist files" "$TOPDIR/.gitignore" || {