#2608 cli: support download-build --type=remote-sources
Merged a year ago by tkopecek. Opened a year ago by ktdreyer.
ktdreyer/koji download-remote-sources  into  master

file modified
+1 -1
@@ -6758,7 +6758,7 @@ 

                        help=_("Only download packages for this arch (may be used multiple times)"))

      parser.add_option("--type",

                        help=_("Download archives of the given type, rather than rpms "

-                              "(maven, win, or image)"))

+                              "(maven, win, image, remote-source)"))

      parser.add_option("--latestfrom", dest="latestfrom",

                        help=_("Download the latest build from this tag"))

      parser.add_option("--debuginfo", action="store_true", help=_("Also download -debuginfo rpms"))

file modified
+4
@@ -653,6 +653,10 @@ 

      elif archive['btype'] == 'image':

          url = os.path.join(pi.imagebuild(build), archive['filename'])

          path = archive['filename']

+     elif archive['btype'] == 'remote-sources':

+         directory = pi.typedir(build, 'remote-sources')

+         url = os.path.join(directory, archive['filename'])

+         path = archive['filename']

      else:

          # TODO: cover module/operator-manifests/remote-sources

          # can't happen

Prior to this change, koji download-build --type=remote-sources failed with an AssertionError.

Add support for OSBS's cachito remote-sources btype.

Further improvements we could make:

Medium-term: We should raise NotImplementedError with the btype string that we don't support, rather than assert False, so users can understand a bit more about what went wrong: PR #2610

Long-term: We can probably generalize this, because all content generators should be using the btype name (archive['btype']) for the directory name to PathInfo's typedir() method. That would let us remove this remote-sources condition and just handle all content generators the same way.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

a year ago

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

a year ago

Commit 0c4db06 fixes this pull-request

Pull-Request has been merged by tkopecek

a year ago