diff options
Diffstat (limited to 'src/fedoradev-pkgowners')
-rwxr-xr-x[-rw-r--r--] | src/fedoradev-pkgowners | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/fedoradev-pkgowners b/src/fedoradev-pkgowners index c5d9f45..ada5753 100644..100755 --- a/src/fedoradev-pkgowners +++ b/src/fedoradev-pkgowners @@ -60,7 +60,7 @@ this_init() # check fasfile -- needs to be local, thus check first if [[ "${file_fadcsvdata}" ]]; then if [[ ! -s "${file_fadcsvdata}" ]]; then - echo "Could not find fas-datafile ${file_fadcsvdata}" >&2 + echo "Empty or nonexistent fas-datafile ${file_fadcsvdata}" >&2 exit 2 fi @@ -74,7 +74,7 @@ this_init() # pkgdb bugzilla data for owners if [[ "${file_pkgdbfiledata}" ]]; then if [[ ! -s "${file_pkgdbfiledata}" ]]; then - echo "Could not find pgkdb-datafile ${file_pkgdbfiledata}" >&2 + echo "Empty or nonexistent pkgdb-datafile ${file_pkgdbfiledata}" >&2 exit 2 fi else @@ -110,13 +110,19 @@ this_init() lookup_package() { local package_info="$(grep "${filter_for}|${1}|" "${file_pkgdbfiledata}")" - local owner="$(echo ${package_info} | cut -d '|' -f 4)" - if [[ ! "${owner}" ]]; then - # grep did not find anything or something else went wrong - echo "Could not find owner for ${1}" >&2 + if [[ ! "${package_info}" ]]; then + # grep did not find anything or something else went wrong, eg. + # https://fedorahosted.org/packagedb/ticket/138 + echo "Warning: could not find info for ${1}" >&2 return 1 fi + # owner? + local owner="$(echo ${package_info} | cut -d '|' -f 4)" + if [[ ! "${owner}" || "${owner}" == orphan ]]; then + # No owner, assume orphan + owner="(orphan)" + fi # co-maintainers? if [[ "${print_comaintainers}" ]]; then |