From 11d1c51b97ae830b591c51b874da01de90a083dc Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 4 Jul 2026 09:24:02 +0200 Subject: feat: -l skips versionless hints, widen version columns --list now skips hint files with no VERSION (e.g. pure DELREQUIRES hints) and excludes them from the total. Version columns widened 10->22 to fit long version strings without shifting other rows. Adds T57. Co-Authored-By: Claude Opus 4.8 --- mkhint | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mkhint') diff --git a/mkhint b/mkhint index a70e590..90378aa 100755 --- a/mkhint +++ b/mkhint @@ -111,7 +111,7 @@ list_hint_files() { echo "Hint files in: $HINT_DIR" echo "=======================================================" - printf "%-40s %10s %10s %-20s %s\n" "File" "HintVer" "SBOVer" "Category" "Created" + printf "%-40s %22s %22s %-20s %s\n" "File" "HintVer" "SBOVer" "Category" "Created" echo "-------------------------------------------------------" MATCHED_PKGS=() @@ -119,6 +119,8 @@ list_hint_files() { for file in "$HINT_DIR"/*.hint; do if [[ -f "$file" ]]; then local VER; VER=$(grep "^VERSION" "$file" |cut -d '"' -f2) + # Skip hints with no VERSION set. + [[ -z "$VER" ]] && continue local name; name=$(basename "$file") local pkg="${name%.hint}" local info_file @@ -131,7 +133,7 @@ list_hint_files() { fi local date; date=$(stat -c "%y" "$file" | cut -d'.' -f1) local row - row=$(printf "%-40s %10s %10s %-20s %s" "$name" "$VER" "$SBO_VER" "$category" "$date") + row=$(printf "%-40s %22s %22s %-20s %s" "$name" "$VER" "$SBO_VER" "$category" "$date") if [[ -n "$VER" && "$VER" == "$SBO_VER" ]]; then printf "%s%s%s\n" "$c_on" "$row" "$c_off" MATCHED_PKGS+=("$pkg") -- cgit v1.2.3