#120 Fix change in naming
Closed by pingou. Opened by leo.
leo/mdapi fix-naming  into  master

Download 120.patch

The pkgdb.json was updated and changed Fedora to Fedora Linux. mdapi was not updated for this change.

Fixes https://pagure.io/mdapi/issue/119

Hm this doesn't work out of the box as not all the releases were updated to Fedora Linux.

This is what I have needed to do to get the script working for me:

diff --git a/mdapi-get_repo_md b/mdapi-get_repo_md
index f68c086..65e963c 100755
--- a/mdapi-get_repo_md        
+++ b/mdapi-get_repo_md        
@@ -502,6 +502,7 @@ def main():
                 '%s/pub/epel/testing/%s/x86_64/repodata',
             ]
     }
+    urls['Fedora'] = urls['Fedora Linux']
     fedora_repos = ['%s', '%s-updates', '%s-updates-testing']
     epel_repos = ['%s', '%s-testing']
@@ -512,7 +513,7 @@ def main():
             continue
         version = release['version']
         for idx, url in enumerate(urls[release['name']]):
-            if release['name'] == 'Fedora Linux':
+            if release['name'] in ('Fedora Linux', 'Fedora'):
                 name = fedora_repos[idx] % release['koji_name']
             elif release['name'] == 'Fedora EPEL' and version == "8":
                 name = epel_repos[idx] % release['koji_name']

We likely should add a comment above these changes to say that we can get ride of/simplify these lines once all the releases in the pkgdb file have been migrated to Fedora Linux

rebased onto 1f4502a759681537eb9d4fca10e282c5b9b9c52f

rebased onto c7566c6f86a2e5e914161f666432884a36a3814b

Pull-Request has been closed by pingou

Metadata