Revert "bugs-in-changelog.sh: Various fixes to cope with new changelog format"

I fixed this in a better way in virt-v2v, so revert this change and
(next commit) use the virt-v2v commit instead.

This reverts commit ae8ff236ab.
This commit is contained in:
Richard W.M. Jones
2022-03-10 15:58:57 +00:00
parent 96a887a9bf
commit 2a8a0672c4

View File

@@ -1,6 +1,6 @@
#!/bin/bash -
# bugs-in-changelog.sh
# Copyright (C) 2009-2021 Red Hat Inc.
# Copyright (C) 2009-2020 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,26 +21,27 @@
# stable release (or any release). To use it, the only parameter
# should be the git commit range, eg:
#
# ./bugs-in-changelog.sh "v1.44.0.."
# ./bugs-in-changelog.sh "1.0.89.."
if [ -z "$1" ]; then
echo "$0 git-commit-range"
exit 1
fi
# Grep the log for Bugzilla IDs in various formats.
rhbzs="$( git log "$1" | egrep -o 'RHBZ#[0-9]+' | sed 's/RHBZ#//' )"
bzurls="$( git log "$1" | egrep -o 'https?://bugzilla.redhat[_./?=a-z0-9]*[/=][0-9]+\b' | sed 's/.*[/=]\([0-9]\+\)$/\1/' )"
# Uniq and format as comma-separated list of ids.
bugids=$( for b in $rhbzs $bzurls ; do echo $b; done | sort -u | tr '\n' ',' | sed 's/,$//' )
# Comma-separated list of Bugzilla IDs.
bugids=$(
git log "$1" | egrep -o 'RHBZ#[0-9]+' |
sed 's/RHBZ#//' |
sort -u |
tr '\n' ',' |
sed 's/,$//'
)
#echo bugids "$bugids"
# Filter out any bugs which may still be in NEW or ASSIGNED:
bugzilla query -b "$bugids" \
-s MODIFIED,POST,ON_QA,PASSES_QA,VERIFIED,RELEASE_PENDING,CLOSED \
--component libguestfs \
--outputformat='%{bug_id} %{short_desc}' |
sort -n -r |
perl -pe '