#50 Include the source repo to allow querying their metadata
Merged 6 years ago by pingou. Opened 7 years ago by pingou.

file modified
+6
@@ -469,6 +469,9 @@ 

              (url, release['koji_name'])

          )

  

+         url = url.replace('/x86_64/os/', '/source/tree/')

+         repositories.append((url, 'src_%s' % release['koji_name']))

+ 

      urls = {

          'Fedora':

              [
@@ -499,6 +502,9 @@ 

              rurl =  url % (DL_SERVER, version)

              repositories.append((rurl, name))

  

+             rurl = rurl.replace('/x86_64/', '/SRPMS/')

+             repositories.append((rurl, 'src_%s' % name))

+ 

      # In parallel

      #p = multiprocessing.Pool(10)

      #p.map(process_repo, itertools.product(

file modified
+2 -2
@@ -270,12 +270,12 @@ 

      ''' Return the list of all branches currently supported by mdapi

      '''

      pretty = _get_pretty(request)

-     output = list(set([

+     output = sorted(list(set([

          # Remove the front part `mdapi-` and the end part -<type>.sqlite

          filename.replace('mdapi-', '').rsplit('-', 2)[0].replace('-updates', '')

          for filename in os.listdir(CONFIG['DB_FOLDER'])

          if filename.startswith('mdapi') and filename.endswith('.sqlite')

-     ]))

+     ])))

  

      args = {}

      if pretty:

file modified
+9
@@ -70,6 +70,14 @@ 

  

      <a href="$PREFIX/branches">/branches</a>

  

+ 

+ Note:

+   The src_* branches refer to the source repositories metadata, they will

+   thus return you information about the source package.

+   So to find the BuildRequires of a package, check its requires provided in

+   its information against in a src_* branch.

+ 

+ 

  Retrieve information about a package

  ------------------------------------

  
@@ -136,6 +144,7 @@ 

  

      packages requiring R in rawhide:

      <a href="$PREFIX/rawhide/requires/R">/rawhide/requires/R</a>

+       To see what R itself requires, check its information using: <a href="$PREFIX/rawhide/pkg/R">/rawhide/pkg/R</a>

  

      packages providing perl(SetupLog) in rawhide:

      <a href="$PREFIX/rawhide/provides/perl(SetupLog)">/rawhide/provides/perl(SetupLog)</a>

no initial comment

I recommend tests, but LGTM.

Thanks for the review, I'm going to merge as is as the entire project has no unit-tests (cf ticket: #13).

Pull-Request has been merged by pingou

6 years ago