Bug 701049

Summary: valid repos in error report not ready to copy and paste
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: mirrormanagerAssignee: Matt Domsch <matt_domsch>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: jonstanley, matt_domsch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-30 22:20:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
curl 'https://mirrors.fedoraproject.org/metalink?repo=foo&arch=bar' none

Description Steve Tyler 2011-04-30 15:51:02 UTC
Created attachment 495979 [details]
curl 'https://mirrors.fedoraproject.org/metalink?repo=foo&arch=bar'

Description of problem:
When mirrormanager reports an error, it returns a list of valid repos.

The valid repos in the error report look like this:
# repo=fedora-15, arch=i386

These would be easier to use, if they were ready to copy and paste:
# repo=fedora-15&arch=i386
or
# https://mirrors.fedoraproject.org/metalink?repo=fedora-15&arch=i386

Version-Release number of selected component (if applicable):
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic"
pubdate="Sat, 30 Apr 2011 11:54:56 GMT" generator="mirrormanager"
xmlns:mm0="http://fedorahosted.org/mirrormanager">

How reproducible:
Always.

Steps to Reproduce:
1. $ curl 'https://mirrors.fedoraproject.org/metalink?repo=foo&arch=bar'
  
Actual results:
Attached.

Expected results:
See above.

Additional info:

Comment 1 Matt Domsch 2011-04-30 22:20:17 UTC
commit 502f065773418a66b0d3204e8658dbfb018a9102
Author: Matt Domsch <Matt_Domsch>
Date:   Sat Apr 30 17:18:50 2011 -0500

    mirrorlist_server: on invalid requested repo, return repo=%s&arch=%s
    
    fixes https://bugzilla.redhat.com/show_bug.cgi?id=701049

diff --git a/mirrorlist-server/mirrorlist_server.py b/mirrorlist-server/mirrorlist_server.py
index 751dc0a..d5d078c 100755
--- a/mirrorlist-server/mirrorlist_server.py
+++ b/mirrorlist-server/mirrorlist_server.py
@@ -464,7 +464,7 @@ def do_mirrorlist(kwargs):
             repo_information += "# following repositories are available:\n"
             for i in repos:
                 if i[0] is not None and i[1] is not None:
-                    repo_information += "# repo=%s, arch=%s\n" % i
+                    repo_information += "# repo=%s&arch=%s\n" % i
             return return_error(kwargs, message=repo_information)

Comment 2 Steve Tyler 2011-05-01 13:43:18 UTC
(In reply to comment #1)
> commit 502f065773418a66b0d3204e8658dbfb018a9102
> Author: Matt Domsch <Matt_Domsch>
> Date:   Sat Apr 30 17:18:50 2011 -0500
> 
>     mirrorlist_server: on invalid requested repo, return repo=%s&arch=%s
> 
>     fixes https://bugzilla.redhat.com/show_bug.cgi?id=701049
...

Thanks, Matt.