Blame SOURCES/srpm-fetch.patch

e965a0
From 24d774fb27375f0848d56603be873937d23209cc Mon Sep 17 00:00:00 2001
e965a0
From: Zdenek Zambersky <zzambers@redhat.com>
e965a0
Date: Thu, 2 Aug 2018 16:50:35 +0200
e965a0
Subject: [PATCH 1/4] rpms.sh: fixed search url for src rpms
e965a0
e965a0
---
e965a0
 src/rpms.sh | 7 ++++++-
e965a0
 1 file changed, 6 insertions(+), 1 deletion(-)
e965a0
e965a0
diff --git a/src/rpms.sh b/src/rpms.sh
e965a0
index 66d9aa8..878abba 100644
e965a0
--- a/src/rpms.sh
e965a0
+++ b/src/rpms.sh
e965a0
@@ -671,7 +671,12 @@ __INTERNAL_rpmGetNextUrl() {
e965a0
           ;;
e965a0
         koji,nvra.rpm)
e965a0
           rlLogDebug "$FUNCNAME(): get rpm info"
e965a0
-          local rpm_info=$($__INTERNAL_WGET -O - "$base_url/search?match=exact&type=rpm&terms=$N-$V-$R.$A.rpm")
e965a0
+          local rpm_info
e965a0
+          if [[ -n "$source" ]]; then
e965a0
+            rpm_info=$($__INTERNAL_WGET -O - "$base_url/search?match=exact&type=rpm&terms=$N-$V-$R.src.rpm")
e965a0
+          else
e965a0
+            rpm_info=$($__INTERNAL_WGET -O - "$base_url/search?match=exact&type=rpm&terms=$N-$V-$R.$A.rpm")
e965a0
+          fi
e965a0
           [[ $? -ne 0 || -z "$rpm_info" ]] && {
e965a0
             rlLogError "could not download rpm information"
e965a0
             let res++
e965a0
--
e965a0
2.17.1