#9362 Rework retire-ftbfs-packages.sh to close-old-ftbfs-bugz.sh
Opened 2 months ago by churchyard. Modified 2 months ago
churchyard/releng close-old-bugz  into  master

@@ -0,0 +1,23 @@ 

+ #!/bin/bash

+ set -e

+ set -u

+ set -o pipefail

+ 

+ tracker=${1:-1750908}

+ dist=${1:-fc32}

+ 

+ 

+ for line in $(bugzilla query --blocked $tracker --status NEW --outputformat "%{id}@%{component}@%{creation_time}"); do

+   line=( ${line/@/ } )

+   bug=${line[0]}

+   line=( ${line[1]/@/ } )

+   component=${line[0]}

+   creation_time=${line[1]}

+   builds=$(koji list-builds --package $component --after "$creation_time" --state=COMPLETE --quiet) || continue

+   # XXX any better way to filter builds by release?

+   builds=$(echo "$builds" | grep "$dist " | cut -f1 -d' ' | tr '\n' ' ' || true)

+   if ! [ -z "$builds" ]; then

+     echo "$builds"

+     bugzilla modify --status CLOSED --close NEXTRELEASE --comment "The following builds were made after this report was opened: $builds" $bug

+   fi

+ done

@@ -1,28 +0,0 @@ 

- #!/bin/bash

- set -e

- set -u

- set -o pipefail

- 

- tracker=${1:-1674516}

- date="${2:-2019-01-31 10:10:00.000000}"

- 

- export GIT_SSH=/usr/local/bin/relengpush

- 

- for line in $(bugzilla query --blocked $tracker --status NEW,ASSIGNED,POST,MODIFIED --outputformat "%{id}:%{component}"); do

-   bug_component=( ${line/:/ } )

-   bug=${bug_component[0]}

-   component=${bug_component[1]}

-   builds=$(koji list-builds --package $component --after "$date" --state=COMPLETE --quiet) || continue

-   # XXX any better way to get rid of epel and fc29 builds?

-   builds=$(echo "$builds" | egrep "fc(30|31)" | cut -f1 -d' ' | tr '\n' ' ' || true)

-   if [ -z "$builds" ]; then

-     echo "$component fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=$bug"

-     fedpkg --user releng clone $component

-     (cd $component && git config user.name 'Fedora Release Engineering' && git config user.email 'releng@fedoraproject.org' && fedpkg --user releng retire "$component fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=$bug")

-     rm -rf $component

-     bugzilla modify --status CLOSED --close EOL --comment "The package was retired." $bug

-   else

-     echo "The following builds were made: $builds"

-     bugzilla modify --status CLOSED --close WORKSFORME --comment "The following builds were made: $builds" $bug

-   fi

- done

We are not using retire-ftbfs-packages.sh anyway, it was too intrusive.

rebased onto 9b7eb5a

2 months ago